gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] Failing to compile on FreeBSD 8.2


From: Kaleb S. KEITHLEY
Subject: Re: [Gluster-devel] Failing to compile on FreeBSD 8.2
Date: Tue, 25 Oct 2011 13:38:07 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0

On 10/25/2011 12:01 PM, Damian Pound wrote:
Initially I just did "./configure; make", but configure didn't enable
the fuse client and make failed because of some operator thing. Then I
found that FreeBSD uses a different make from GNU/Linux, so I installed
gmake, still failed but seemed to have more promising errors. I decided
to try compiling the last version of gluster that supported MacOSX,
2.0.2, that managed to compile, though I haven't tested it since it is 2
years old. I went to get gcc 4.6.0 since there were a lot of changes
since 4.2.1, this made the compile of 2.0.2 and 2.0.9 enable fuse, but
3.1.7 and 3.2.4 still don't enable it. I tried --enable-fuse-client a
few times, but that was either ignored or the configure failed.

I'm not sure this is especially helpful, but I took a (very quick) stab at this using the gcc-4.2.1 that ships with FreeBSD-8.2. The make in FreeBSD works fine actually; I just ran `./configure && make`. I had to make some minor, semi-obvious edits to a few files to get them to compile (diff at the end).

There are a couple of show stoppers though that I did not try to address. One is the linux mount(2)/umount2(2) versus FreeBSD mount(2)/unmount(2) system calls and the /etc/mtab updating; both in contrib/fuse-lib/mount.c. Another is that current Linux distros (Fedora 15 in my case) have a newer version of rpc/xdr than what's in FreeBSD, and specifically FreeBSD's rpc/xdr lacks xdr_sizeof(3).

Emmanuel Dreyfus has been building 3.2.x on NetBSD (or OpenBSD), he may have some advice for you too.

--

Kaleb


*** ./glusterfsd/src/glusterfsd-mgmt.c.orig     Tue Oct 25 10:51:10 2011
--- ./glusterfsd/src/glusterfsd-mgmt.c  Tue Oct 25 10:51:22 2011
***************
*** 21,26 ****
--- 21,27 ----
  #include <sys/types.h>
  #include <sys/wait.h>
  #include <stdlib.h>
+ #include <signal.h>

  #ifndef _CONFIG_H
  #define _CONFIG_H
*** ./rpc/xdr/src/glusterfs3-xdr.c.orig Tue Oct 25 08:58:53 2011
--- ./rpc/xdr/src/glusterfs3-xdr.c      Tue Oct 25 08:59:26 2011
***************
*** 26,31 ****
--- 26,33 ----
  #include "glusterfs3-xdr.h"
  #include "compat.h"

+ #undef d_ino
+
  bool_t
  xdr_gf_statfs (XDR *xdrs, gf_statfs *objp)
  {
*** ./rpc/rpc-transport/socket/src/socket.c.orig        Tue Oct 25 08:58:32 2011
--- ./rpc/rpc-transport/socket/src/socket.c     Tue Oct 25 08:31:42 2011
***************
*** 399,405 ****
                  goto done;

  #ifndef GF_LINUX_HOST_OS
! #ifdef GF_SOLARIS_HOST_OS
          ret = setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive_intvl,
                            sizeof (keepalive_intvl));
  #else
--- 399,405 ----
                  goto done;

  #ifndef GF_LINUX_HOST_OS
! #ifdef SO_KEEPALIVE
          ret = setsockopt (fd, SOL_SOCKET, SO_KEEPALIVE, &keepalive_intvl,
                            sizeof (keepalive_intvl));
  #else
*** ./rpc/rpc-lib/src/xdr-common.h.orig Tue Oct 25 10:57:25 2011
--- ./rpc/rpc-lib/src/xdr-common.h      Tue Oct 25 10:57:48 2011
***************
*** 40,45 ****
--- 40,49 ----
  #define GLUSTER_DUMP_VERSION 1


+ #define xdr_u_quad_t xdr_u_int64_t
+ #define xdr_quad_t   xdr_int64_t
+ #define xdr_uint32_t xdr_u_int32_t
+
  #if GF_DARWIN_HOST_OS
  #define xdr_u_quad_t xdr_u_int64_t
  #define xdr_quad_t   xdr_int64_t
*** ./xlators/mount/fuse/src/fuse-bridge.h.orig Tue Oct 25 09:51:33 2011
--- ./xlators/mount/fuse/src/fuse-bridge.h      Tue Oct 25 09:52:26 2011
***************
*** 61,66 ****
--- 61,67 ----
  #ifdef GF_DARWIN_HOST_OS
  #define FUSE_OP_HIGH (FUSE_DESTROY + 1)
  #endif
+ #define FUSE_OP_HIGH (FUSE_DESTROY + 1)
  #define GLUSTERFS_XATTR_LEN_MAX  65536

  #define MAX_FUSE_PROC_DELAY 1
*** ./xlators/mount/fuse/src/fuse-bridge.c.orig Tue Oct 25 09:09:59 2011
--- ./xlators/mount/fuse/src/fuse-bridge.c      Tue Oct 25 09:10:24 2011
***************
*** 30,35 ****
--- 30,36 ----
  static int gf_fuse_conn_err_log;
  static int gf_fuse_xattr_enotsup_log;

+ #define ENODATA ENOATTR

  /*
   * iov_out should contain a fuse_out_header at zeroth position.



reply via email to

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