Skip to content

#105 Wrong libs taken on multilib architecture

Metadata

Property Value
Reported by Oliver Sander (oliver.sander@tu-dresden.de)
Reported at Feb 23, 2006 13:46
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Last edited at Nov 29, 2009 16:18
Closed by Christian Engwer (christi@conan.iwr.uni-heidelberg.de)
Closed at Nov 29, 2009 16:18
Closed in version Unknown
Resolution Fixed
Comment info moved to faq

Description

I am not quite sure whether the following is a bug in our build system or in SuSe. Here's what's happening:

I try to use Dune on an x64 machine running Suse-Linux 9.3. automake 1.9.5, autoconf 2.59, libtool 1.5.14, and a locally installed g++-4.0.1. I do a clean checkout of Dune, call autogen.sh, configure, and make -- everything goes smoothly. Then a new project using dune/bin/duneproject. Call autogen.sh and configure for this, and when I call 'make' it compiles, but the linker complains:

/local/bzfertel/gcc-4.0.1-inst/bin/g++ -Wall -g -o testproject testproject.o -L/home/numerik/bzfsande/dune/lib /home/numerik/bzfsande/dune/lib/.libs/libdune.a -L/local/bzfertel/gcc-4.0.1-objects/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/local/bzfertel/gcc-4.0.1-objects/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -L/local/bzfertel/gcc-4.0.1-objects/gcc/32 -L/local/bzfertel/gcc-4.0.1-objects/gcc -L/lib/../lib -L/usr/lib/../lib /local/bzfertel/gcc-4.0.1-inst//lib/../lib/libstdc++.so -lm -lc -lgcc_s -Wl,--rpath -Wl,/local/bzfertel/gcc-4.0.1-inst//lib/../lib -Wl,--rpath -Wl,/local/bzfertel/gcc-4.0.1-inst//lib/../lib /local/bzfertel/gcc-4.0.1-inst//lib/../lib/libstdc++.so: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [testproject] Fehler 1

The reason seems to be the following line from dune/lib/libdune.la

Libraries that this one depends upon.

dependency_libs=' -L/local/bzfertel/gcc-4.0.1-objects/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/local/bzfertel/gcc-4.0.1-objects/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -L/local/bzfertel/gcc-4.0.1-objects/gcc/32 -L/local/bzfertel/gcc-4.0.1-objects/gcc -L/lib/../lib -L/usr/lib/../lib /local/bzfertel/gcc-4.0.1-inst/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.0.1/../../..//libstdc++.la -lm -lc -lgcc_s

This contains 32bit libraries, even though we're compiling as 64bit. Also, unlike the Debian x64 port, Suse x64 is a multilib distribution. That is, in /lib and /usr/lib there are the 32bit libraries, whereas their 64bit counterparts are in /lib64 and /usr/lib64, respectively. Our buildsystem seems to get confused by this. If I manually change the offending line to

Libraries that this one depends upon.

dependency_libs=' -L/local/bzfertel/gcc-4.0.1-objects/gcc -L/lib64 -L/usr/lib64 /local/bzfertel/gcc-4.0.1-inst/bin/../lib64/libstdc++.la -lm -lc -lgcc_s

everything works fine from there on. Does anybody know how to fix this?