From: TJ <fu...@ia...> - 2012-08-03 23:30:02
|
Building the package xbfuse[1] on an (Ubuntu 12.04) 64-bit platform I found that the 'configure' script would silently fail when checking for the presence of fuse/fuse.h. The config.log revealed that, in fact, the file was being found but a pre-processor directive was invoking a #error directive and stopping compilation of one of the 'configure' tests. Please add -D_FILE_OFFSET_BITS=64 to your compile flags! Initially I added it to the Makefile.ac AM_CPPFLAGS. Whilst that would fix the later compilation stages invoked by 'make' it wouldn't solve the problems caused when the 'configure' script built its own inline tests since there is apparently no way to tell 'configure' to use alternative CPPFLAGS. I then found that the xbfuse's Makefile.ac does try to take care of this in 'configure.ac': CPPFLAGS="$CPPFLAGS -Wall `getconf LFS_CFLAGS`" but on the 64-bit system LFS_CFLAGS is an empty string: $ getconf LFS_CFLAGS $ That made we wonder if fuse is doing the right thing by expecting _FILE_OFFSET_BITS=64 even when building on a 64-bit host, since sizeof(off_t) == 8. Obviously sizeof() can't be used in a preprocessor conditional test but I found the following patch achieves the objective. You might like consider this issue and my proposed patch for inclusion, or find a different/better solution that makes fuse a little less unforgiving in this kind of scenario. I'm subscribed to the mailing-list and can try out alternatives. TJ. [1] https://github.com/multimediamike/xbfuse --- include/fuse_common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/fuse_common.h b/include/fuse_common.h index a4d980d..43e17b9 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -29,7 +29,8 @@ #define FUSE_VERSION FUSE_MAKE_VERSION(FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION) /* This interface uses 64 bit off_t */ -#if _FILE_OFFSET_BITS != 64 +#if (INTPTR_MAX == INT32_MAX && _FILE_OFFSET_BITS != 64) + || (INTPTR_MAX == INT64_MAX && defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64) #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! #endif -- 1.7.11.3 |