From: Rei.Odaira@... Date: 2015-12-07T21:18:02+00:00 Subject: [ruby-core:71919] [Ruby trunk - Bug #11733] Compile of ruby 2.2.3 fails on AIX 6.1 TL07 SP03 Issue #11733 has been updated by Rei Odaira. r50423 will be soon back-ported to the 2.2 branch. In the meantime, I believe you can avoid the compile error by the following patch. ~~~diff --- ruby-2.2.3/ext/-test-/file/fs.c 2015-05-23 10:15:12.000000000 -0700 +++ ../Contribution/ruby-2.2.3/ext/-test-/file/fs.c 2015-09-08 12:32:04.000000000 -0700 @@ -7,6 +7,9 @@ #ifdef HAVE_SYS_VFS_H #include #endif + #ifdef _AIX + #include + #endif #if defined HAVE_STRUCT_STATFS_F_FSTYPENAME typedef struct statfs statfs_t; ~~~ ---------------------------------------- Bug #11733: Compile of ruby 2.2.3 fails on AIX 6.1 TL07 SP03 https://bugs.ruby-lang.org/issues/11733#change-55325 * Author: Perry Smith * Status: Closed * Priority: Normal * Assignee: cruby-aix * ruby -v: * Backport: 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED ---------------------------------------- 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. -- https://bugs.ruby-lang.org/