Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Daniel Berger
RE: Build error for sys-filesystem (with fix) [ reply ]  
2008-06-27 03:05
Hi Tomy,

Actually, HAVE_STATVFS is correct. That's true if the statvfs() function is defined on your system. Take a look at the extconf.rb file.

I don't understand how have_func('statvfs') can fail, yet have_header('sys/statvfs.h') can succeed.

Wait, what happens if you try the following code:

require 'mkmf'
have_func('statvfs')
have_func('statvfs', 'sys/statvfs.h')

Please let me know.

Thanks,

Dan

By: Tomy Hudson
Build error for sys-filesystem (with fix) [ reply ]  
2008-06-26 20:13

I came across an error while trying to install sys-filesystem on a RedHat Linux x86_64 platform. The build correctly identifies it as having sys/statvfs.h and sets the flag HAVE_SYS_STATVFS_H, but fails to compile because on line 53 of filesystem.c, the ifdef uses HAVE_STATVFS, which doesn't seem to be defined. If I change this to HAVE_SYS_STATVFS_H, it compiles cleanly.