Bug 920369

Summary: Compilation failure on OSX due to missing pthread.h include
Product: [Community] GlusterFS Reporter: Justin Clift <jclift>
Component: buildAssignee: Amar Tumballi <amarts>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: unspecified    
Version: mainlineCC: gluster-bugs, kwade, vraman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Mac OS   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 17:32:58 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-11 22:18:47 UTC
Description of problem:

  Compiling on OSX fails at present (git master head) due to a missing <pthread.h> include in logging.h.

  glibtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_DARWIN_HOST_OS -I../../../libglusterfs/src -I../../../contrib/uuid -I../../../libglusterfs/src -I../../../rpc/xdr/src -DRPC_TRANSPORTDIR=\"/usr/local/lib/glusterfs/3git/rpc-transport\" -Wall -I../../../argp-standalone -D__DARWIN_64_BIT_INO_T -bundle -undefined suppress -flat_namespace -D_XOPEN_SOURCE -O0 -DTHREAD_UNSAFE_BASENAME -DTHREAD_UNSAFE_DIRNAME -O2 -g -Wformat -Werror=format-security -MT auth-glusterfs.lo -MD -MP -MF .deps/auth-glusterfs.Tpo -c auth-glusterfs.c  -fno-common -DPIC -o .libs/auth-glusterfs.o
In file included from rpc-transport.c:23:
../../../libglusterfs/src/logging.h:63: error: expected specifier-qualifier-list before 'pthread_mutex_t'


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

  upstream git, master branch, head as of Mon 11th March 2013


How reproducible:

  Every time.


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

  
Actual results:

  glibtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../.. -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DGF_DARWIN_HOST_OS -I../../../libglusterfs/src -I../../../contrib/uuid -I../../../libglusterfs/src -I../../../rpc/xdr/src -DRPC_TRANSPORTDIR=\"/usr/local/lib/glusterfs/3git/rpc-transport\" -Wall -I../../../argp-standalone -D__DARWIN_64_BIT_INO_T -bundle -undefined suppress -flat_namespace -D_XOPEN_SOURCE -O0 -DTHREAD_UNSAFE_BASENAME -DTHREAD_UNSAFE_DIRNAME -O2 -g -Wformat -Werror=format-security -MT auth-glusterfs.lo -MD -MP -MF .deps/auth-glusterfs.Tpo -c auth-glusterfs.c  -fno-common -DPIC -o .libs/auth-glusterfs.o
  In file included from rpc-transport.c:23:
  ../../../libglusterfs/src/logging.h:63: error: expected specifier-qualifier-list before 'pthread_mutex_t'


Expected results:

  Compilation to succeed.

Additional info:

Comment 1 Justin Clift 2013-03-11 22:29:21 UTC
Initial fix for review:

  http://review.gluster.org/4653

Comment 2 Vijay Bellur 2013-03-12 15:09:54 UTC
CHANGE: http://review.gluster.org/4653 (Add missing pthread.h include to logging.h) merged in master by Vijay Bellur (vbellur)