GNU bug report logs -
#30222
the generated run path order is incorrect, yielding failures with "make check"
Previous Next
To reply to this bug, email your comments to 30222 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-libtool <at> gnu.org
:
bug#30222
; Package
libtool
.
(Tue, 23 Jan 2018 00:52:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Vincent Lefevre <vincent <at> vinc17.net>
:
New bug report received and forwarded. Copy sent to
bug-libtool <at> gnu.org
.
(Tue, 23 Jan 2018 00:52:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <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)
Information forwarded
to
bug-libtool <at> gnu.org
:
bug#30222
; Package
libtool
.
(Tue, 23 Jan 2018 18:01:01 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello ,
Vincent Lefevre wrote:
> 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:
Sound like know issue.
Let see order of libraries in LIBADD (or LDADD).
Let order is $(LIBFOO) $(LIBBAR) and $(LIBFOO) is resolved to library
located in some system path.
If path is not recognized by libtool as "system library path" libtool
will add path flags.
In some cases change of order could resolve issue ...... with a number
of constraints.
> /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
So this is build of test program.
In this situation first in LDADD could be listed project library(-ies)
then dependent (external) libraries if any.
Using proper dependency order may resolve issues with static builds
where library order is more important.
> [SNIP]
>
> 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 "
Ok libtool recognize /opt/csw/lib as system library search path , so
missing -L /opt/csw/lib on build line is expected.
> # Detected run-time system search path for libraries.
> sys_lib_dlsearch_path_spec="/lib /usr/lib"
This is not good.
/opt/csw/lib is not recognized as system path for shared libraries. As
result is extected libtool to provide flag that point to such location.
It could be -Wl,-rpath or -R (Solaris or BSD) and etc.
You could avoid runtime flag at configure time with
lt_cv_sys_lib_dlsearch_path_spec . Work-around if not universal.
Dunno what is status of an enhancement that allows management of
sys_lib_dlsearch_path_spec in all cases - prepend or append extra paths.
Perhaps is only in repository :(.
> and the environment doesn't contain anything that would cause the
> error.
>
Regards,
Roumen
This bug report was last modified 6 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.