From unknown Sat Jun 21 10:45:12 2025 X-Loop: help-debbugs@gnu.org Subject: bug#21941: ld-wrapper incorrectly computes library search path Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 17 Nov 2015 16:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21941 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 21941@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.144777861214255 (code B ref -1); Tue, 17 Nov 2015 16:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Nov 2015 16:43:32 +0000 Received: from localhost ([127.0.0.1]:41930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyjLv-0003hr-Ez for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49590) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyjLt-0003hf-9p for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjLs-0005ij-8Z for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLs-0005if-60 for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLr-0006ta-F8 for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjLk-0005ez-RF for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:23 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLk-0005ev-OB for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:20 -0500 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:39246 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZyjLk-0002ew-27 for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:20 -0500 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Brumaire an 224 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 17 Nov 2015 17:43:18 +0100 Message-ID: <87ziyc60gp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.6 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) Currently =E2=80=98ld-wrapper=E2=80=99 builds the library search path as it= encounters -L flags and uses the current search path when it encounters a -l flag. This is contrary to what ld actually does (info "(ld) Options"): --8<---------------cut here---------------start------------->8--- `-L SEARCHDIR' `--library-path=3DSEARCHDIR' [=E2=80=A6] All `-L' options apply to all `-l' options, regardless of the order in which the options appear. --8<---------------cut here---------------end--------------->8--- This turns out to be fine when using GCC but manifests itself when using Clang, because Clang passes the -L flags that correspond to =E2=80=98LIBRARY_PATH=E2=80=99 after the -l flags on the =E2=80=98ld=E2=80= =99 command line. Ludo=E2=80=99. From unknown Sat Jun 21 10:45:12 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#21941: closed (Re: bug#21941: ld-wrapper incorrectly computes library search path) Message-ID: References: <87si3prfpf.fsf@gnu.org> <87ziyc60gp.fsf@gnu.org> X-Gnu-PR-Message: they-closed 21941 X-Gnu-PR-Package: guix Reply-To: 21941@debbugs.gnu.org Date: Sat, 28 Nov 2015 21:13:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1448745182-1975-1" This is a multi-part message in MIME format... ------------=_1448745182-1975-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #21941: ld-wrapper incorrectly computes library search path which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 21941@debbugs.gnu.org. --=20 21941: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21941 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1448745182-1975-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 21941-done) by debbugs.gnu.org; 28 Nov 2015 21:12:57 +0000 Received: from localhost ([127.0.0.1]:58471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a2mng-0000VZ-GL for submit@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34328) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1a2mnM-0000V6-Qw for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2mnH-00045s-Mo for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:36 -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,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2mnH-00045o-KP for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:31 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:48796 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1a2mnG-0005vr-Me for 21941-done@debbugs.gnu.org; Sat, 28 Nov 2015 16:12:31 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: 21941-done@debbugs.gnu.org Subject: Re: bug#21941: ld-wrapper incorrectly computes library search path References: <87ziyc60gp.fsf@gnu.org> Date: Sat, 28 Nov 2015 22:12:28 +0100 In-Reply-To: <87ziyc60gp.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Tue, 17 Nov 2015 17:43:18 +0100") Message-ID: <87si3prfpf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 21941-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > Currently =E2=80=98ld-wrapper=E2=80=99 builds the library search path as = it encounters > -L flags and uses the current search path when it encounters a -l flag. > > This is contrary to what ld actually does (info "(ld) Options"): > > `-L SEARCHDIR' > `--library-path=3DSEARCHDIR' > [=E2=80=A6] All `-L' options apply to all `-l' options, > regardless of the order in which the options appear. Fixed in e946b609. Ludo=E2=80=99. ------------=_1448745182-1975-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Nov 2015 16:43:32 +0000 Received: from localhost ([127.0.0.1]:41930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyjLv-0003hr-Ez for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:31 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49590) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZyjLt-0003hf-9p for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjLs-0005ij-8Z for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41362) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLs-0005if-60 for submit@debbugs.gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLr-0006ta-F8 for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyjLk-0005ez-RF for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:23 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38322) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyjLk-0005ev-OB for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:20 -0500 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:39246 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1ZyjLk-0002ew-27 for bug-guix@gnu.org; Tue, 17 Nov 2015 11:43:20 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: bug-guix@gnu.org Subject: ld-wrapper incorrectly computes library search path X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 27 Brumaire an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Tue, 17 Nov 2015 17:43:18 +0100 Message-ID: <87ziyc60gp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) Currently =E2=80=98ld-wrapper=E2=80=99 builds the library search path as it= encounters -L flags and uses the current search path when it encounters a -l flag. This is contrary to what ld actually does (info "(ld) Options"): --8<---------------cut here---------------start------------->8--- `-L SEARCHDIR' `--library-path=3DSEARCHDIR' [=E2=80=A6] All `-L' options apply to all `-l' options, regardless of the order in which the options appear. --8<---------------cut here---------------end--------------->8--- This turns out to be fine when using GCC but manifests itself when using Clang, because Clang passes the -L flags that correspond to =E2=80=98LIBRARY_PATH=E2=80=99 after the -l flags on the =E2=80=98ld=E2=80= =99 command line. Ludo=E2=80=99. ------------=_1448745182-1975-1--