Description:
Compiling 6.0.4-alpha fails on FreeBSD
How to repeat:
Use 6.0-main tree and try to compile on a FreeBSD machine. I used
BUILD/compile-amd64-max
...
...
...
if ccache gcc -DHAVE_CONFIG_H -DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD -I. -I. -I../../../../../include -I../../../../../storage/ndb/src/mgmapi -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../storage/ndb/src/kernel/vm -I../../../../../storage/ndb/src/kernel/error -I../../../../../storage/ndb/src/kernel -I../../../../../storage/ndb/include/kernel -I../../../../../storage/ndb/include/transporter -I../../../../../storage/ndb/include/debugger -I../../../../../storage/ndb/include/mgmapi -I../../../../../storage/ndb/include/mgmcommon -I../../../../../storage/ndb/include/ndbapi -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -g -DSAFE_MUTEX -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 -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1 -Wuninitialized -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -MT FastScheduler.o -MD -MP -MF ".deps/FastScheduler.Tpo" -c -o FastScheduler.o FastScheduler.cpp; \
then mv -f ".deps/FastScheduler.Tpo" ".deps/FastScheduler.Po"; else rm -f ".deps/FastScheduler.Tpo"; exit 1; fi
if ccache gcc -DHAVE_CONFIG_H -DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD -I. -I. -I../../../../../include -I../../../../../storage/ndb/src/mgmapi -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../storage/ndb/src/kernel/vm -I../../../../../storage/ndb/src/kernel/error -I../../../../../storage/ndb/src/kernel -I../../../../../storage/ndb/include/kernel -I../../../../../storage/ndb/include/transporter -I../../../../../storage/ndb/include/debugger -I../../../../../storage/ndb/include/mgmapi -I../../../../../storage/ndb/include/mgmcommon -I../../../../../storage/ndb/include/ndbapi -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -g -DSAFE_MUTEX -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 -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1 -Wuninitialized -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -MT TimeQueue.o -MD -MP -MF ".deps/TimeQueue.Tpo" -c -o TimeQueue.o TimeQueue.cpp; \
then mv -f ".deps/TimeQueue.Tpo" ".deps/TimeQueue.Po"; else rm -f ".deps/TimeQueue.Tpo"; exit 1; fi
if ccache gcc -DHAVE_CONFIG_H -DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD -I. -I. -I../../../../../include -I../../../../../storage/ndb/src/mgmapi -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../storage/ndb/src/kernel/vm -I../../../../../storage/ndb/src/kernel/error -I../../../../../storage/ndb/src/kernel -I../../../../../storage/ndb/include/kernel -I../../../../../storage/ndb/include/transporter -I../../../../../storage/ndb/include/debugger -I../../../../../storage/ndb/include/mgmapi -I../../../../../storage/ndb/include/mgmcommon -I../../../../../storage/ndb/include/ndbapi -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -g -DSAFE_MUTEX -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 -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1 -Wuninitialized -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -MT VMSignal.o -MD -MP -MF ".deps/VMSignal.Tpo" -c -o VMSignal.o VMSignal.cpp; \
then mv -f ".deps/VMSignal.Tpo" ".deps/VMSignal.Po"; else rm -f ".deps/VMSignal.Tpo"; exit 1; fi
if ccache gcc -DHAVE_CONFIG_H -DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD -I. -I. -I../../../../../include -I../../../../../storage/ndb/src/mgmapi -I. -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../include -I../../../../../storage/ndb/include -I../../../../../storage/ndb/src/kernel/vm -I../../../../../storage/ndb/src/kernel/error -I../../../../../storage/ndb/src/kernel -I../../../../../storage/ndb/include/kernel -I../../../../../storage/ndb/include/transporter -I../../../../../storage/ndb/include/debugger -I../../../../../storage/ndb/include/mgmapi -I../../../../../storage/ndb/include/mgmcommon -I../../../../../storage/ndb/include/ndbapi -I../../../../../storage/ndb/include/util -I../../../../../storage/ndb/include/portlib -I../../../../../storage/ndb/include/logger -g -DSAFE_MUTEX -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 -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1 -Wuninitialized -fno-implicit-templates -fno-exceptions -fno-rtti -DMYSQLD_NET_RETRY_COUNT=1000000 -MT ThreadConfig.o -MD -MP -MF ".deps/ThreadConfig.Tpo" -c -o ThreadConfig.o ThreadConfig.cpp; \
then mv -f ".deps/ThreadConfig.Tpo" ".deps/ThreadConfig.Po"; else rm -f ".deps/ThreadConfig.Tpo"; exit 1; fi
In file included from ./SimulatedBlock.hpp:56,
from FastScheduler.hpp:23,
from FastScheduler.cpp:16:
./ndbd_malloc_impl.hpp:76: error: expected `)' before '/' token
gmake[5]: *** [FastScheduler.o] Error 1
gmake[5]: *** Waiting for unfinished jobs....
In file included from ./SimulatedBlock.hpp:56,
from ./FastScheduler.hpp:23,
from TimeQueue.cpp:19:
./ndbd_malloc_impl.hpp:76: error: expected `)' before '/' token
gmake[5]: *** [TimeQueue.o] Error 1
In file included from ./SimulatedBlock.hpp:56,
from FastScheduler.hpp:23,
from ThreadConfig.cpp:21:
./ndbd_malloc_impl.hpp:76: error: expected `)' before '/' token
gmake[5]: *** [ThreadConfig.o] Error 1
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/usr/home/mysqldev/mysql-6.0.4-alpha/storage/ndb/src/kernel'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/home/mysqldev/mysql-6.0.4-alpha/storage/ndb/src'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/usr/home/mysqldev/mysql-6.0.4-alpha/storage/ndb'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/mysqldev/mysql-6.0.4-alpha/storage'
gmake: *** [all-recursive] Error 1
real 7m39.107s
user 3m0.427s
sys 3m52.565s
mysqldev@bsd60-64$ In file included from SimulatedBlock.hpp:56,
from SimulatedBlock.cpp:18:
ndbd_malloc_impl.hpp:76: error: expected `)' before '/' token
Suggested fix:
FreeBSD has no log2() and therefore http://lists.mysql.com/commits/32039 uses a macro for log2() instead. However, it looks like that NDB defines a log2() function, too.