Bug #11836 ld32: FATAL 11 : Object file format error (../../../ndb/src/.libs/libndbclien
Submitted: 9 Jul 2005 16:17 Modified: 5 Aug 2006 11:10
Reporter: Joerg Behrens Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:Mysql 5.0.24 OS:Other (IRIX-6.5.28)
Assigned to: CPU Architecture:Any
Tags: cluster, IRIX, ndb

[9 Jul 2005 16:17] Joerg Behrens
Description:
Compiling with  --with-ndbcluster brings the following

Making all in mgmsrv
gmake[4]: Entering directory `/raids/strip2/MIPS/mysql-5.0.7-beta/ndb/src/mgmsrv'
/bin/sh ../../../libtool --preserve-dup-deps --mode=link CC  -O3 -DDBUG_OFF -O3 -mips4 -Wl,-rpath -Wl,/usr/nekoware/lib -I/usr/nekoware/include -OPT:Olimit=0:roundoff=3  -TARG:platform=IP27:proc=r10000 -LANG:exceptions=OFF -LANG:std=OFF -LANG:libc_in_namespace_std=OFF   -D_BOOL    -L/usr/nekoware/lib -rpath /usr/nekoware/lib  -o ndb_mgmd -static MgmtSrvr.o MgmtSrvrGeneralSignalHandling.o main.o Services.o convertStrToInt.o SignalQueue.o MgmtSrvrConfig.o ConfigInfo.o InitConfigFileParser.o Config.o ../../../ndb/src/common/portlib/gcc.cpp ../../../ndb/src/mgmclient/CommandInterpreter.o ../../../ndb/src/libndbclient.la ../../../dbug/libdbug.a ../../../mysys/libmysys.a ../../../strings/libmystrings.a -lreadline -lncurses -lpthread -lgen -lnsl -lm  -lpthread
CC -O3 -DDBUG_OFF -O3 -mips4 -Wl,-rpath -Wl,/usr/nekoware/lib -I/usr/nekoware/include -OPT:Olimit=0:roundoff=3 -TARG:platform=IP27:proc=r10000 -LANG:exceptions=OFF -LANG:std=OFF -LANG:libc_in_namespace_std=OFF -D_BOOL -o ndb_mgmd MgmtSrvr.o MgmtSrvrGeneralSignalHandling.o main.o Services.o convertStrToInt.o SignalQueue.o MgmtSrvrConfig.o ConfigInfo.o InitConfigFileParser.o Config.o ../../../ndb/src/common/portlib/gcc.cpp ../../../ndb/src/mgmclient/CommandInterpreter.o  -L/usr/nekoware/lib ../../../ndb/src/.libs/libndbclient.a /usr2/MIPS/mysql-5.0.7-beta/ndb/src/ndbapi/.libs/libndbapi.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/transporter/.libs/libtransporter.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/debugger/.libs/libtrace.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/debugger/signaldata/.libs/libsignaldataprint.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/mgmapi/.libs/libmgmapi.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/mgmcommon/.libs/libmgmsrvcommon.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/logger/.libs/liblogger.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/portlib/.libs/libportlib.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.7-beta/ndb/src/common/util/.libs/libgeneral.a -lpthread -lpthread -lpthread -lpthread ../../../dbug/libdbug.a ../../../mysys/libmysys.a ../../../strings/libmystrings.a -lreadline -lncurses -lpthread -lgen -lnsl -lm -lpthread -Wl,-rpath -Wl,/usr/nekoware/lib
ld32: FATAL   11 : Object file format error (../../../ndb/src/.libs/libndbclient.a): invalid header
gmake[4]: *** [ndb_mgmd] Fehler 2
gmake[4]: Leaving directory `/raids/strip2/MIPS/mysql-5.0.7-beta/ndb/src/mgmsrv'

[o2k]: $ cat ndb/src/.libs/libndbclient.a
!<arch>

How to repeat:
Compile with --with-ndbcluster support on the IRIX plattform using MIPS CC compiler.
[2 Sep 2005 12:18] Valeriy Kravchuk
Please, try the newer 5.0.11-beta version. I've just finished compiling it on octane2 - successfully. The following steps were performed:

gunzip < mysql-5.0.11-beta.tar.gz | tar -xvf -

cd mysql-5.0.11-beta

CC=cc CXX=CC CFLAGS="-O3 -c99 -OPT:Olimit=0" CXXFLAGS="-O3  -c99 -OPT:Olimit=0 -LANG:exceptions=OFF -LANG:std=ON -LANG:libc_in_namespace_std=OFF"  ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --libexecdir=/usr/local/mysql/bin --with-comment="MySQL Community Edition - Experimental (GPL)" --with-extra-charsets=complex --with-server-suffix="-max" --enable-thread-safe-client --enable-local-infile  --disable-shared --with-big-tables --with-readline --with-archive-storage-engine --with-blackhole-storage-engine --with-ndbcluster --with-csv-storage-engine --with-example-storage-engine --with-federated-storage-engine --with-innodb

