You are not logged in.

#1 2008-03-19 15:48:15

ezacaria
Member
Registered: 2007-12-10
Posts: 30

Linking problem, libtool looks for old GCC files (SOLVED)

Hello,

I'm trying to compile the xparam library, which is built based on libtool.

It is required to declare or export CXX=g++ before compiling, because otherwise it does not find the compiler.

However, when linking the library, it fails because it looks for files of a previous GCC version:

g++: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.2/../../../../lib/crti.o: No such file or directory
g++: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.2/crtbeginS.o: No such file or directory
g++: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.2/crtendS.o: No such file or directory
g++: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.2/../../../../lib/crtn.o: No such file or directory

And the gcc version is

gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix --mandir=/usr/share/man --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
Thread model: posix
gcc version 4.2.3

But the files do seem to be available:

find /usr -name 'crt*.o'
/usr/lib/crtn.o
/usr/lib/crti.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.3/crtend.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.3/crtendS.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.3/crtbeginT.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.3/crtbeginS.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.3/crtbegin.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.2.3/crtfastmath.o
/usr/lib/klibc/lib/crt0.o
/usr/lib/crt1.o

I've had problems when compiling this some time ago in Gentoo, but the problems where fixed when some .la files where patched with a script called "fix_libtool_files.sh"

Any ideas if this is related to some .la files still somewhere and how can this be fixed?

Thanks in advance

Eduardo

Last edited by ezacaria (2008-04-18 09:41:22)

Offline

#2 2008-04-18 09:41:03

ezacaria
Member
Registered: 2007-12-10
Posts: 30

Re: Linking problem, libtool looks for old GCC files (SOLVED)

Hello,

I just wanted to close this thread, as the problem dissapeared in gcc 4.3.0. I had to modify the Makefiles to add the mode for libtool, and andd some includes explicitely, but otherwise the library compiled.

Thanks anyways and best regards,

Eduardo

Offline

Board footer

Powered by FluxBB