Bug #34095 Falcon: compile fails on Mac OS X/Intel and Mac OS X/PPC
Submitted: 27 Jan 2008 20:00 Modified: 5 May 2008 17:14
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:mysql-6.0-falcon-team OS:MacOS (Intel/PPC)
Assigned to: Antony Curtis CPU Architecture:Any

[27 Jan 2008 20:00] Hakan Küçükyılmaz
Description:
Falcon: compile fails on Mac OS X/Intel and Mac OS X/PPC due to missing clock_gettime().

How to repeat:
BUILD/compile-pentium-debug-max-no-ndb

if gcc -DHAVE_CONFIG_H -D_REENTRANT -D_PTHREADS -DENGINE -DSTORAGE_ENGINE -DNAMESPACE=Nfs -I. -I. -I../../include -I../../include -I../../include -I../../regex -I../../sql -I. -I./TransformLib     -g -DSAFE_MUTEX -DSAFEMALLOC -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mtune=pentium-m -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS  -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX   -fno-implicit-templates -fno-exceptions -fno-rtti -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT  -DDONT_DECLARE_CXA_PURE_VIRTUAL -fimplicit-templates -Wno-invalid-offsetof -fexceptions -D_DEBUG -DMEM_DEBUG -MT libhafalcon_a-Synchronize.o -MD -MP -MF ".deps/libhafalcon_a-Synchronize.Tpo" -c -o libhafalcon_a-Synchronize.o `test -f 'Synchronize.cpp' || echo './'`Synchronize.cpp; \
then mv -f ".deps/libhafalcon_a-Synchronize.Tpo" ".deps/libhafalcon_a-Synchronize.Po"; else rm -f ".deps/libhafalcon_a-Synchronize.Tpo"; exit 1; fi
Synchronize.cpp: In member function 'virtual bool Synchronize::sleep(int)':
Synchronize.cpp:142: error: 'CLOCK_REALTIME' was not declared in this scope
Synchronize.cpp:142: error: 'clock_gettime' was not declared in this scope
make[3]: *** [libhafalcon_a-Synchronize.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1

Suggested fix:
Use workaround on platforms where clock_gettime() is not available.
[29 Jan 2008 8:06] Sveta Smirnova
Thank you for the report.

Verified as described.
[29 Jan 2008 11:42] Hakan Küçükyılmaz
Patch is here:
http://lists.mysql.com/commits/41336
[29 Jan 2008 14:44] Kevin Lewis
Code looks good to me and Sveta confirms that it compiles.  Antony, please comment on the actually resolution you can expect to get on the MAC with this code.
[29 Jan 2008 14:52] Kevin Lewis
Antony, Please push this change to mysql-6.0-falcon-team today.  It is a fix to a change that was introduced just last week by Jim to get higher resolution in wait times.  The falcon-team tree is currently dedicated to changes for the 6.0.4 release, and this needs to be in it.
[29 Jan 2008 15:18] Hakan Küçükyılmaz
I can verify that Falcon compiles with Antony's patch on Mac OS X on PPC. All Falcon related tests do pass now.
[29 Jan 2008 17:23] Antony Curtis
Pushed to 6.0-falcon-team repository.
Fix should work for other Unix-alike platforms which have not implemented POSIX_TIMERS api.
[11 Feb 2008 20:53] Kevin Lewis
Patch is in mysql-6.0-falcon-team and mysql-6.0-release version 6.0.4
[5 May 2008 17:14] Paul DuBois
Noted in 6.0.4 changelog.

Falcon did not compile on Mac OS X/Intel or Mac OS X/PPC.