Bug#395177: libc6: default library search path is inconsistent with gcc
On 2006-10-27 10:33:53 +0200, Gabor Gombas wrote:
> On Wed, Oct 25, 2006 at 02:37:04PM +0200, Vincent Lefevre wrote:
> > 5. Run it. You should get:
> > GMP ..... Library: 4.2.1 - Header: 4.2.17
> This means the soname of gmp 4.2.1 and 4.2.17 is the same (or you'd
> have got an "error while loading shared libraries ..." message).
Not necessarily. The soname isn't defined in the header file, is it?
(At compile time, it seems that the library was also 4.2.1, because
I get the same problem when using -static, i.e., by not using shared
> But that also means that adding /usr/local/lib to /etc/ld.so.conf
> would _NOT_ solve your problem since the loader would still find
> libgmp.so.X in /usr/lib first.
So, couldn't the dynamic loader take into account /usr/local/lib
by default (before /usr/lib), just like cpp takes into account
/usr/local/include by default (before /usr/include)?
> If you want to have two different shared libraries sharing the same
> soname on the same system, then there is no other solution than setting
> LD_LIBRARY_PATH to point explicitely to the version you want to use.
If this is really the only possibility, it should probably be set
in /etc/profile in the default configuration (at install time) and
other shell init files.
Vincent Lefèvre <firstname.lastname@example.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)