<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi folks,</div><div>I switched to the v5.0 tag and want to compile the worm xlator manually on my CentOS7 machine.</div><div>Below there is following error while compiling worm.c:</div><div><br></div><div><i>gcc -fPIC -Wall -O0 -g -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_LINUX_HOST_OS -I../../../.. -I../../../../contrib/uuid -I../../../../libglusterfs/src -I../../../../rpc/xdr/src -I../../../../xlators/lib/src   -c -o worm.o worm.c<br>In file included from ../../../../libglusterfs/src/glusterfs.h:54:0,<br>                 from ../../../../libglusterfs/src/common-utils.h:42,<br>                 from ../../../../libglusterfs/src/circ-buff.h:14,<br>                 from ../../../../libglusterfs/src/event-history.h:15,<br>                 from ../../../../libglusterfs/src/xlator.h:18,<br>                 from worm.c:10:<br>../../../../libglusterfs/src/atomic.h:94:25: error: expected specifier-qualifier-list before ‘GF_ATOMIC_SIZE_SIZEOF_LONG’<br>         GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_, _size);                               \<br>                         ^<br>../../../../libglusterfs/src/atomic.h:20:35: note: in definition of macro ‘GF_ATOMIC_MACRO_1’<br> #define GF_ATOMIC_MACRO_1(_macro) _macro<br>                                   ^<br>../../../../libglusterfs/src/atomic.h:94:9: note: in expansion of macro ‘GF_ATOMIC_MACRO’<br>         GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_, _size);                               \<br>         ^<br>../../../../libglusterfs/src/atomic.h:103:1: note: in expansion of macro ‘GF_ATOMIC_TYPE’<br> GF_ATOMIC_TYPE(SIZEOF_LONG, intptr);  /* gf_atomic_intptr_t */<br> ^<br>../../../../libglusterfs/src/atomic.h:94:25: error: expected specifier-qualifier-list before ‘GF_ATOMIC_SIZE_SIZEOF_LONG’<br>         GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_, _size);                               \<br>                         ^<br>../../../../libglusterfs/src/atomic.h:20:35: note: in definition of macro ‘GF_ATOMIC_MACRO_1’<br> #define GF_ATOMIC_MACRO_1(_macro) _macro<br>                                   ^<br>../../../../libglusterfs/src/atomic.h:94:9: note: in expansion of macro ‘GF_ATOMIC_MACRO’<br>         GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_, _size);                               \<br>         ^<br>../../../../libglusterfs/src/atomic.h:108:1: note: in expansion of macro ‘GF_ATOMIC_TYPE’<br> GF_ATOMIC_TYPE(SIZEOF_LONG, uintptr); /* gf_atomic_uintptr_t */<br> ^<br>make: *** [worm.o] Error 1<br></i></div><div><i><br></i></div><div>I am using this Makefile to compile the xlator manually:</div><div><br></div><div><i># Change these to match your source code.<br>TARGET  = worm.so<br>OBJECTS = worm.o worm-helper.o read-only-common.o \<br>          $(GLFS_SRC)/contrib/uuid/copy.o \<br>          $(GLFS_SRC)/xlators/lib/src/xlator_helper.o<br><br># Change these to match your environment.<br>GLFS_SRC = ../../../..<br>GLFS_LIB = /usr/lib64<br>HOST_OS  = GF_LINUX_HOST_OS<br>CC=gcc<br><br>CFLAGS  = -fPIC -Wall -O0 -g \<br>      -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \<br>      -D$(HOST_OS) -I$(GLFS_SRC) -I$(GLFS_SRC)/contrib/uuid \<br>      -I$(GLFS_SRC)/libglusterfs/src -I$(GLFS_SRC)/rpc/xdr/src \<br>      -I$(GLFS_SRC)/xlators/lib/src<br>LDFLAGS = -shared -nostartfiles -L$(GLFS_LIB)<br>LIBS = -lpthread<br><br>build:  $(TARGET)<br><br>$(TARGET): $(OBJECTS)<br>    $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)</i></div><div><i><br></i></div><div>BEfore I compiling it, I do autogen, configure and make to prepare the Source Tree. Does I need to define more compile flags for the CFLAGS variable?<br></div><div><i></i></div><div> I really don&#39;t know why the error above occurs. Compiling it with v4.1.5 succeed.</div><div><br></div><div>Regards</div><div>David Spisla<br></div></div></div></div>