Bug #32175 Compile failure on FreeBSD with NDB

Submitted: 7 Nov 2007 22:51 Modified: 27 Feb 2008 13:14
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:6.0.4-alpha OS:FreeBSD
Assigned to: Magnus Blåudd CPU Architecture:Any

[7 Nov 2007 22:51] Hakan Küçükyılmaz
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.
[9 Nov 2007 10:37] Hakan Küçükyılmaz
Set to S1, because no workaround for the compile failure.
[9 Nov 2007 14:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/37441

ChangeSet@1.2657, 2007-11-09 15:25:24+01:00, msvensson@pilot.mysql.com +3 -0
  Bug#32175 Compile failure on FreeBSD with NDB
   - Add mysys/my_log.c
   - Change "#define log2" into function prototype "double log2(double)"
[12 Feb 2008 17:33] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/42120

ChangeSet@1.2657, 2008-02-12 18:33:24+01:00, msvensson@pilot.mysql.com +3 -0
  Bug#32175 Compile failure on FreeBSD with NDB
[20 Feb 2008 16:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/42668

ChangeSet@1.2557, 2008-02-20 17:02:14+01:00, msvensson@pilot.mysql.com +1 -0
  Bug#32175 Compile failure on FreeBSD with NDB
[25 Feb 2008 16:04] Bugs System
Pushed into 6.0.5-alpha
[27 Feb 2008 13:14] Jon Stephens
Documented fix in the 6.0.5 changelog as follows:

        The server failed to compile with NDB support
        on FreeBSD.
[28 Feb 2008 8:12] Jon Stephens
See also Bug#34046.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.062 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.