GNU bug report logs -
#27510
On FreeBSD 9.2 and later, shlibpath does not override runpath
Previous Next
To reply to this bug, email your comments to 27510 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org:
bug#27510; Package
libtool.
(Tue, 27 Jun 2017 21:24:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Emmanuel Thomé <Emmanuel.Thome <at> inria.fr>:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org.
(Tue, 27 Jun 2017 21:24:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-libtool <at> gnu.org:
bug#27510; Package
libtool.
(Tue, 27 Jun 2017 22:35:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 27510 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jun 27, 2017 at 11:18:13PM +0200, Emmanuel Thomé wrote:
> 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.
I meant dragonfly 3.2.0, obviously.
E.
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.