bug-libtool
[Top][All Lists]
Advanced

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

64-bit library on Solaris SPARC


From: Marcel Martin
Subject: 64-bit library on Solaris SPARC
Date: Thu, 11 May 2006 13:01:36 +0200
User-agent: KMail/1.8.1

Hello,

I'm trying to build a 64-bit library on Solaris 9 SPARC. I'm actually using 
autotools with a larger project, but I could reduce the problem to this small 
test case which uses only libtool:

$ echo "int f(int a, int b) { return a+b; }" > mini.cpp

$ libtool --mode=compile g++ -m64 -c -o mini.lo mini.cpp
 g++ -m64 -c mini.cpp  -fPIC -DPIC -o .libs/mini.o
 g++ -m64 -c mini.cpp -o mini.o >/dev/null 2>&1

$ libtool --mode=link g++ -rpath /usr/local/lib -m64 -o libmini.la \ 
-no-undefined -version-info 0:0:0 mini.lo
g++ -shared 
-nostdlib  /vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/crti.o 
/usr/ccs/lib/values-Xa.o 
/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/crtbegin.o  .libs/mini.o  
-Wl,-R -Wl,/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3 -Wl,-R 
-Wl,/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3 
-L/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3 -L/usr/ccs/bin 
-L/usr/ccs/lib 
-L/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/../../.. 
/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/libstdc++.so 
-L/vol/src/gnu/gcc/gcc-3.4.3/sparc-sun-solaris2.9/libstdc++-v3/src 
-L/vol/src/gnu/gcc/gcc-3.4.3/sparc-sun-solaris2.9/libstdc++-v3/src/.libs 
-L/vol/src/gnu/gcc/gcc-3.4.3/gcc -L/vol/gcc-3.4.3/lib -lm 
-lgcc /vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/crtend.o 
/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/crtn.o  
-m64 -Wl,-h -Wl,libmini.so.0 -o .libs/libmini.so.0.0.0
ld: fatal: file .libs/mini.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to .libs/libmini.so.0.0.0
collect2: ld returned 1 exit status

The problem is that incorrect paths are used: For example, instead of
/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/crti.o it should be
/vol/gcc-3.4.3/lib/gcc/sparc-sun-solaris2.9/3.4.3/sparcv9/crti.o
If I change the paths and do the g++ call manually, it works.

I guess this is or has to do with the multilib problem which has come up on 
the list before, but I'm still at a loss at what to do now. Is there a 
solution or a workaround for this problem?

I'm using libtool version 1.5.22, the problem also occurs with the CVS 
snapshot ("version 2.1a") from today.

Thanks,
Marcel




reply via email to

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