Bug 919916

Summary: glusterd compilation failure on OSX due to AT_SYMLINK_NOFOLLOW
Product: [Community] GlusterFS Reporter: Justin Clift <jclift>
Component: buildAssignee: Harshavardhana <fharshav>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: medium    
Version: mainlineCC: cww, fharshav, gluster-bugs, kwade, ndevos, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-11 15:44:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Justin Clift 2013-03-10 21:34:22 UTC
Description of problem:

  Compiling Gluster master on MacOS X 10.7 fails at present, due
  to use of "AT_SYMLINK_NOFOLLOW" const with fstatat().

  Neither fstatat() nor AT_SYMLINK_NOFOLLOW are present in OSX.


Version-Release number of selected component (if applicable):

  git upstream master head, as of Sun 10th March 2013


How reproducible:

  Every time.


Steps to Reproduce:
  1. git clone the upstream repo
  2. ./autogen.sh; ./configure --disable-fuse-client; make

  
Actual results:

  $ make
  <lengthly compilation log snipped>
  glusterd.c: In function 'check_prepare_mountbroker_root':
  glusterd.c:732: warning: implicit declaration of function 'openat'
  glusterd.c:767: warning: implicit declaration of function 'mkdirat'
  glusterd.c:771: warning: implicit declaration of function 'fstatat'
  glusterd.c:771: error: 'AT_SYMLINK_NOFOLLOW' undeclared (first use in this function)
  glusterd.c:771: error: (Each undeclared identifier is reported only once
  glusterd.c:771: error: for each function it appears in.)
  make[5]: *** [glusterd_la-glusterd.lo] Error 1
  make[4]: *** [all-recursive] Error 1
  make[3]: *** [all-recursive] Error 1
  make[2]: *** [all-recursive] Error 1
  make[1]: *** [all-recursive] Error 1
  make: *** [all] Error 2


Expected results:

  Compiling to succeed.


Additional info:

Comment 1 Justin Clift 2013-03-11 01:06:22 UTC
This might be interesting.  Someone has made an implementation of these functions for OSX for another project:

  https://github.com/anatol/tup/blob/master/src/compat/macosx.h

They're GPL-2 licensed, but the author may be willing to let us re-use them anyway if we ask.  Someone (more skilled than me) should check his implementation is good first though. :)

Comment 2 Justin Clift 2013-03-11 15:27:29 UTC
It seems there are a few *at() functions used in glusterd.c, that aren't portable to other OS's.

Gnulib provides a version of them that should work, though we'd need to chat with Eric Blake (Red Hat) and Jim Meyering (ex-Red Hat) to see if something could be worked out for the licensing. (unsure)

Comment 5 Harshavardhana 2014-04-04 08:53:50 UTC
Port being finished at - https://forge.gluster.org/~schafdog/glusterfs-core/osx-glusterfs

Currently working components

- GlusterFS server (brick export)
- GlusterD management 
- Gluster CLI
- GlusterFS FUSE (OSXFUSE, unsure about stability just yet)
- GlusterNFS server without NLM

Rest are not working/tested

Comment 6 Justin Clift 2014-04-04 17:01:40 UTC
Do you feel it's a good time for us to ask the Community to test it?

eg broadcast on Twitter, blog, mailing list, etc

Comment 7 Niels de Vos 2014-07-11 15:44:18 UTC

*** This bug has been marked as a duplicate of bug 1089172 ***