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


libtool 1.4.3 searches /usr/lib before -Ldir

2004-02-20 Thread Pieter Grimmerink
I've asked for help about this problem twice in the last
few weeks, without any replies.

In the meantime I've done some searching in the libtool
list history, and I came across this:

http://www.mail-archive.com/[EMAIL PROTECTED]/msg04324.html

This seems to be exactly the same problem I'm having.

Now I'm wondering, has the reason, and possibly a
solution for this problem been found in the meantime?

Regards,

Pieter



___
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


Wrong library search path

2004-02-18 Thread Pieter Grimmerink
When crosscompiling an autoconf/automake project, I pass the target's libary 
path with LDFLAGS= -L /compiletarget/lib as argument for the configure 
script.

But now a libtool script is created, that contains the following variable:

sys_lib_search_path_spec=/lib /usr/lib /usr/local/lib

These paths contain of course the libraries of my workstation, incompatible 
with the crosscompile target.

During the link stage, indeed, things go wrong.
The libtool script is called, with --mode=link, and -L/compiletarget/lib, all 
object files and a library I want to link against: -ltc

Now the libtool script replaces -ltc by /usr/lib/libtc.so, it found my 
workstations version of the library, in the lib_search_path_spec.
It should have used /compiletarged/lib/libtc.so instead.
Linking fails, the library is not in a valid format for the target.

Are there any special things I need to do to tell libtool it is being used in 
a crossbuild?
Or can I influence the value of 'sys_lib_search_path_spec' that will be used?

Used versions:

autoconf 2.57
libtool 1.4.3

Regards,

Pieter



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