|
From: | Benoit SIGOURE |
Subject: | Re: Libtool doesn't set -rpath automatically when needed? |
Date: | Sat, 3 Nov 2007 11:44:15 +0100 |
On Nov 3, 2007, at 9:53 AM, Ralf Wildenhues wrote:
Hello Benoit, * Benoit SIGOURE wrote on Fri, Nov 02, 2007 at 10:34:13PM CET:On GNU/Linux Debian with GCC 4.1 / Debian's libtool 1.5.22-4(1.1220.2.365 2005/12/18 22:14:06), I have Boost installed under / usr/local/lib (pre-built binaries: http://www.tsunanet.net/~tsuna/ boost_1_34_1-i486-linux-gcc41.tar.gz) and when I link with `- lboost_thread-gcc41-mt-1_34_1 -pthread' I can't run the executable without manually setting LD_LIBRARY_PATH. Shouldn't libtool do something about this? I know that Boost doesn't come with .la files[...]Libtool doesn't add run paths to installed libraries without .la files. (How should it know that it should not only add /usr/local/lib, but also /opt/foo/lib because that is needed as well? OK, this question is mooton GNU/Linux, but not on other systems.) You can use -R/usr/local/lib to make libtool add one.
I don't want libtool to add run paths to already installed libraries (this is obviously impossible, simply because it would require root privileges to change /usr/local/lib/libboost_*), I'd like libtool to add a run path to my own library/program so that I can run them without having to deal with LD_LIBRARY_PATH issues.
Moreover, I don't see how to do such a check while preserving cross-compilation capabilities (since checking whether -rpath works or not requires to run the binary somehow, doesn't it?You don't need to, AC_PROG_LIBTOOL does that for you.
OK great so maybe I can copy/paste the part of AC_PROG_LIBTOOL that does this in my own macro so I can portably figure out the -rpath/-R/ etc. options needed and then add them to BOOST_THREADS_LDFLAGS, right? I don't think it'd be a good idea to add AC_REQUIRE ([AC_PROG_LIBTOOL]) to my BOOST_THREADS macros...
How does that sound? -- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
PGP.sig
Description: This is a digitally signed message part
[Prev in Thread] | Current Thread | [Next in Thread] |