libtool
[Top][All Lists]
Advanced

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

Re: bi-arch build problem: cannot build 64-bit libs on ppc64


From: Maynard Johnson
Subject: Re: bi-arch build problem: cannot build 64-bit libs on ppc64
Date: Sat, 19 Jan 2008 14:53:53 -0600
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Peter O'Gorman wrote:
Maynard Johnson wrote:
Hi,
I know this topic has been discussed on the mailing list before, but
I've not been able to pick out all of the relevant pieces of information
to solve the problem for my particular situation.  Hopefully, someone on
the list can help.

My platform is ppc64 SLES 10 SP1, libtool version 1.5.24.  I have a
project built using the standard tools -- aclocal, autoconf, automake.
The default configuration builds everything as 32-bit.  Prior to
integrating libtool into this project, I was also able to build and
install 64-bit programs and libraries by prefacing my ./configure
command with:
         CFLAGS="-m64" CXXFLAGS=-m64"

I've now integrated libtool into the project.  The 32-bit build still
works fine, but when I try a 64-bit build (using the technique described
above), it fails with:
   gcc -m64 -o urh_int urh_int.o  /usr/lib/libbfd.so -liberty -ldl
   /usr/lib/libbfd.so: could not read symbols: File in wrong format

The urh_int.o was compiled 64-bit, but /usr/lib/libbfd.so is a 32-bit
library.  If I manually run the above command and replace
'/usr/lib/libbfd.so' with '-lbfd', the 64-bit urh_int program is built
successfully.

Can someone tell me the extra magic flags I need to set in order to get
libtool to do the right thing?

Hi Maynard,

There really should not be any extra magic flags. I assume that the 64
bit libs live in a different directory that the 32 bit ones (lib64 or
Yes. For the particular failing case, the 64bit lib we need is /usr/lib64/libbfd.so
lib/64 or some such). libtool should be picking this up from `gcc
-print-multi-os-directory`.

Please post ./libtool --config for both the 32 bit and 64 bit case
(might be best to compress them).
OK. Tar ball attached.
Also, what is the libtool line for the above link line?
Sorry, I should have included that the first time:

   if gcc -DHAVE_CONFIG_H -I. -I. -I..     -m64 -MT urh_int.o -MD -MP
   -MF ".deps/urh_int.Tpo" -c -o urh_int.o urh_int.c; \
   then mv -f ".deps/urh_int.Tpo" ".deps/urh_int.Po"; else rm -f
   ".deps/urh_int.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc -m64 -o urh_int urh_int.o -lbfd -liberty -ldl
   mkdir .libs
   gcc -m64 -o urh_int urh_int.o  /usr/lib/libbfd.so -liberty -ldl
   /usr/lib/libbfd.so: could not read symbols: File in wrong format
   collect2: ld returned 1 exit status


Thanks!
-Maynard
Thanks,
Peter

Attachment: libtool_config.tar.gz
Description: GNU Zip compressed data


reply via email to

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