Project

General

Profile

Actions

Bug #11733

closed

Compile of ruby 2.2.3 fails on AIX 6.1 TL07 SP03

Added by pedz (Perry Smith) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
Target version:
-
[ruby-core:71646]

Description

The build on AIX fails in the ext/-test-/file directory with errors such as

compiling /usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c: In function 'get_fsname':
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:39:14: error: storage size of 'st' isn't known
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:44:5: warning: implicit declaration of function 'statvfs'
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:39:14: warning: unused variable 'st'
make: *** [fs.o] Error 1

This can be avoided if line 65 is modified but then we encounter a second error:

compiling /usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c: In function 'get_fsname':
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:45:5: warning: implicit declaration of function 'statvfs'
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:49:11: error: 'struct statfs' has no member named 'f_basetype'
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:50:9: error: 'struct statfs' has no member named 'f_basetype'
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:50:9: error: 'struct statfs' has no member named 'f_basetype'
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:50:9: error: 'struct statfs' has no member named 'f_basetype'
/usr/work/src/ruby-2.2.3/ext/-test-/file/fs.c:50:9: error: 'struct statfs' has no member named 'f_basetype'

In the extconf.rb, they test for struct statfs -- which AIX has but the code declares variables of statfs_t which AIX does not have.

The AIX statfs is defined in /usr/include/sys/statfs.h (which is included by vfs.h). It has an f_type field but not an f_basetype field.

To get around the issue, I kludged extconf.rb to fail to find the structures it was looking for and then it built but this is clearly not a real solution.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0