Bug #11799 BUILD/compile-irix-mips64-mipspro does not work as expected
Submitted: 7 Jul 2005 22:07 Modified: 12 Dec 2009 15:36
Reporter: Joerg Behrens Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1.14 OS:Other (IRIX)
Assigned to: CPU Architecture:Any

[7 Jul 2005 22:07] Joerg Behrens
Description:
Both MySql version failed to build on the IRIX platform when  enable --with-ndbcluster on the configure. Its the latest MIPS CC 7.4.3

ld32: FATAL   9  : I/O error (gcc.o): No such file or directory
gmake[3]: *** [ndb_drop_index] Fehler 2
gmake[3]: Leaving directory `/raids/strip2/MIPS/mysql-4.1.12/ndb/tools'
gmake[2]: *** [all-recursive] Fehler 1
gmake[2]: Leaving directory `/raids/strip2/MIPS/mysql-4.1.12/ndb'
gmake[1]: *** [all-recursive] Fehler 1
gmake[1]: Leaving directory `/raids/strip2/MIPS/mysql-4.1.12'

The difference between both builds are that for the mysql4  the gmake runs to the end without after starting  gmake  again.  The mysql5 stops with some unresolved symbols.

ld32: FATAL   11 : Object file format error (gcc.o): file is empty.
gmake[3]: *** [ndb_show_tables] Fehler 2
..
gmake 
ld32: ERROR   33 : Unresolved text symbol "NdbDictionary::Table::equal(const NdbDictionary::Table&) const" -- 1st referenced by bank/libbank.a(BankLoad.o).
gmake[5]: *** [testBackup] Fehler 2
gmake[5]: Leaving directory `/raids/strip2/MIPS/mysql-5.0.7-beta/ndb/test/ndbapi'

Without all the --with-ndb* both builds wents fine.

[o2k]:/ $ uname -Ra
IRIX64 o2k 6.5 6.5.27m 01062343 IP27
[o2k]:/ $ cc -version
MIPSpro Compilers: Version 7.4.3m

regards
Joerg

How to repeat:
./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 --without-debug --sysconfdir=/usr/nekoware/etc/mysql5 --without-readline --with-big-tables --with-openssl=/usr/nekoware --with-ndbcluster --with-mysqlmanager --with-zlib-dir=/usr/nekoware --with-ndb-test

gmake -j
[29 Aug 2005 13:01] Valeriy Kravchuk
According to the manual (http://dev.mysql.com/doc/mysql/en/mysql-binaries.html) standard binaries are compiled for IRIX using the following options:

CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"

./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --disable-shared

:)

I'll try to compile 4.1.14 sources on octane2 with your configure options. By the way, it is:

-bash-2.05b$ cc -version
MIPSpro Compilers: Version 7.41
-bash-2.05b$ uname -Ra
IRIX64 octane2 6.5 6.5.25m 07080050 IP30
[29 Aug 2005 14:22] Joerg Behrens
I bet my 32 way origin that you havent use this FLAGS that shown above with 'your' compiler ;)
The mips cc dont understand GCC flags in general. Maybe you have used the GCC compiler which is installed under /usr/freeware/bin/gcc -v on your machine. 

So just add the missing configure options to the BUILD/compile-irix-mips64-mipspro  script script and tell me if it compiles or not.

Coming back to the error message it looks like that something gcc related is expectet?

regards
Joerg
[29 Aug 2005 15:35] Valeriy Kravchuk
Tried to rpeat on octane2, but stopped by not enough resources:

-bash-2.05b$ swap -l
lswap path         dev    pri swaplo   blocks     free  maxswap    vswap
    1 /dev/swap
                   0,175    0      0  8388608    55712  8388608        0

./configure --prefix=$HOME/mysql414 --with-extra-charsets=complex --enable-thread-safe-client --with-unix-socket-path=$HOME/mysql414.sock --without-extra-tools --disable-dependency-tracking --without-debug --sysconfdir=$HOME/mysql414 --without-readline --with-big-tables --with-ndbcluster --with-mysqlmanager --with-ndb-test 

gave me:

