Bug #31895 Cannot compile NDB on OS X Leopard
Submitted: 27 Oct 2007 19:14 Modified: 14 Dec 2007 13:35
Reporter: John David Duncan Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.1.22-rc OS:MacOS (OS X 10.5 intel)
Assigned to: Georgi Kodinov CPU Architecture:Any

[27 Oct 2007 19:14] John David Duncan
Description:
Fail to build 5.1.22 with NDB on OS X 10.5 "Leopard"

./configure --with-plugin-ndbcluster 
make

... 

if /bin/sh ../../../../../libtool --preserve-dup-deps --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -DNDEBUG   -I. -I. -I../../../../../include  -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../mysys -I../../../../../storage/ndb/include -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger    -O    -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL -MT NdbThread.lo -MD -MP -MF ".deps/NdbThread.Tpo" -c -o NdbThread.lo NdbThread.c; \
	then mv -f ".deps/NdbThread.Tpo" ".deps/NdbThread.Plo"; else rm -f ".deps/NdbThread.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -DNDEBUG -I. -I. -I../../../../../include -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../mysys -I../../../../../storage/ndb/include -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -O -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL -MT NdbThread.lo -MD -MP -MF .deps/NdbThread.Tpo -c NdbThread.c  -fno-common -DPIC -o .libs/NdbThread.o

NdbThread.c:41: error: conflicting types for 'NdbThread_set_shm_sigmask'

../../../../../storage/ndb/include/portlib/NdbThread.h:44: error: previous declaration of 'NdbThread_set_shm_sigmask' was here

make[5]: *** [NdbThread.lo] Error 1

How to repeat:
./configure --with-plugin-ndbcluster 
make
[27 Oct 2007 21:20] Daniel Fischer
I fixed this exact problem in the -build team trees about one month ago.
[31 Oct 2007 4:55] John David Duncan
The problem is a conflict between "my_bool" in NdbThread.c vs.  "bool" in NdbThread.h
[6 Nov 2007 13:58] Georgi Kodinov
I've used a fresh Leopard install, a fresh Xcode 3.0 install (and nothing but : no fink for example) and was able to compile 5.1-opt from bk (including NDB) without any problems. I've used BUILD/compile-pentium-debug-max.

Can you please retry using the BK sources and also specify what versions of the build tools are you using.
[6 Nov 2007 20:25] John David Duncan
Yes, 5.1-opt from bk works OK for me.
[14 Dec 2007 13:35] Georgi Kodinov
Closing based on the feedback from Danny and John.