logo       

libtool-1.5.2 searches /usr/lib before -L<dir>: msg#00076

gnu.libtool.general

Subject: libtool-1.5.2 searches /usr/lib before -L<dir>

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 -L<dir>, 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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise