bug#30222: the generated run path order is incorrect, yielding failures with "make check"

Vincent Lefevre <[email protected]>
Newsgroups gmane.comp.gnu.libtool.bugs
Message-ID <[email protected]>
Hi,

I've generated a MPFR 4.0.1-rc1 tarball from Debian and tested it
on Solaris. The result: all tests from "make check" fail because
the tested MPFR version is the one installed on the system instead
of the local one. I've looked at one of the "link" commands:

/bin/bash ../libtool  --tag=CC    --mode=link gcc  -Wall -Wmissing-prototypes -Wpointer-arith -g -O2 -ffloat-store  -no-install -L../src/.libs  -o tadd tadd.o libfrtests.la -lm -lquadmath ../src/libmpfr.la -lgmp
libtool: link: gcc -Wall -Wmissing-prototypes -Wpointer-arith -g -O2 -ffloat-store -o tadd tadd.o  -L../src/.libs ./.libs/libfrtests.a /opt/csw/lib/libquadmath.so -lm ../src/.libs/libmpfr.so -lgmp -R/opt/csw/lib -R/tmp/mpfrtests-vincent-15114/obj/src/.libs -R/opt/csw/lib -R/usr/local/lib

which is wrong! Indeed, one has the system -R/opt/csw/lib before
the local -R/tmp/mpfrtests-vincent-15114/obj/src/.libs, so that the
system MPFR library has the precedence over the local one (the one
that should be tested).

$ ldd tadd
        libquadmath.so.0 =>      /opt/csw/lib/libquadmath.so.0
        libm.so.2 =>     /lib/libm.so.2
        libmpfr.so.6 =>  /opt/csw/lib/libmpfr.so.6
        libgmp.so.10 =>  /opt/csw/lib/libgmp.so.10
        libc.so.1 =>     /lib/libc.so.1
        libgcc_s.so.1 =>         /opt/csw/lib/i386/libgcc_s.so.1

Note: MPFR was configured with

  ../mpfr-4.0.1-rc1/configure --enable-assert=full

In the generated "libtool" script:

# Compile-time system search path for libraries.
sys_lib_search_path_spec="/opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0 /opt/csw/i386-pc-solaris2.10/lib /opt/csw/lib /lib /usr/lib "

# Detected run-time system search path for libraries.
sys_lib_dlsearch_path_spec="/lib /usr/lib"

and the environment doesn't contain anything that would cause the
error.

-- 
Vincent Lefèvre <[email protected]> - 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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.