Subject: [Boost-build] problems with boost bootstrap.sh on XFS (calls to file stat fail)
From: Blower, Melanie (melanie.blower_at_[hidden])
Date: 2014-05-29 13:35:21
I have an rhel7 (release candidate 2) on an intel64 processor and I'm trying to build the boost library, for x86 (32-bit library). The first step failed (bootstrap.sh) because jam0's call to stat failed because the filesystem is XFS.
Is this not an expected usage model? I configured gcc to a compiler which produces 32-bit binaries before I started the bootstrap step.
Using the exact same steps, with the same compiler, but the boost package on an NFS filesystem, succeeds.
I've traced the difference to a call to the stat(2) function. Here's a simple reproducer:
void file_query_posix( char * name)
struct stat statbuf;
stat_return = stat( name, &statbuf );
printf("stat returns %d for %s %s\n", stat_return, name);
-bash-4.2$ ls -ld .
drwxr-xr-x 9 mblower cmplr 4096 May 28 11:07 .
-bash-4.2$ ls -ld constants.c
-rw-r--r-- 1 mblower cmplr 7436 May 20 2013 constants.c
stat returns -1 for .
stat returns -1 for constants.c
I see other definitions of _FILE_OFFSET_BITS elsewhere in the boost sources, but not under boost_1_55_0/tools
gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root= clean
./bootstrap/jam0 -f build.jam --toolset=gcc --toolset-root=
don't know how to make command.c
don't know how to make compile.c
don't know how to make constants.c
man 2 stat
path or fd refers to a file whose size, inode number, or number of blocks cannot be represented in, respectively, the types off_t, ino_t, or blkcnt_t.
This error can occur when, for example, an application compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64 calls stat() on a file whose size exceeds
I tried rebuilding jam0 with -D_FILE_OFFSET_BITS=64 and then it worked. There doesn't seem to be a way to configure the build to pass the flag to gcc, and also the bootstrap.sh build igored the CFLAGS environment value
Thanks and regards, Melanie Blower
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk