[Gluster-devel] Error while compiling Xlator manually with v5.0

Amar Tumballi atumball at redhat.com
Thu Nov 1 05:09:48 UTC 2018


Can you try with the configure.ac like

https://github.com/gluster/glusterfs-posix2/blob/master/configure.ac#L35..L69



On Tue, Oct 30, 2018 at 1:10 PM David Spisla <spisla80 at gmail.com> 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.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
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> https://lists.gluster.org/mailman/listinfo/gluster-devel



-- 
Amar Tumballi (amarts)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gluster.org/pipermail/gluster-devel/attachments/20181101/bfb362b3/attachment.html>


More information about the Gluster-devel mailing list