gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gluster-devel] Plans for FreeBSD support?


From: Anand Avati
Subject: Re: [Gluster-devel] Plans for FreeBSD support?
Date: Wed, 16 May 2007 16:37:14 +0530

Attila,
 Great work! I'm applying the appropriate fixes...

thanks!
avati

2007/5/11, Attila Nagy <address@hidden>:
Hello,

I would like to reply to the following e-mail (I've just subscribed, so
this will be a new thread, sorry):
http://lists.nongnu.org/archive/html/gluster-devel/2007-05/msg00113.html

First of all, if you need a (or more than one) FreeBSD developer
machine(s), just tell me, I can give access to them (it's possible that
installing FreeBSD on a local machine can be easier).

BTW, I've tried to compile it. I have a FreeBSD/amd64 6-STABLE machine
and glusterfs-1.3.0-pre3 (tell me if it's not the right version to start
with).

So far I did the following:
- gunzip/untar
- -ldl cleaning from configure
- ./configure --disable-ibverbs LDFLAGS="-L/usr/local/lib -L/usr/lib
-I/usr/include -I/usr/local/include" LIBS="-lpthread" CC=gcc42 CXX=g++42
(I use gcc42 because I saw on the webpage, that at least gcc 4.1 should
be used when developing)
- make CFLAGS="-L/usr/local/lib -L/usr/lib -I/usr/include
-I/usr/local/include -DFUSE_USE_VERSION=26" CC=gcc42 CXX=g++42
(it's possible that FUSE_USE_VERSION was only needed for 1.2.3, I can't
remember, I started with that first, but thought that I should use the
newer one)

The compilation first fails at:
 gcc -DPACKAGE_NAME=\"glusterfs\" -DPACKAGE_TARNAME=\"glusterfs\"
-DPACKAGE_VERSION=\"1.3.0-pre3\" "-DPACKAGE_STRING=\"glusterfs
1.3.0-pre3\"" -DPACKAGE_BUGREPORT=\"address@hidden"
-DPACKAGE=\"glusterfs\" -DVERSION=\"1.3.0-pre3\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DYYTEXT_POINTER=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBDL=1 -DHAVE_LIBFUSE=1
-DHAVE_BACKTRACE=1 -I. -I. -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-DXLATORDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/xlator\"
-DSCHEDULERDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/scheduler\"
-DTRANSPORTDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/transport\"
-DYY_NO_UNPUT -fPIC -Wall -g -shared -nostartfiles -rdynamic
-L/usr/local/lib -L/usr/lib -I/usr/include -I/usr/local/include -MT
libglusterfs_la-spec.lex.lo -MD -MP -MF
.deps/libglusterfs_la-spec.lex.Tpo -c spec.lex.c  -fPIC -DPIC -o
.libs/libglusterfs_la-spec.lex.o
./spec.l: In function `yylex':
./spec.l:41: error: `yylval' undeclared (first use in this function)
./spec.l:41: error: (Each undeclared identifier is reported only once
./spec.l:41: error: for each function it appears in.)
./spec.l:41: warning: cast from pointer to integer of different size
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/libglusterfs/src.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/libglusterfs.
*** Error code 1

I've hacked the following into libglusterfs/src/spec.l (YYSTYPE lines):
%{

#include "xlator.h"
#include "y.tab.h"
#include <string.h>

#define YYSTYPE char *
extern YYSTYPE yylval;

%}

Retry.

Now it stops at:
 gcc -DPACKAGE_NAME=\"glusterfs\" -DPACKAGE_TARNAME=\"glusterfs\"