gmake

-bash-2.05b$ sql/mysqld --version
sql/mysqld  Ver 5.0.11-beta-max for sgi-irix6.5 on mips (MySQL Community Edition - Experimental (GPL))

This is similar to how official -max binaries are built. Note the --with-ndbcluster among options.

-bash-2.05b$ uname -a
IRIX64 octane2 6.5 07080050 IP30
-bash-2.05b$ cc -v
MIPSpro Compilers: Version 7.41
[5 Aug 2006 10:33] Joerg Behrens
When compiling the recent version (same for latest snapshot) with the configure
option --with-ndbcluster and --without-ndb-debugt the same error occours.

CC -DDBUG_OFF -O3 -mips4 -I/usr/nekoware/include -OPT:Olimit=0:roundoff=3 -TARG:platform=IP27:proc=r10000 -LANG:exceptions=OFF -LANG:std=OFF -LANG:libc_in_namespace_std=OFF -D_BOOL -o ndb_mgmd MgmtSrvr.o MgmtSrvrGeneralSignalHandling.o main.o Services.o convertStrToInt.o SignalQueue.o MgmtSrvrConfig.o ConfigInfo.o InitConfigFileParser.o Config.o ../../../ndb/src/mgmclient/CommandInterpreter.o  -L/usr/nekoware/lib ../../../ndb/src/.libs/libndbclient.a -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/ndbapi/.libs/libndbapi.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/transporter/.libs/libtransporter.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/debugger/.libs/libtrace.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/debugger/signaldata/.libs/libsignaldataprint.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/mgmapi/.libs/libmgmapi.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/mgmcommon/.libs/libmgmsrvcommon.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/logger/.libs/liblogger.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/portlib/.libs/libportlib.a -lpthread -lpthread -lpthread -lpthread /usr2/MIPS/mysql-5.0.24/ndb/src/common/util/.libs/libgeneral.a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread ../../../dbug/libdbug.a ../../../mysys/libmysys.a ../../../strings/libmystrings.a ../../../cmd-line-utils/libedit/libedit.a -lncurses -lpthread -lgen -lnsl -lm -lpthread -Wl,-rpath -Wl,/usr/nekoware/lib
ld32: FATAL   11 : Object file format error (../../../ndb/src/.libs/libndbclient.a): invalid header
gmake[4]: *** [ndb_mgmd] Fehler 2
gmake[4]: Leaving directory `/raids/strip2/MIPS/mysql-5.0.24/ndb/src/mgmsrv'

Taking a look into the directory and to the archive  the file looks garbage.

ll ndb/src/.libs/
insgesamt 8
-rw-r--r--    1 root     sys             8  5. Aug  13:42 libndbclient.a
lrwxr-xr-x    1 root     sys            18  5. Aug  13:42 libndbclient.la -> ../libndbclient.la
-rw-r--r--    1 root     sys          1580  5. Aug  13:42 libndbclient.lai
lrwxr-xr-x    1 root     sys            19  5. Aug  13:42 libndbclient.so -> libndbclient.so.1.0
lrwxr-xr-x    1 root     sys            19  5. Aug  13:42 libndbclient.so.1 -> libndbclient.so.1.0
[o2k]:/usr2/MIPS/mysql-5.0.24 $ cat ndb/src/.libs/libndbclient.a
!<arch>

export CC=c99
export CFLAGS='-O3 -mips4  -I/usr/nekoware/include -OPT:Olimit=0:roundoff=3  -TARG:platform=IP27:proc=r10000'
export CXXFLAGS="$CFLAGS -LANG:exceptions=OFF -LANG:std=OFF -LANG:libc_in_namespace_std=OFF"
export CPPFLAGS='-I/usr/nekoware/include'
export CXX=CC
export F77=f77
export LDFLAGS='-L/usr/nekoware/lib'

./configure --prefix=/usr/nekoware/mysql5  --with-extra-charsets=complex --enable-thread-safe-client --with-unix-socket-path=/usr/nekoware/var/run/mysql5/mysql.sock --without-extra-tools --disable-dependency-tracking  --with-mysqlmanager=no --with-ndbcluster --without-ndb-debug; gmake

Btw, parts of the ndb source (ndb/src/mgmsrv/MgmtSrvr.cpp)  are also effected to http://bugs.mysql.com/bug.php?id=14995

regards
Joerg
[5 Aug 2006 11:10] Joerg Behrens
Ok, when switching to another build machine the problem went away (scratching head?)