[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool doesn't set -rpath automatically when needed?

From: Benoit SIGOURE
Subject: Re: Libtool doesn't set -rpath automatically when needed?
Date: Fri, 2 Nov 2007 23:22:46 +0100

On Nov 2, 2007, at 11:00 PM, Roumen Petrov wrote:

Usually /etc/ contain /usr/local/lib.
Dunno why this path is not set on you host.

Benoit SIGOURE wrote:
Hi list,
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: 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 but since /usr/local/lib isn't in sys_lib_search_path_spec, shouldn't it use -rpath and friends when available/required? What would be the best solution to handle this issue? Write my own check to see how to set the rpath (-rpath/-Wl,-rpath/-R/etc.) and check if linking against -lboost_thread* requires a -rpath or not, and if it does, automagically add it to BOOST_THREADS_LDFLAGS? That sounds tedious. And how is it going to work on, say, OSX, where there is no -rpath/-R? 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? Or maybe analyzing the output of `ldd'? But it surely isn't something standard, for instance on OSX it's `otool -L' and it requires the package odcctools...).

Hi, please avoid top-posting (

address@hidden ~ $ cat /etc/
include /etc/*.conf
address@hidden ~ $ cat /etc/*.conf
# Multiarch support
address@hidden ~ $ uname -a
Linux bf-debian 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux
address@hidden ~ $ cat /etc/debian_version


Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory

Attachment: PGP.sig
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]