[Top][All Lists]

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

Re: Using libtool for linking

From: Jason Curl
Subject: Re: Using libtool for linking
Date: Fri, 17 Aug 2007 20:46:07 +0200
User-agent: Thunderbird (Windows/20070728)

Ralf Wildenhues wrote:
Then this condition needs to be testable. I see two options:
- Automatically disable shared libraries on this platform
- Link statically from this library to our shared library

There are more options; see below.  FWIW, I typically use notation
that's the other way round, as I would call the situation "Link
statically to this library from our shared library".  Just to avoid
confusion.  ;-)

There is no .la for this of course, I don't think it can be expected for it to be installed just for the sake of libtool.

Indeed.  And IMHO it's libtool's job to cope with system libraries that
do not ship .la files, at the very least if they weren't created by

As for testing the situation, AC_CHECK_LIB makes me believe it will work.

AC_CHECK_LIB checks whether you can link a program against a library,
not a library against a library.  Hint: try AC_CHECK_LIB with
CFLAGS=-fpie on GNU/Linux/x86_64 with a static library containing
non-PIC code.

So, ideas how to work around this problem to achieve my goal?

I suppose going by Peter's suggestion is a good idea.  Otherwise read

This libtool bug is a consequence of the setting(s)

in the libtool script.  You could try setting them to test_compile.
Report the inevitable bugs to bug-libtool, please, including the
exact Libtool version you used, and the output of `libtool --tag=TAG
--config', with TAG replaced, and of `libtool --debug --mode=link...',
i.e., --debug added to the failing link command.  Thanks.
(IIRC I fixed a couple of test_compile bugs in HEAD a while ago.)
Thanks Ralf. I'll have to find some more that describes the internals of libtool to figure out how best to use it. I'll play around with it some more. Not sure I'm reporting a bug just yet, assuming it's my limited experience with libtool for now.
FWIW, there has at one time been a long, heated debate around all this.
To really fix things, some work would need to be done (rather than
rehashing of old arguments).


reply via email to

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