FreeBSD links wrong library for tests if one is installed in $prefix

Vincent Lefevre vincent at vinc17.net
Tue Jun 27 18:01:50 UTC 2017


On 2017-06-27 19:21:00 +0200, Emmanuel Thome wrote:
> gf2x-freebsd-110-amd64-test2 ~/gmp-6.1.2 $ objdump -x ./tests/mpn/.libs/t-mul | egrep "(R.*PATH|NEEDED)"    
>   NEEDED      libgmp.so.10
>   NEEDED      libc.so.7
>   RPATH       /tmp/inst/lib

libtool should have put the local dir in the run path too.
It's strange that it didn't do that.

> Prepending "env LD_LIBRARY_PATH_RPATH=1" before running scripts in e.g.
> make check or make tune would be a workaround, I suppose.

Generating a right RPATH would be a better solution.

> > MPFR instructs libtool *not* to use temporary wrapper scripts, as
> > they should be useless for the tests (as documented in the libtool
> > manual). This means that it completely relies on the run path.
> 
> ok -- but then you're forcing libtool to relink before make install,
> right ? (with respect to my problem, it's perhaps less error-prone, but
> that's merely a question of trade-off. relinking surely has downsides
> too).

No need: the test programs are not installed.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-bugs mailing list