Description of problem: While trying to compile Gluster 3.3.1 on FreeBSD 9.1, I got the error: "In file included from dict.c:28: compat.h:338: error: conflicting types for 'basename_r' /usr/include/libgen.h:39: error: previous declaration of 'basename_r' was here" After commenting out the lines above, on libglusterfs/src/compat.h: " 337 #ifdef THREAD_UNSAFE_BASENAME 338 char *basename_r(const char *); 339 #define basename(path) basename_r(path) 340 #endif /* THREAD_UNSAFE_BASENAME */ 341 342 #ifdef THREAD_UNSAFE_DIRNAME 343 char *dirname_r(char *path); 344 #define dirname(path) dirname_r(path) 345 #endif /* THREAD_UNSAFE_DIRNAME */ " The error changes to the above: ../../../../rpc/xdr/src/glusterfs3-xdr.h:25: warning: unknown option after '#pragma GCC diagnostic' kind socket.c: In function '__socket_keepalive': socket.c:397: error: 'TCP_KEEPALIVE' undeclared (first use in this function) socket.c:397: error: (Each undeclared identifier is reported only once socket.c:397: error: for each function it appears in.) *** [socket.lo] Error code 1 This second error also occurs on Gluster 3.3.0, but the basename error don't, as this is a change from Gluster 3.3.0 to 3.3.1 Version-Release number of selected component (if applicable): - FreeBSD 9.1 - Gluster 3.3.1 How reproducible: Install FreeBSD 9.1, then install gluster dependencies (bison, libevent, python 2.7, and readline). Then try to compile gluster with ./configure --prefix=/usr/local && make Steps to Reproduce: 1. Install FreeeBSD 9.1 2. Install, with ports, the packages bison, python27, libffi, readline, libevent, libxml-2, gnulib 3. Comment the lines 337-345 from libglusterfs/src/compat.h (as this may also, maybe need a patch) 4. Start ./configure with './configure --prefix=/usr/local' 4.1. The result will be: GlusterFS configure summary =========================== FUSE client : no Infiniband verbs : no epoll IO multiplex : no argp-standalone : yes fusermount : no readline : yes georeplication : no Linux-AIO : no 5. Try to 'make' it Actual results: ../../../../rpc/xdr/src/glusterfs3-xdr.h:25: warning: unknown option after '#pra gma GCC diagnostic' kind socket.c: In function '__socket_keepalive': socket.c:397: error: 'TCP_KEEPALIVE' undeclared (first use in this function) socket.c:397: error: (Each undeclared identifier is reported only once socket.c:397: error: for each function it appears in.) *** [socket.lo] Error code 1 Expected results: Sucessful compilation Additional info: None
I've done a modification on file: ./rpc/rpc-transport/socket/src/socket.c On line 392, witch was #if !defined(GF_LINUX_HOST_OS) && !defined(__NetBSD__) I've changed to the following: #if !defined(GF_LINUX_HOST_OS) && !defined(__NetBSD__) && !defined(__FreeBSD__) After this modification, another error occurs: gcc -DHAVE_CONFIG_H -I. -I. -I../../../.. -I../../../../libglusterfs/src -I../../../../contrib/uuid -fPIC -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_BSD_HOST_OS -Wall -I../../../../libglusterfs/src -I../../../../contrib/fuse-include -I../../../../argp-standalone -O0 -DTHREAD_UNSAFE_BASENAME -DTHREAD_UNSAFE_DIRNAME -g -O2 -MT fuse-helpers.lo -MD -MP -MF .deps/fuse-helpers.Tpo -c fuse-helpers.c -fPIC -DPIC -o .libs/fuse-helpers.o fuse-helpers.c: In function 'frame_fill_groups': fuse-helpers.c:236: error: storage size of 'kp' isn't known fuse-helpers.c:236: warning: unused variable 'kp' fuse-helpers.c: In function 'fuse_loc_fill': fuse-helpers.c:390: warning: format '%ld' expects type 'long int', but argument 2 has type 'ino_t' fuse-helpers.c:390: warning: format '%ld' expects type 'long int', but argument 4 has type 'ino_t' fuse-helpers.c:390: warning: format '%ld' expects type 'long int', but argument 7 has type 'ino_t' fuse-helpers.c:390: warning: format '%ld' expects type 'long int', but argument 9 has type 'ino_t' *** [fuse-helpers.lo] Error code 1 Thanks in advice
Another try: ./configure --prefix=/usr/local --disable-fuse-client --enable-fusermount --disable-epoll --disable-ibverbs --disable-georeplication Then tried another make and the error changes: gcc -fPIC -Wall -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_BSD_HOST_OS -I../../libglusterfs/src -DDATADIR=\"/usr/local/var\" -DCONFDIR=\"/usr/local/etc/glusterfs\" -I../../argp-standalone -O0 -DTHREAD_UNSAFE_BASENAME -DTHREAD_UNSAFE_DIRNAME -I../../rpc/rpc-lib/src -I../../rpc/xdr/src -g -O2 -o .libs/glusterfsd -rdynamic glusterfsd.o glusterfsd-mgmt.o ../../libglusterfs/src/.libs/libglusterfs.so ../../rpc/rpc-lib/src/.libs/libgfrpc.so ../../rpc/xdr/src/.libs/libgfxdr.so /usr/home/ricardo/glusterfs-3.3.1/rpc/rpc-lib/src/.libs/libgfrpc.so /usr/home/ricardo/glusterfs-3.3.1/libglusterfs/src/.libs/libglusterfs.so -lfl ../../argp-standalone/libargp.a -lpthread -lcrypto -Wl,--rpath -Wl,/usr/local/lib ../../rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_quad_t' ../../rpc/xdr/src/.libs/libgfxdr.so: undefined reference to `xdr_u_quad_t' *** [glusterfsd] Error code 1
Hi Ricardo, Can you try if glusterfs-3.4.0qa8 or higher releases works for you? Would be great if you try it on our 'git HEAD'.
Closing the bug as there are no activity since last 7months. Also, newer release of glusterfs now available. If the issue persists, please feel free to re-open the bug, or open another bug with latest issues.
I have the same problems with GlusterFS 3.4.2
I know this is closed. Though I ran into this with Gluster 3.6.3 on FreeBSD 10.1. I fixed it by running "autogen.sh" first, then "configure", and then I compiled and it worked.