Bug #34046 compiling of MySQL failed at ndb section
Submitted: 24 Jan 23:45 Modified: 12 Mar 10:42
Reporter: Susanne Ebrecht
Status: Closed
Category:Server: Cluster Severity:S1 (Critical)
Version:6.0-bk OS:FreeBSD (7.0 amd64)
Assigned to: Pekka Nousiainen Target Version:6.0
Triage: D1 (Critical)

[24 Jan 23:45] Susanne Ebrecht
Description:
I tried to compile MySQL 6.0-bk on FreeBSD.

gcc:
$ gcc --version
gcc (GCC) 3.4.6 [FreeBSD] 20060825

Seems, my system is speaking German. FYI: Fehler == Error

My steps:

1) get the source code under Ubuntu (because there is no bitkeeper for Freebsd amd64)
2) tar gz the source
3) copy the source to FreeBSD (with mount -t ext2fs)
4) de-tar-gz the source
5) change rights
6) change into the right directory
7) ./BUILD/compile-amd64-debug-max --prefix=/usr/home/miracee/mysql60bk -c
8) gmake

gmake[5]: Entering directory `/usr/home/miracee/mysql60bksrc/storage/ndb/src/kernel/vm'
if 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 SimulatedBlock.o -MD -MP
-MF ".deps/SimulatedBlock.Tpo" -c -o SimulatedBlock.o SimulatedBlock.cpp; \
        then mv -f ".deps/SimulatedBlock.Tpo" ".deps/SimulatedBlock.Po"; else rm -f
".deps/SimulatedBlock.Tpo"; exit 1; fi
In file included from SimulatedBlock.hpp:56,
                 from SimulatedBlock.cpp:18:
ndbd_malloc_impl.hpp:76: error: expected `)' before '/' token
gmake[5]: *** [SimulatedBlock.o] Fehler 1
gmake[5]: Leaving directory `/usr/home/miracee/mysql60bksrc/storage/ndb/src/kernel/vm'
gmake[4]: *** [all-recursive] Fehler 1
gmake[4]: Leaving directory `/usr/home/miracee/mysql60bksrc/storage/ndb/src/kernel'
gmake[3]: *** [all-recursive] Fehler 1
gmake[3]: Leaving directory `/usr/home/miracee/mysql60bksrc/storage/ndb/src'
gmake[2]: *** [all-recursive] Fehler 1
gmake[2]: Leaving directory `/usr/home/miracee/mysql60bksrc/storage/ndb'
gmake[1]: *** [all-recursive] Fehler 1
gmake[1]: Leaving directory `/usr/home/miracee/mysql60bksrc/storage'
gmake: *** [all-recursive] Fehler 1

Of course, I will get the same error again, when I execute: $ gmake install

When I switch to my MySQL directory:

$ ./bin/mysql_install_db

FATAL ERROR: Could not find /usr/home/miracee/mysql60bk/libexec/mysqld

How to repeat:
look above

Suggested fix:
I am pretty sure, this is not an installation issues. This is a ndb issue.
I would say: fix the source
[28 Jan 14:48] 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/41304

ChangeSet@1.2665, 2008-01-28 14:48:09+01:00, pekka@sama.ndb.mysql.com +3 -0
  ndb - bug#34046 - rename Ndbd_mem_manager::log2 to ndb_log2
[12 Feb 15:30] Jon Stephens
Documented bugfix in 5.1.23-ndb-6.3.9 changelog as follows:

        When configured with NDB support, MySQL failed to compile on
        64-bit FreeBSD systems.

Left bug in PP status pending additional merges.
[12 Feb 17:06] Jon Stephens
Also documented for 5.1.23-ndb-6.1.12.
[20 Feb 17:03] Bugs System
Pushed into 5.1.24-rc
[20 Feb 17:03] Bugs System
Pushed into 6.0.5-alpha
[28 Feb 9:19] Jon Stephens
Also documented for 5.1.24 and 6.0.5. Closed.

See also Bug #32175.
[7 Mar 13:31] Susanne Ebrecht
Still not fixed at MySQL 6.0 bk tree from 2008-03-07 4:30 CET (CET==UTC+1)

$ gmake SimulatedBlock.o
if 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 SimulatedBlock.o -MD -MP
-MF ".deps/SimulatedBlock.Tpo" -c -o SimulatedBlock.o SimulatedBlock.cpp; \
        then mv -f ".deps/SimulatedBlock.Tpo" ".deps/SimulatedBlock.Po"; else rm -f
".deps/SimulatedBlock.Tpo"; exit 1; fi
In file included from SimulatedBlock.hpp:56,
                 from SimulatedBlock.cpp:18:
ndbd_malloc_impl.hpp:76: error: expected `)' before '/' token
...
[12 Mar 9:50] Susanne Ebrecht
Jon,

please close this bug its working now.
[12 Mar 10:42] Jon Stephens
Restored changelog entry per discussion with Susanne; closed.