|
From: | Bob Friesenhahn |
Subject: | Re: libtool and /usr/local/lib |
Date: | Mon, 27 Sep 2004 13:38:07 -0500 (CDT) |
On Mon, 27 Sep 2004, Geoff wrote:
IMO, such hardcoding of library location should be discouraged. why does libtool add the full path of the .la file, instead of-L<path> -l<lib>? even if the <path> is wrong, there are other ways to get libtool or the linker to find the .la file or at least the library.And some seem either not to hardcode the path, or use a mixture of paths that are hard coded and some that are not, such as my librpm.la dependency_libs=' -L/usr/lib /usr/lib/librpmdb.la -L/usr/local/lib /usr/lib/librpmio.la -lrt -lpthread -lbz2 /usr/lib/libpopt.la' Anyway, I am getting out of my depth here.
Hard-coding the path to the .la file ensures that the "correct" files are used and is faster than scanning through a linker search path. Libtool assumes that the developer's environment is sane and consistent.
The best fix is for package maintainers to put their heads together so that libraries shared by multiple packages are placed in consistent locations. Without consistency, results are indeterminant, even if the link is an apparent success.
Bob ====================================== Bob Friesenhahn address@hidden http://www.simplesystems.org/users/bfriesen
[Prev in Thread] | Current Thread | [Next in Thread] |