GNU bug report logs -
#27510
On FreeBSD 9.2 and later, shlibpath does not override runpath
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
Since the following change to the FreeBSD dynamic linker (in 2012):
https://github.com/freebsd/freebsd/commit/a78a2e3c36e31109393e2a502b2f8f54f3a7f8d0
the LD_LIBRARY_PATH variable no longer takes precedence over the rpath.
Earliest released versions affected are freebsd 9.2 and dragonfly bsd
9.2.0.
As a result, an installed lib may take precedence over the one in the
source tree.
In order to have the behaviour that existed on freebsd from 4.6 to 9.1,
it seems that the enviroment variable LD_LIBRARY_PATH_RPATH must be set
to 1.
An alternative could be to force the freebsd dynamic linker to emit
DT_RUNPATH instead of DT_RPATH tags by default, using
-Wl,--enable-new-dtags (the current release, freebsd-11.0 has
ld-2.17.50, dated 2007-07-30: it does not generate new dtags by default).
A third option is to make libtool recognize freebsd and dragonfly bsd
after the commit above as shlibpath_overrides_runpath=no.
All three options provide a cure to the problem I'm facing. I've
implemented the third directly on libtool HEAD (patch attached). This has
the effect that the following test suite items now pass, while they were
failing previously.
35: binary relinking at install time FAILED (demo.at:759)
53: binary relinking at install time FAILED (depdemo.at:408)
69: shlibpath_overrides_runpath FAILED (shlibpath.at:66)
86: cwrapper and installed shared libraries FAILED (cwrapper.at:256)
I'm attaching the tests/testsuite.dir/NNN/testsuite.log files for these
four failing tests on the unpatched libtool.
I don't know which is the "right" fix.
Best regards.
E.
[0001-shlibpath_overrides_runpath-no-for-freebsd-9.2-and-d.patch (text/x-diff, attachment)]
[failing-tests.tar.gz (application/gzip, attachment)]
This bug report was last modified 8 years and 55 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.