Re: libtool-1.5.2 searches /usr/lib before -Ldir

2004-02-21 Thread Pieter Grimmerink
On Saturday 21 February 2004 02:24, Kevin P. Fleming wrote:
 Pieter Grimmerink wrote:
  So I removed the .la script belonging to my library in /usr/lib, libtool
  does not find it anymore, and now it works.

 Are you saying there was a .la file in /usr/lib for a library that is
 _not_ in /usr/lib? Or are there multiple versions of this library on the
 system, one in /usr/lib and one elsewhere?

There are multiple versions of this library, one in /usr/lib (with a .la 
file), and one elsewhere, without a .la file.
I need the one elsewhere, because I'm crosscompiling.
I know I should probably try what happens when both have a .la file, but the 
second one was not built with libtool, it's a stripped down version for an 
embedded target.

Regards,

Pieter



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: libtool-1.5.2 searches /usr/lib before -Ldir

2004-02-21 Thread Pieter Grimmerink
On Saturday 21 February 2004 11:31, Pieter Grimmerink wrote:
 There are multiple versions of this library, one in /usr/lib (with a .la
 file), and one elsewhere, without a .la file.
 I need the one elsewhere, because I'm crosscompiling.
 I know I should probably try what happens when both have a .la file, but
 the second one was not built with libtool, it's a stripped down version for
 an embedded target.

OK, now I've given the library in -Ldir a .la file as well.
Now both libraries have a .la file, and libtool-1.5.2 uses the correct 
library, in -Ldir. So that's solved then.

I don't want to go back to 1.4.3 to try whether that also would have worked 
with both .la files in place.

Thanks for the help guys.

Regards,

Pieter



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: libtool-1.5.2 searches /usr/lib before -Ldir

2004-02-21 Thread Russ Allbery
Pieter Grimmerink [EMAIL PROTECTED] writes:

 OK, now I've given the library in -Ldir a .la file as well.  Now both
 libraries have a .la file, and libtool-1.5.2 uses the correct library,
 in -Ldir. So that's solved then.

So, basically, it sounds like libtool has reinvented the very annoying
Tru64 library search mechanism, where any shared libraries are found
before static libraries regardless of the relative order on the library
path, except as applied to *.la files.

This sounds like a bug to me.  The Tru64 behavior causes no end of
surprises and means that you can't easily link with (often newer) locally
installed static libraries if the operating system happens to come with
some dynamic library by the same name.

What was the reason for this change, or was it accidental?

-- 
Russ Allbery ([EMAIL PROTECTED]) http://www.eyrie.org/~eagle/


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: libtool-1.5.2 searches /usr/lib before -Ldir

2004-02-21 Thread Albert Chin
On Sat, Feb 21, 2004 at 10:43:22AM -0800, Russ Allbery wrote:
 Pieter Grimmerink [EMAIL PROTECTED] writes:
 
  OK, now I've given the library in -Ldir a .la file as well.  Now both
  libraries have a .la file, and libtool-1.5.2 uses the correct library,
  in -Ldir. So that's solved then.
 
 So, basically, it sounds like libtool has reinvented the very annoying
 Tru64 library search mechanism, where any shared libraries are found
 before static libraries regardless of the relative order on the library
 path, except as applied to *.la files.

I don't think libtool is doing this. It looks like it's preferring
libraries with corresponding .la files. Even that is a bug though.
Someone needs to dig further.

-- 
albert chin ([EMAIL PROTECTED])


___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


Re: libtool-1.5.2 searches /usr/lib before -Ldir

2004-02-21 Thread Bob Friesenhahn
On Sat, 21 Feb 2004, Albert Chin wrote:

  So, basically, it sounds like libtool has reinvented the very annoying
  Tru64 library search mechanism, where any shared libraries are found
  before static libraries regardless of the relative order on the library
  path, except as applied to *.la files.

 I don't think libtool is doing this. It looks like it's preferring
 libraries with corresponding .la files. Even that is a bug though.
 Someone needs to dig further.

Right.  This bug has been reported before since it was discussed on
this list a month ago.  It appears to be a known problem.

Bob
==
Bob Friesenhahn
[EMAIL PROTECTED]
http://www.simplesystems.org/users/bfriesen



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool


libtool-1.5.2 searches /usr/lib before -Ldir

2004-02-20 Thread Pieter Grimmerink
I've downloaded and installed libtool-1.5.2, and tried the same as with my 
reports about 1.4.3

It behaves exactly the same, it finds libraries in /usr/lib, instead of where 
-L wants them to be found.

Then I replaced

newlib_search_path=something else here $newlib_search_path
by
newlib_search_path=$newlib_search_path something else here

everywhere in ltmain.in, one by one, but that did not make a difference.

Then I took another look at the --debug output of the libtool script, and it 
occurred to me that libtool is actually looking for an .la script.
When it does not find the .la script, it passes the original -lxyz parameter 
to gcc, instead of trying to replace it by the library it thinks should be 
used.
gcc knows how to use -Ldir, and links against the correct library.
So I removed the .la script belonging to my library in /usr/lib, libtool does 
not find it anymore, and now it works.

But I guess that's not the preferred way to handle this...

Regards,

Pieter



___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool