GNU bug report logs - #30222
the generated run path order is incorrect, yielding failures with "make check"

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: Vincent Lefevre <vincent@HIDDEN>; dated Tue, 23 Jan 2018 00:52:01 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Jan 2018 18:01:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 23 13:01:00 2018
Received: from localhost ([127.0.0.1]:39857 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ee2sS-0004OJ-1w
	for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 13:01:00 -0500
Received: from eggs.gnu.org ([208.118.235.92]:54450)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bugtrack@HIDDEN>) id 1ee2sQ-0004O4-2G
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 13:00:54 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bugtrack@HIDDEN>) id 1ee2sJ-0008PT-Mc
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 13:00:48 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33766)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bugtrack@HIDDEN>)
 id 1ee2sJ-0008PL-IJ
 for submit <at> debbugs.gnu.org; Tue, 23 Jan 2018 13:00:47 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45407)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bugtrack@HIDDEN>) id 1ee2sI-0004m2-85
 for bug-libtool@HIDDEN; Tue, 23 Jan 2018 13:00:47 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bugtrack@HIDDEN>) id 1ee2sD-0008GG-CQ
 for bug-libtool@HIDDEN; Tue, 23 Jan 2018 13:00:46 -0500
Received: from rila.superhosting.bg ([91.196.125.212]:42493)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bugtrack@HIDDEN>)
 id 1ee2sD-00089h-3k
 for bug-libtool@HIDDEN; Tue, 23 Jan 2018 13:00:41 -0500
Received: from [78.128.48.21] (port=34942 helo=[192.168.0.10])
 by rila.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
 (Exim 4.89) (envelope-from <bugtrack@HIDDEN>)
 id 1ee2s8-0000no-2m; Tue, 23 Jan 2018 20:00:36 +0200
Message-ID: <5A677845.8030009@HIDDEN>
Date: Tue, 23 Jan 2018 20:00:37 +0200
From: Roumen Petrov <bugtrack@HIDDEN>
User-Agent: Mozilla/5.0 (X11; Linux x86_64;
 rv:33.0) Gecko/20100101 Firefox/33.0 SeaMonkey/2.30
MIME-Version: 1.0
To: Vincent Lefevre <vincent@HIDDEN>, bug-libtool@HIDDEN
Subject: Re: bug#30222: the generated run path order is incorrect,
 yielding failures with "make check"
References: <20180123005109.GJ2292@HIDDEN>
In-Reply-To: <20180123005109.GJ2292@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - rila.superhosting.bg
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - roumenpetrov.info
X-Get-Message-Sender-Via: rila.superhosting.bg: authenticated_id:
 master78@HIDDEN
X-Authenticated-Sender: rila.superhosting.bg: master78@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

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





Information forwarded to bug-libtool@HIDDEN:
bug#30222; Package libtool. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Jan 2018 00:51:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jan 22 19:51:42 2018
Received: from localhost ([127.0.0.1]:38782 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1edmoK-0005F9-BK
	for submit <at> debbugs.gnu.org; Mon, 22 Jan 2018 19:51:42 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38968)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent@HIDDEN>) id 1edmoI-0005Eu-Lq
 for submit <at> debbugs.gnu.org; Mon, 22 Jan 2018 19:51:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <vincent@HIDDEN>) id 1edmoB-0000WH-U8
 for submit <at> debbugs.gnu.org; Mon, 22 Jan 2018 19:51:29 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:46766)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <vincent@HIDDEN>) id 1edmoB-0000W9-QI
 for submit <at> debbugs.gnu.org; Mon, 22 Jan 2018 19:51:27 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:58171)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <vincent@HIDDEN>) id 1edmoA-0004j9-G0
 for bug-libtool@HIDDEN; Mon, 22 Jan 2018 19:51:27 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <vincent@HIDDEN>) id 1edmo7-0000Ud-DP
 for bug-libtool@HIDDEN; Mon, 22 Jan 2018 19:51:26 -0500
Received: from joooj.vinc17.net ([155.133.131.76]:37274)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <vincent@HIDDEN>) id 1edmo7-0000Qg-5X
 for bug-libtool@HIDDEN; Mon, 22 Jan 2018 19:51:23 -0500
Received: from smtp-zira.vinc17.net
 (2a02-8429-80cd-3101-328d-99ff-fe25-ad3f.rev.sfr.net
 [IPv6:2a02:8429:80cd:3101:328d:99ff:fe25:ad3f])
 by joooj.vinc17.net (Postfix) with ESMTPSA id F2D589F;
 Tue, 23 Jan 2018 01:51:09 +0100 (CET)
Received: by zira.vinc17.org (Postfix, from userid 1000)
 id A04C6C20AB8; Tue, 23 Jan 2018 01:51:09 +0100 (CET)
Date: Tue, 23 Jan 2018 01:51:09 +0100
From: Vincent Lefevre <vincent@HIDDEN>
To: bug-libtool@HIDDEN
Subject: the generated run path order is incorrect, yielding failures with
 "make check"
Message-ID: <20180123005109.GJ2292@HIDDEN>
Mail-Followup-To: Vincent Lefevre <vincent@HIDDEN>, bug-libtool@HIDDEN
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
X-Mailer-Info: https://www.vinc17.net/mutt/
User-Agent: Mutt/1.9.2+85 (95c7ff2b) vl-104418 (2017-12-15)
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

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=3DCC    --mode=3Dlink gcc  -Wall -Wmissing-pr=
ototypes -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 -ffl=
oat-store -o tadd tadd.o  -L../src/.libs ./.libs/libfrtests.a /opt/csw/li=
b/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 =3D>      /opt/csw/lib/libquadmath.so.0
        libm.so.2 =3D>     /lib/libm.so.2
        libmpfr.so.6 =3D>  /opt/csw/lib/libmpfr.so.6
        libgmp.so.10 =3D>  /opt/csw/lib/libgmp.so.10
        libc.so.1 =3D>     /lib/libc.so.1
        libgcc_s.so.1 =3D>         /opt/csw/lib/i386/libgcc_s.so.1

Note: MPFR was configured with

  ../mpfr-4.0.1-rc1/configure --enable-assert=3Dfull

In the generated "libtool" script:

# Compile-time system search path for libraries.
sys_lib_search_path_spec=3D"/opt/csw/lib/gcc/i386-pc-solaris2.10/5.5.0 /o=
pt/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=3D"/lib /usr/lib"

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

--=20
Vincent Lef=E8vre <vincent@HIDDEN> - 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)




Acknowledgement sent to Vincent Lefevre <vincent@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#30222; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.