-DPACKAGE_VERSION=\"1.3.0-pre3\" "-DPACKAGE_STRING=\"glusterfs
1.3.0-pre3\"" -DPACKAGE_BUGREPORT=\"address@hidden"
-DPACKAGE=\"glusterfs\" -DVERSION=\"1.3.0-pre3\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DYYTEXT_POINTER=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBDL=1 -DHAVE_LIBFUSE=1
-DHAVE_BACKTRACE=1 -I. -I. -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-DXLATORDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/xlator\"
-DSCHEDULERDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/scheduler\"
-DTRANSPORTDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/transport\"
-DYY_NO_UNPUT -fPIC -Wall -g -shared -nostartfiles -rdynamic
-L/usr/local/lib -L/usr/lib -I/usr/include -I/usr/local/include -MT
libglusterfs_la-transport.lo -MD -MP -MF
.deps/libglusterfs_la-transport.Tpo -c transport.c  -fPIC -DPIC -o
.libs/libglusterfs_la-transport.o
In file included from transport.c:25:
logging.h:43: error: syntax error before "_gf_log"
logging.h:46: error: syntax error before "int32_t"
logging.h:48: warning: type defaults to `int' in declaration of `_gf_log'
logging.h:48: warning: data definition has no type or storage class
logging.h:49: error: syntax error before "gf_log_init"
logging.h:49: warning: type defaults to `int' in declaration of
`gf_log_init'
logging.h:49: warning: data definition has no type or storage class
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/libglusterfs/src.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/libglusterfs.
*** Error code 1

For a quick hack, I removed
#include "logging.h"
from libglusterfs/src/transport.c

Next try.

Stops at:
 gcc -DPACKAGE_NAME=\"glusterfs\" -DPACKAGE_TARNAME=\"glusterfs\"
-DPACKAGE_VERSION=\"1.3.0-pre3\" "-DPACKAGE_STRING=\"glusterfs
1.3.0-pre3\"" -DPACKAGE_BUGREPORT=\"address@hidden"
-DPACKAGE=\"glusterfs\" -DVERSION=\"1.3.0-pre3\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DYYTEXT_POINTER=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBDL=1 -DHAVE_LIBFUSE=1
-DHAVE_BACKTRACE=1 -I. -I. -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-DXLATORDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/xlator\"
-DSCHEDULERDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/scheduler\"
-DTRANSPORTDIR=\"/usr/local/lib/glusterfs/1.3.0-pre3/transport\"
-DYY_NO_UNPUT -fPIC -Wall -g -shared -nostartfiles -rdynamic
-L/usr/local/lib -L/usr/lib -I/usr/include -I/usr/local/include -MT
libglusterfs_la-epoll.lo -MD -MP -MF .deps/libglusterfs_la-epoll.Tpo -c
epoll.c  -fPIC -DPIC -o .libs/libglusterfs_la-epoll.o
epoll.c:20:23: sys/epoll.h: No such file or directory
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/libglusterfs/src.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/libglusterfs.
*** Error code 1

Ouch, no epoll on !Linux. Configure recognized that, but the epoll stuff
got into the Makefile.

BTW, FreeBSD (not-just-Free BSD) has kqueue, Solaris has /dev/poll,
Linux has epoll and there is libevent, which supports all of these.
Wouldn't be possible to use that? It should give a (more) portable version.

Removed epoll instances from the Makefile, retry:
if gcc -DPACKAGE_NAME=\"glusterfs\" -DPACKAGE_TARNAME=\"glusterfs\"
-DPACKAGE_VERSION=\"1.3.0-pre3\" -DPACKAGE_STRING=\"glusterfs\
1.3.0-pre3\" -DPACKAGE_BUGREPORT=\"address@hidden"
-DPACKAGE=\"glusterfs\" -DVERSION=\"1.3.0-pre3\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DYYTEXT_POINTER=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBDL=1 -DHAVE_LIBFUSE=1
-DHAVE_BACKTRACE=1 -I. -I.     -fPIC -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE -Wall  -I../../../../libglusterfs/src -shared
-nostartfiles -L/usr/local/lib -L/usr/lib -I/usr/include
-I/usr/local/include -MT unify.o -MD -MP -MF ".deps/unify.Tpo" -c -o
unify.o unify.c;  then mv -f ".deps/unify.Tpo" ".deps/unify.Po"; else rm
-f ".deps/unify.Tpo"; exit 1; fi
unify.c: In function `gcd_path':
unify.c:48: warning: implicit declaration of function `strndup'
unify.c:48: warning: pointer/integer type mismatch in conditional expression
unify.c: In function `gf_basename':
unify.c:54: warning: implicit declaration of function `basename'
unify.c:54: warning: initialization makes pointer from integer without a
cast
unify.c: In function `unify_readv':
unify.c:443: error: `EBADFD' undeclared (first use in this function)
unify.c:443: error: (Each undeclared identifier is reported only once
unify.c:443: error: for each function it appears in.)
unify.c: In function `unify_writev':
unify.c:482: error: `EBADFD' undeclared (first use in this function)
unify.c: In function `unify_ftruncate':
unify.c:523: error: `EBADFD' undeclared (first use in this function)
unify.c: In function `unify_fgetattr':
unify.c:561: error: `EBADFD' undeclared (first use in this function)
unify.c: In function `unify_flush':
unify.c:594: error: `EBADFD' undeclared (first use in this function)
unify.c: In function `unify_release':
unify.c:628: error: `EBADFD' undeclared (first use in this function)
unify.c: In function `unify_fsync':
unify.c:665: error: `EBADFD' undeclared (first use in this function)
unify.c: In function `unify_lk':
unify.c:704: error: `EBADFD' undeclared (first use in this function)
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators/cluster/unify/src.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators/cluster/unify.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators/cluster.
*** Error code 1

