From unknown Tue Aug 12 03:20:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#13083 <13083@debbugs.gnu.org> To: bug#13083 <13083@debbugs.gnu.org> Subject: Status: libtool.m4 forgets LD_LIBRARY_PATH when computing sys_lib_dlsearch_path_spec Reply-To: bug#13083 <13083@debbugs.gnu.org> Date: Tue, 12 Aug 2025 10:20:50 +0000 retitle 13083 libtool.m4 forgets LD_LIBRARY_PATH when computing sys_lib_dls= earch_path_spec reassign 13083 libtool submitter 13083 Ryan Lortie severity 13083 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 13:57:53 2012 Received: (at submit) by debbugs.gnu.org; 4 Dec 2012 18:57:53 +0000 Received: from localhost ([127.0.0.1]:53570 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfxgm-0001cO-8u for submit@debbugs.gnu.org; Tue, 04 Dec 2012 13:57:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:41048) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tfxgk-0001cI-II for submit@debbugs.gnu.org; Tue, 04 Dec 2012 13:57:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tfxgb-0005Vu-DX for submit@debbugs.gnu.org; Tue, 04 Dec 2012 13:57:47 -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,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:37727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tfxgb-0005Vq-99 for submit@debbugs.gnu.org; Tue, 04 Dec 2012 13:57:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:52343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfxgU-0008CE-41 for bug-libtool@gnu.org; Tue, 04 Dec 2012 13:57:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfxgR-0005TH-2S for bug-libtool@gnu.org; Tue, 04 Dec 2012 13:57:34 -0500 Received: from manic.desrt.ca ([207.192.74.61]:42345 helo=mail.desrt.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfxgQ-0005T9-Vy for bug-libtool@gnu.org; Tue, 04 Dec 2012 13:57:31 -0500 Received: from [172.16.1.217] (unknown [24.52.229.81]) by manic.desrt.ca (Postfix) with ESMTPSA id 088C612CDAA for ; Tue, 4 Dec 2012 13:51:36 -0500 (EST) Message-ID: <50BE4637.4050807@desrt.ca> Date: Tue, 04 Dec 2012 13:51:35 -0500 From: Ryan Lortie User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121017 Thunderbird/16.0.1 MIME-Version: 1.0 To: bug-libtool@gnu.org Subject: libtool.m4 forgets LD_LIBRARY_PATH when computing sys_lib_dlsearch_path_spec Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) According to the manpage for ld.so on Linux, libraries are searched for in three places: - LD_LIBRARY_PATH - /etc/ld.so.cache (built from ld.so.conf) - /lib and /usr/lib libtool features a variable named sys_lib_dlsearch_path_spec which is meant to list the library search path with the purpose of excluding these paths from being hardcoded into libraries as -rpath. The Linux case for determining the value of sys_lib_dlsearch_path_spec in libtool.m4 handles both the /etc/ld.so.cache case (by sourcing /etc/ld.so.conf) and hardcodes /lib and /usr/lib. It fails to take LD_LIBRARY_PATH into account, however, resulting in unnecessary -rpath usage for the directories in this variable. It would probably be relatively easy to split up LD_LIBRARY_PATH across the ':' it contains and add the paths to sys_lib_dlsearch_path_spec. I'd do the patch myself but I am (blissfully) unaware of which set of tools (cut? sed?) are considered portable enough to be used from libtool.m4... Thanks for your consideration. Cheers