[Gluster-devel] Error while compiling Xlator manually with v5.0
David Spisla
spisla80 at gmail.com
Tue Oct 30 07:39:07 UTC 2018
Hi folks,
I switched to the v5.0 tag and want to compile the worm xlator manually on
my CentOS7 machine.
Below there is following error while compiling worm.c:
*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.cIn file included from
../../../../libglusterfs/src/glusterfs.h:54:0, from
../../../../libglusterfs/src/common-utils.h:42, from
../../../../libglusterfs/src/circ-buff.h:14, from
../../../../libglusterfs/src/event-history.h:15, from
../../../../libglusterfs/src/xlator.h:18, from
worm.c:10:../../../../libglusterfs/src/atomic.h:94:25: error: expected
specifier-qualifier-list before ‘GF_ATOMIC_SIZE_SIZEOF_LONG’
GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_, _size);
\ ^../../../../libglusterfs/src/atomic.h:20:35:
note: in definition of macro ‘GF_ATOMIC_MACRO_1’ #define
GF_ATOMIC_MACRO_1(_macro) _macro
^../../../../libglusterfs/src/atomic.h:94:9: note: in expansion of macro
‘GF_ATOMIC_MACRO’ GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_,
_size); \
^../../../../libglusterfs/src/atomic.h:103:1: note: in expansion of macro
‘GF_ATOMIC_TYPE’ GF_ATOMIC_TYPE(SIZEOF_LONG, intptr); /*
gf_atomic_intptr_t */ ^../../../../libglusterfs/src/atomic.h:94:25: error:
expected specifier-qualifier-list before
‘GF_ATOMIC_SIZE_SIZEOF_LONG’ GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_,
_size); \
^../../../../libglusterfs/src/atomic.h:20:35: note: in definition of macro
‘GF_ATOMIC_MACRO_1’ #define GF_ATOMIC_MACRO_1(_macro)
_macro
^../../../../libglusterfs/src/atomic.h:94:9: note: in expansion of macro
‘GF_ATOMIC_MACRO’ GF_ATOMIC_MACRO(GF_ATOMIC_SIZE_,
_size); \
^../../../../libglusterfs/src/atomic.h:108:1: note: in expansion of macro
‘GF_ATOMIC_TYPE’ GF_ATOMIC_TYPE(SIZEOF_LONG, uintptr); /*
gf_atomic_uintptr_t */ ^make: *** [worm.o] Error 1*
I am using this Makefile to compile the xlator manually:
*# Change these to match your source code.TARGET = worm.soOBJECTS = worm.o
worm-helper.o read-only-common.o \ $(GLFS_SRC)/contrib/uuid/copy.o
\ $(GLFS_SRC)/xlators/lib/src/xlator_helper.o# Change these to
match your environment.GLFS_SRC = ../../../..GLFS_LIB = /usr/lib64HOST_OS
= GF_LINUX_HOST_OSCC=gccCFLAGS = -fPIC -Wall -O0 -g \ -DHAVE_CONFIG_H
-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE \ -D$(HOST_OS) -I$(GLFS_SRC)
-I$(GLFS_SRC)/contrib/uuid \ -I$(GLFS_SRC)/libglusterfs/src
-I$(GLFS_SRC)/rpc/xdr/src \ -I$(GLFS_SRC)/xlators/lib/srcLDFLAGS =
-shared -nostartfiles -L$(GLFS_LIB)LIBS = -lpthreadbuild:
$(TARGET)$(TARGET): $(OBJECTS) $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS)
$(LIBS)*
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?
I really don't know why the error above occurs. Compiling it with v4.1.5
succeed.
Regards
David Spisla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20181030/df998631/attachment-0001.html>
More information about the Gluster-devel
mailing list