bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool is broken for 64-bit C++ libraries under OpenSolaris


From: Ralf Wildenhues
Subject: Re: libtool is broken for 64-bit C++ libraries under OpenSolaris
Date: Tue, 24 Nov 2009 14:36:19 +0100
User-agent: Mutt/1.5.20 (2009-08-09)

Hello Vadim,

* Vadim Zeitlin wrote on Fri, Nov 20, 2009 at 06:07:35PM CET:
>  It seems that it's impossible to use libtool for linking 64 bit shared C++
> libraries under OpenSolaris. The problem is that libtool insists on using
> "g++ -nostdlib" and adding the necessary CRT modules itself but it doesn't
> do it correctly as can be seen in this example (wrapped for readability):

Before trying to work on a fix, let's see if we can determine a
workaround: does it work to edit ../libtool, search for several
instances of ^postdeps= (beginning of line) and replace the wrong
path in the C++ one?

Thanks,
Ralf

>       % /bin/sh ../libtool --tag=CXX --mode=link g++ -m64 -O2 -Wl,-64 -o
>       libfoo.la -rpath /usr/local/lib libfoo-bar.lo
>       rm -fr  .libs/libfoo.so.0.0.0
>       g++ -shared -nostdlib  /usr/lib/amd64/crti.o
>       /usr/lib/amd64/values-Xa.o
>       /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/amd64/crtbegin.o
>       .libs/libfoo_bar.o -Wl,-R -Wl,/usr/sfw/lib -Wl,-R -Wl,/usr/sfw/lib
>       -L/opt/flexlm/11.7.0/x64_sun10
>       -L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/amd64
>       -L/usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/../../../amd64
>       -L/lib/amd64 -L/usr/lib/amd64 /usr/sfw/lib/libstdc++.so
>       -L/usr/sfw/lib -lm -lgcc_s_amd64
>       /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/amd64/crtend.o
>       /usr/lib/amd64/crtn.o  -m64 -Wl,-64 -Wl,-h -Wl,libfoo.so.0 -o
>       .libs/libfoo.so.0.0.0
>       ld: fatal: file /usr/sfw/lib/libstdc++.so: wrong ELF class: ELFCLASS32
>       ld: fatal: file processing errors. No output written to 
> .libs/libfoo.so.0.0.0
>       collect2: ld returned 1 exit status




reply via email to

[Prev in Thread] Current Thread [Next in Thread]