Erm, not EBADFD, but EBADF. sed it and recompile:
if gcc -DPACKAGE_NAME=\"glusterfs\" -DPACKAGE_TARNAME=\"glusterfs\"
-DPACKAGE_VERSION=\"1.3.0-pre3\" -DPACKAGE_STRING=\"glusterfs\
1.3.0-pre3\" -DPACKAGE_BUGREPORT=\"address@hidden"
-DPACKAGE=\"glusterfs\" -DVERSION=\"1.3.0-pre3\" -DSTDC_HEADERS=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1
-DYYTEXT_POINTER=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBDL=1 -DHAVE_LIBFUSE=1
-DHAVE_BACKTRACE=1 -I. -I.     -fPIC -D_FILE_OFFSET_BITS=64
-D_GNU_SOURCE -Wall  -I../../../../libglusterfs/src -shared
-nostartfiles -L/usr/local/lib -L/usr/lib -I/usr/include
-I/usr/local/include -MT posix.o -MD -MP -MF ".deps/posix.Tpo" -c -o
posix.o posix.c;  then mv -f ".deps/posix.Tpo" ".deps/posix.Po"; else rm
-f ".deps/posix.Tpo"; exit 1; fi
In file included from posix.c:23:
posix.h:6:23: sys/xattr.h: No such file or directory
posix.h:10:27: linux/limits.h: No such file or directory
posix.c: In function `posix_create':
posix.c:405: error: `O_LARGEFILE' undeclared (first use in this function)
posix.c:405: error: (Each undeclared identifier is reported only once
posix.c:405: error: for each function it appears in.)
posix.c: In function `posix_fsync':
posix.c:679: warning: implicit declaration of function `fdatasync'
posix.c: In function `posix_setxattr':
posix.c:710: warning: implicit declaration of function `lsetxattr'
posix.c: In function `posix_getxattr':
posix.c:736: warning: implicit declaration of function `lgetxattr'
posix.c: In function `posix_listxattr':
posix.c:759: warning: implicit declaration of function `llistxattr'
posix.c: In function `posix_removexattr':
posix.c:783: warning: implicit declaration of function `lremovexattr'
posix.c: In function `posix_opendir':
posix.c:808: error: `O_LARGEFILE' undeclared (first use in this function)
posix.c:808: error: `O_DIRECTORY' undeclared (first use in this function)
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators/storage/posix/src.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators/storage/posix.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators/storage.
*** Error code 1

Stop in /src/glusterfs-1.3.0-pre3/xlators.
*** Error code 1

For the extattr stuff, this rsync patch should give some pointers:
http://lists.samba.org/archive/rsync/2006-November/016653.html

O_LARGEFILE and O_DIRECTORY is pretty much Linux related.

That how far I got with this today. :)

Any help/ideas from the developers? It would be really cool to have such
a thing on FreeBSD.

Thanks,


_______________________________________________
Gluster-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/gluster-devel



--
Anand V. Avati




reply via email to

[Prev in Thread] Current Thread [Next in Thread]