On Tue, Oct 30, 2018 at 1:10 PM David Spisla <spisla80@xxxxxxxxx> wrote:
_______________________________________________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.c
In 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 1I am using this Makefile to compile the xlator manually:# Change these to match your source code.
TARGET = worm.so
OBJECTS = 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/lib64
HOST_OS = GF_LINUX_HOST_OS
CC=gcc
CFLAGS = -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/src
LDFLAGS = -shared -nostartfiles -L$(GLFS_LIB)
LIBS = -lpthread
build: $(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.RegardsDavid Spisla
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
https://lists.gluster.org/mailman/listinfo/gluster-devel
Amar Tumballi (amarts)
_______________________________________________ Gluster-devel mailing list Gluster-devel@xxxxxxxxxxx https://lists.gluster.org/mailman/listinfo/gluster-devel