g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -D_BOOL -o
ndb_mgm main.o ../../../ndb/src/common/portlib/gcc.cpp  ./.libs/libndbmgmclient.
a -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthread -lpthrea
d -lpthread -lpthread -lpthread -lpthread ../common/portlib/.libs/libportlib.a -
lpthread -lpthread -lreadline ../../../dbug/libdbug.a ../../../mysys/libmysys.a
../../../strings/libmystrings.a -lcurses -lpthread -lcrypt -lgen -lnsl -lm -lpth
read
ld32: WARNING 84 : ../common/portlib/.libs/libportlib.a is not used for resolvin
g any symbol.
ld32: FATAL   9  : I/O error (-lreadline): No such file or directory
collect2: ld returned 32 exit status
gmake[4]: *** [ndb_mgm] Error 1
gmake[4]: Leaving directory `/users/vkravchuk/mysql-4.1.14/ndb/src/mgmclient'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/users/vkravchuk/mysql-4.1.14/ndb/src'
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory `/users/vkravchuk/mysql-4.1.14/ndb'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/users/vkravchuk/mysql-4.1.14'
gmake: *** [all] Error 2

When I deleted --with-ndb-test option and included --with-readline, it was much better, and there were not enough resources for linking. I'll try tomorrow, but looks like it is --with-ndb-test that causing real problems...
[30 Aug 2005 13:33] Joerg Behrens
Be carefull youre using the wrong compiler. Setup the environment first like shown in your ./BUILD/compile-irix-mips64-mipspro script.

Youre right about the '--with-ndb-test' switch. Without that it reduce the problems :). About the missing lreadline keep in mind that IRIX dont come with that lib. Maybe someone could take a look into the configure check for libreadline when a user choose the '--without-readline' switch. And when we already talking about the configure someone can remove the '--sysconfdir' switch because the path is hardcoded in the source and cant modify this way.
Back to the problem i can say it compile mysql 4.1.14 with that environment and configure.

./configure --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 --without-debug --sysconfdir=/usr/nekoware/etc/mysql5 --without-readline --with-big-tables --with-openssl=/usr/nekoware --with-ndbcluster --with-mysqlmanager --with-zlib-dir=/usr/nekoware --without-ndb-debug --prefix=/usr/nekoware/mysql4 ; gmake -j 30

When it stops about the missing gcc.o i try to compile ndb again.
cd ndb
gmake clean; runon 8 gmake
cd ..; gmake -j

Than it compiles to the end. 

My current environment looks like
[o2k]:/usr2/MIPS/mysql-4.1.14 $ env | grep FLAG
LDFLAGS=-L/usr/nekoware/lib
CPPFLAGS=-I/usr/nekoware/include
CXXFLAGS=-c99 -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
CFLAGS=-c99 -O3 -mips4 -Wl,-rpath -Wl,/usr/nekoware/lib -I/usr/nekoware/include -OPT:Olimit=0:roundoff=3  -TARG:platform=IP27:proc=r10000
CXX=CC
CC=c99

regards
Joerg
[30 Aug 2005 14:48] Valeriy Kravchuk
I think, we provided enough information for people to check the build process on IRIX.

In addition, vanilla (unmodified) BUILD/compile-irix-mips64-mipspro from 4.1.14, with the default configure options, simply gave me the following bug on our machine:

        rm -f libedit.a
         cru libedit.a chared.o el.o history.o  map.o prompt.o readline.o  searc
h.o tokenizer.o vi.o  common.o emacs.o hist.o key.o  parse.o read.o refresh.o sig.o  term.o tty.o help.o fcns.o unvis.o vis.o fgetln.o
sh: cru:  not found
*** Error code 127 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)

-bash-2.05b$ uname -a
IRIX64 octane2 6.5 07080050 IP30

So, build process for IRIX from sources surely need some attention. That is why I changed the description also.
[2 Sep 2005 12:23] Valeriy Kravchuk
Try to use:

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

on 4.1.14

(see http://bugs.mysql.com/bug.php?id=11836 for details)
[12 Dec 2009 15:36] Valeriy Kravchuk
Actually, IRIX is not a supported platform any more (see http://www.mysql.com/support/supportedplatforms/enterprise.html).