Bug #16473 ld: fatal: file conf_to_src.o: wrong ELF class: ELFCLASS32

Submitted: 13 Jan 2006 3:06 Modified: 17 Feb 2006 13:36
Reporter: Brian Bram Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:mysql-5.0.18 OS:Solaris (Solaris 10)
Assigned to: CPU Architecture:Any

[13 Jan 2006 3:06] Brian Bram
Description:
gcc -DDBUG_OFF -O3 -DHAVE_RWLOCK_T -m64 -o conf_to_src conf_to_src.o xml.o ctype.o bcmp.o  -lpthread -lthread -lposix4 -lcrypt -lgen -lsocket -lnsl -lm -lpthread -lthread
ld: fatal: file conf_to_src.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to conf_to_src
collect2: ld returned 1 exit status
make[2]: *** [conf_to_src] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/export/done/mysql-5.0.18/strings'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/done/mysql-5.0.18'
make: *** [all] Error 2

Tried to compile with both gcc and the Sun Studio Compiler
all three configs
1.)CC="gcc"
CXX="gcc"
CFLAGS="-m64"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS CXX
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

./configure --prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--with-server-suffix=-standard \
--enable-thread-safe-client --enable-local-infile \
--with-named-z-libs=yes --with-big-tables \
--disable-shared --with-readline \
--with-archive-storage-engine --with-innodb \
--with-vio \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib

2.) CC="gcc"
CXX="gcc"
CFLAGS="-O3"
CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS CXX CXXFLAGS
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

./configure --prefix=/usr/local/mysql \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--with-server-suffix=-standard \
--enable-thread-safe-client --enable-local-infile \
--with-named-z-libs=yes --with-big-tables \
--disable-shared --with-readline \
--with-archive-storage-engine --with-innodb \
--with-vio \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib

3.) CC="gcc"
CXX="gcc"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wform
at -Wparentheses -Wsign-compare -Wwrite-strings -Wunused  -O3 -fno-omit-frame-pointer -mcpu=v8
 -Wa,-xarch=v8plusa"
CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wforma
t -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wc
tor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti  -O3 -fno-o
mit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS CXX CXXFLAGS
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

./configure --prefix=/usr/local/mysql \
--enable-assembler \
--enable-thread-safe-client \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--with-server-suffix=-standard \
--enable-thread-safe-client --enable-local-infile \
--with-named-z-libs=yes --with-big-tables \
--disable-shared --with-readline \
--with-archive-storage-engine --with-innodb \
--with-vio \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib

OpenSSL> version      
OpenSSL 0.9.8a 11 Oct 2005
Compiled 64 Bit

/usr/ccs/bin/ld
/usr/local/bin/make

How to repeat:
Make distclean
Try any of the three attempts listed above
[13 Jan 2006 5:11] Brian Bram
Using gcc 3.3.2
[13 Jan 2006 14:26] Brian Bram
Also tried

CC="gcc"
CXX="gcc"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparen
theses -Wsign-compare -Wwrite-strings -Wunused  -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa"
CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparent
heses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wn
on-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti  -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa
,-xarch=v8plusa -g"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS CXX CXXFLAGS
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

./configure --prefix=/usr/local/mysql \
--enable-thread-safe-client \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--with-server-suffix=-standard \
--enable-thread-safe-client --enable-local-infile \
--with-named-z-libs=yes --with-big-tables \
--disable-shared --with-readline \
--with-archive-storage-engine --with-innodb \
--with-vio \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib

same error during make
[13 Jan 2006 17:02] Valeriy Kravchuk
Is it SPARC or x86 machine? Please, send the uname -a results, just to be sure.
[13 Jan 2006 19:26] Brian Bram
It is one of the new 8 core Niagra based SPARC servers, a T-2000
uname -a
SunOS webzone 5.10 Generic_118822-25 sun4v sparc SUNW,Sun-Fire-T200
[14 Jan 2006 8:27] Valeriy Kravchuk
As far as I know, we have no UltraSPARC T1-based machines yet (I saw T-2000 for the first time in my life yesterday), but I'll try to check on other SPARC-based Solaris 10.
[14 Jan 2006 17:56] Brian Bram
That's kind of the rub, I have a solution that is running on a V240 dual-proc running Solaris 9.  We are a Sun Value Added Reseller and we work closely with Oracle as well.  Some of our clients can not afford a Oracle license and we present MySQL to them.  We have a T-2000 because we are a VAR and we wanted to show our clientele that they could migrate their MySQL apps to a Niagra based box running in different zones, all running a seperate instance of MySQL.  I will admit that I am a Datacent Engineer and not someone that is an expert in compiling software. This box is running the 01/06 release of Solaris 10.

The following have been installed (compiled in 64-Bit mode)
autoconf-2.59
libmcrypt-2.5.7
bison-1.875d                         
libpng-1.2.8
curl-7.12.2                          
libxml2-2.6.16-sol10-sparc-local
expat-1.95.5                         
m4-1.4.2
fontconfig-2.2.98-sol10-sparc-local  
make-3.80-sol10-sparc-local
freetype-2.1.10                      
mhash-0.9.3
gcc-3.3.2-sol10-sparc-local          
gd-2.0.33                            
openssl-0.9.8a
jpeg-6b                              
xpm-3.4k-sol10-sparc-local
libgcc-3.3-sol10-sparc-local         
zlib-1.2.3

There is nothing on this box at this point and I would be happy to provide someone from MySQL access to it to look at the config.
[14 Jan 2006 22:13] Brian Bram
I guess you can close this, I finally got it to work.
I could not run make -j <any number> but make by itself worked. I guess it did not like the concurrent jobs running.

I also make some config changes and this is what I used.

CC="gcc"
CXX="gcc"
CFLAGS="-m64 -g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparenthe
ses -Wsign-compare -Wwrite-strings -Wunused  -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa"
CXXFLAGS="-m64 -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparenthes
es -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-
dtor -felide-constructors -fno-exceptions -fno-rtti  -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g"
LDFLAGS="-m64"
export CC CFLAGS LDFLAGS CXX CXXFLAGS
LD_LIBRARY_PATH=/usr/local/lib
export LD_LIBRARY_PATH

./configure --prefix=/usr/local/mysql \
--enable-thread-safe-client \
--localstatedir=/usr/local/mysql/data \
--libexecdir=/usr/local/mysql/bin \
--with-extra-charsets=complex \
--with-server-suffix=-standard \
--enable-thread-safe-client \
--enable-local-infile \
--with-named-z-libs=yes \
--with-big-tables \
--disable-shared \
--with-readline \
--with-archive-storage-engine \
--with-innodb \
--with-vio \
--with-openssl=/usr/local/ssl \
--with-openssl-includes=/usr/local/ssl/include \
--with-openssl-libs=/usr/local/ssl/lib

It is running now in a non-globalzone using the "whole-root" model on Solaris 10 01/06 on a T-2000
[14 Jan 2006 23:58] Brian Bram
Or perhaps not.  No it appears as if libmysqlclient.so was not generated and PHP is looking for it
[17 Jan 2006 13:36] Valeriy Kravchuk
May be, it is because of --disable-shared in your configure command line? Please, try without it and inform about the results.
[18 Feb 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".

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

Page generated in 0.046 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.