libtool
[Top][All Lists]
Advanced

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

Re: using dynamic libraries instead of static


From: Daniel Herring
Subject: Re: using dynamic libraries instead of static
Date: Fri, 22 Jul 2011 00:35:50 -0400 (EDT)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Thu, 21 Jul 2011, L A wrote:

I am trying to cross compile a library on a linux machine. The
libstdc++.a that comes with the toolchain is not compiled with fPIC
and it is binary only. I would like to use the so file instead.
However libtool keeps linking libstdc++.a (as whole-archive) and I get
relocation errors. Any ideas about how to work around this?

Where is the static version being specified? Look at the command line to libtool and the command line libtool passes to g++. If libstdc++.a appears on the former, then you have a makefile problem. If libtool is adding it, then there are a couple places to look.

Is some "--static" flag being passed?
Is libstdc++.a coming from a .la file?

If nothing obvious appears, calling the original libtool command with an extra --debug should spew trace information. Redirect to a file and then open in a text editor to see where the static name first appears and why.

Common fixes:
- fix the makefile
- fix/hide the offending .la file
- hide the .a file

Later,
Daniel



reply via email to

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