From unknown Fri Aug 15 12:50:44 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#10888 <10888@debbugs.gnu.org> To: bug#10888 <10888@debbugs.gnu.org> Subject: Status: Wait, isn't rpath supposed to be set automagically? Reply-To: bug#10888 <10888@debbugs.gnu.org> Date: Fri, 15 Aug 2025 19:50:44 +0000 retitle 10888 Wait, isn't rpath supposed to be set automagically? reassign 10888 automake submitter 10888 Miles Bader severity 10888 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 10:14:03 2012 Received: (at submit) by debbugs.gnu.org; 26 Feb 2012 15:14:03 +0000 Received: from localhost ([127.0.0.1]:58437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1fnX-0004pu-42 for submit@debbugs.gnu.org; Sun, 26 Feb 2012 10:14:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45165) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1fnV-0004pO-LS for submit@debbugs.gnu.org; Sun, 26 Feb 2012 10:14:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1fkn-0001gt-Kd for submit@debbugs.gnu.org; Sun, 26 Feb 2012 10:11:15 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_PSBL,T_DKIM_INVALID autolearn=no version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:34620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1fkn-0001gl-GF for submit@debbugs.gnu.org; Sun, 26 Feb 2012 10:11:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:33457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1fkm-0007WV-5B for bug-automake@gnu.org; Sun, 26 Feb 2012 10:11:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1fkk-0001g5-Sv for bug-automake@gnu.org; Sun, 26 Feb 2012 10:11:11 -0500 Received: from mail-ey0-f169.google.com ([209.85.215.169]:35729) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1fkf-0001ew-MG; Sun, 26 Feb 2012 10:11:05 -0500 Received: by eaag11 with SMTP id g11so1703614eaa.0 for ; Sun, 26 Feb 2012 07:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=ckbxq1Z+TVC38EQYzt66mr8niDPcLXRl9QMC89NEjIs=; b=XWwZUQxkn/CXs7OAfs8Exfks+aMXcANQnaYLNvkDz+94bQS1Gj78oqXE54J1a5qadc uRDPVWTkwF+/XqpYdVzTx9P6NqvU4cXWXMACXA7UDsnDXNypDG2lwEqpYRCVtd+7E+4l V4y+CnbahlYLgzwOq1mrtpIr2/iIJxULPRgvo= Received: by 10.213.15.9 with SMTP id i9mr2257279eba.59.1330269064052; Sun, 26 Feb 2012 07:11:04 -0800 (PST) Received: from [87.4.94.37] (host37-94-dynamic.4-87-r.retail.telecomitalia.it. [87.4.94.37]) by mx.google.com with ESMTPS id v51sm46130462eef.2.2012.02.26.07.11.02 (version=SSLv3 cipher=OTHER); Sun, 26 Feb 2012 07:11:03 -0800 (PST) Message-ID: <4F4A4B7E.8000901@gmail.com> Date: Sun, 26 Feb 2012 16:10:54 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: Miles Bader Subject: Re: Wait, isn't rpath supposed to be set automagically? References: <87obslbqj4.fsf@catnip.gol.com> In-Reply-To: <87obslbqj4.fsf@catnip.gol.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 02/26/2012 03:47 PM, Miles Bader wrote: > I thought that as long as one used ".la" libraries, automake+libtool > was supposed to handle all the grotty stuff like rpath automatically, > adding -rpath $(libdir) if you depend on libraries installed to libdir > and libdir isn't on the system library search path. [Yeah, I also > know some people hate rpath, but ...] > > But ... it doesn't seem to. Is something broken, is there an option I > should set... or? > > [I guess I can add "-rpath " somewhere in Makefile.am, but > I don't really want to add system-dependent stuff that libtool's > supposed to be handling; isn't that why libtool exists in the first > place?] > > automake version 1.11.3, libtool version 2.4.2 > > Thanks, > > -Miles > > > Example: > > configure.ac: > AC_INIT([blah], [0.1], [bob]) > AM_INIT_AUTOMAKE([foreign]) > LT_INIT > AC_PROG_CC > AC_CONFIG_FILES([Makefile]) > AC_OUTPUT > Makefile.am: > bin_PROGRAMS = blah > lib_LTLIBRARIES = liboink.la > blah_SOURCES = blah.c > blah_LDADD = liboink.la > liboink_la_SOURCES = oink.c > blah.c: > extern void oink (); > int main () { oink (); } > oink.c: > void oink () { } > > Commands: > $ autoreconf --install > ... > $ ./configure > ... > $ make > ... > $ sudo make install > ... > $ /usr/local/bin/blah > /usr/local/bin/blah: error while loading shared libraries: liboink.so.0: cannot open shared object file: No such file or directory > $ LD_LIBRARY_PATH=/usr/local/lib /usr/local/lib/blah > $ ldd /usr/local/bin/blah > linux-vdso.so.1 => (0x00007fff247c5000) > liboink.so.0 => not found > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ceeb26000) > /lib64/ld-linux-x86-64.so.2 (0x00007f5ceeed1000) > $ readelf -d /usr/local/bin/blah | grep RPATH > $ > I must admit I know very little of the Automake's libtool support, so I'm not sure whether this is a bug or not; still, the automake documentation reads somewhere: [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [208.118.235.92 listed in psbl.surriel.com] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefano.lattarini[at]gmail.com) 0.8 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: submit Cc: bug-automake@gnu.org, automake@gnu.org 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: 1.6 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On 02/26/2012 03:47 PM, Miles Bader wrote: > I thought that as long as one used ".la" libraries, automake+libtool > was supposed to handle all the grotty stuff like rpath automatically, > adding -rpath $(libdir) if you depend on libraries installed to libdir > and libdir isn't on the system library search path. [Yeah, I also > know some people hate rpath, but ...] > > But ... it doesn't seem to. Is something broken, is there an option I > should set... or? > > [I guess I can add "-rpath " somewhere in Makefile.am, but > I don't really want to add system-dependent stuff that libtool's > supposed to be handling; isn't that why libtool exists in the first > place?] > > automake version 1.11.3, libtool version 2.4.2 > > Thanks, > > -Miles > > > Example: > > configure.ac: > AC_INIT([blah], [0.1], [bob]) > AM_INIT_AUTOMAKE([foreign]) > LT_INIT > AC_PROG_CC > AC_CONFIG_FILES([Makefile]) > AC_OUTPUT > Makefile.am: > bin_PROGRAMS = blah > lib_LTLIBRARIES = liboink.la > blah_SOURCES = blah.c > blah_LDADD = liboink.la > liboink_la_SOURCES = oink.c > blah.c: > extern void oink (); > int main () { oink (); } > oink.c: > void oink () { } > > Commands: > $ autoreconf --install > ... > $ ./configure > ... > $ make > ... > $ sudo make install > ... > $ /usr/local/bin/blah > /usr/local/bin/blah: error while loading shared libraries: liboink.so.0: cannot open shared object file: No such file or directory > $ LD_LIBRARY_PATH=/usr/local/lib /usr/local/lib/blah > $ ldd /usr/local/bin/blah > linux-vdso.so.1 => (0x00007fff247c5000) > liboink.so.0 => not found > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ceeb26000) > /lib64/ld-linux-x86-64.so.2 (0x00007f5ceeed1000) > $ readelf -d /usr/local/bin/blah | grep RPATH > $ > I must admit I know very little of the Automake's libtool support, so I'm not sure whether this is a bug or not; still, the automake documentation reads somewhere: [...] Content analysis details: (1.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [208.118.235.92 listed in psbl.surriel.com] 0.0 SINGLE_HEADER_2K A single header contains 2K-3K characters 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefano.lattarini[at]gmail.com) 0.8 SPF_NEUTRAL SPF: sender does not match SPF record (neutral) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid On 02/26/2012 03:47 PM, Miles Bader wrote: > I thought that as long as one used ".la" libraries, automake+libtool > was supposed to handle all the grotty stuff like rpath automatically, > adding -rpath $(libdir) if you depend on libraries installed to libdir > and libdir isn't on the system library search path. [Yeah, I also > know some people hate rpath, but ...] > > But ... it doesn't seem to. Is something broken, is there an option I > should set... or? > > [I guess I can add "-rpath " somewhere in Makefile.am, but > I don't really want to add system-dependent stuff that libtool's > supposed to be handling; isn't that why libtool exists in the first > place?] > > automake version 1.11.3, libtool version 2.4.2 > > Thanks, > > -Miles > > > Example: > > configure.ac: > AC_INIT([blah], [0.1], [bob]) > AM_INIT_AUTOMAKE([foreign]) > LT_INIT > AC_PROG_CC > AC_CONFIG_FILES([Makefile]) > AC_OUTPUT > Makefile.am: > bin_PROGRAMS = blah > lib_LTLIBRARIES = liboink.la > blah_SOURCES = blah.c > blah_LDADD = liboink.la > liboink_la_SOURCES = oink.c > blah.c: > extern void oink (); > int main () { oink (); } > oink.c: > void oink () { } > > Commands: > $ autoreconf --install > ... > $ ./configure > ... > $ make > ... > $ sudo make install > ... > $ /usr/local/bin/blah > /usr/local/bin/blah: error while loading shared libraries: liboink.so.0: cannot open shared object file: No such file or directory > $ LD_LIBRARY_PATH=/usr/local/lib /usr/local/lib/blah > $ ldd /usr/local/bin/blah > linux-vdso.so.1 => (0x00007fff247c5000) > liboink.so.0 => not found > libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5ceeb26000) > /lib64/ld-linux-x86-64.so.2 (0x00007f5ceeed1000) > $ readelf -d /usr/local/bin/blah | grep RPATH > $ > I must admit I know very little of the Automake's libtool support, so I'm not sure whether this is a bug or not; still, the automake documentation reads somewhere: For libraries whose destination directory is known when Automake runs, Automake will automatically supply the appropriate -rpath option to libtool. This is the case for libraries listed explicitly in some installable _LTLIBRARIES variables such as lib_LTLIBRARIES. so we have *at least* a documentation issue. I should look at this more carefully (probably after the 1.12 release); for now, I'm opening a report in the bug tracker so that we won't forget about the issue. Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 26 10:23:24 2012 Received: (at control) by debbugs.gnu.org; 26 Feb 2012 15:23:24 +0000 Received: from localhost ([127.0.0.1]:58449 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1fwZ-00053n-IB for submit@debbugs.gnu.org; Sun, 26 Feb 2012 10:23:24 -0500 Received: from mail-ee0-f44.google.com ([74.125.83.44]:50935) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S1fwX-00053g-In for control@debbugs.gnu.org; Sun, 26 Feb 2012 10:23:22 -0500 Received: by eeke51 with SMTP id e51so726971eek.3 for ; Sun, 26 Feb 2012 07:20:35 -0800 (PST) Received-SPF: pass (google.com: domain of stefano.lattarini@gmail.com designates 10.213.14.80 as permitted sender) client-ip=10.213.14.80; Authentication-Results: mr.google.com; spf=pass (google.com: domain of stefano.lattarini@gmail.com designates 10.213.14.80 as permitted sender) smtp.mail=stefano.lattarini@gmail.com; dkim=pass header.i=stefano.lattarini@gmail.com Received: from mr.google.com ([10.213.14.80]) by 10.213.14.80 with SMTP id f16mr2952637eba.135.1330269635166 (num_hops = 1); Sun, 26 Feb 2012 07:20:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:mime-version:to:subject:content-type :content-transfer-encoding; bh=p88CboNgYJEWfZZoFr93WE9rQ3QOd/Pc4vN0Qcbpmm4=; b=ILB/jBBnwCLfpNf3OB7c+VGxHpB0VQoUEY2mScvqbtdENKSuktuRhsoEQZMwbhNH6H TxEZshOJSaPEi9thJT8A9y6RrVFnB+oRVRditP71N3JcFdBtfrnlLxMe0zRKoHIe9TSM QjadAK6m15n9je9vs4iv8rQFwghxPauCadIw0= Received: by 10.213.14.80 with SMTP id f16mr2232801eba.135.1330269635048; Sun, 26 Feb 2012 07:20:35 -0800 (PST) Received: from [87.4.94.37] (host37-94-dynamic.4-87-r.retail.telecomitalia.it. [87.4.94.37]) by mx.google.com with ESMTPS id w60sm46209624eeb.4.2012.02.26.07.20.32 (version=SSLv3 cipher=OTHER); Sun, 26 Feb 2012 07:20:33 -0800 (PST) Message-ID: <4F4A4DBE.9060108@gmail.com> Date: Sun, 26 Feb 2012 16:20:30 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: control@debbugs.gnu.org Subject: x Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: control 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: -2.6 (--) submitter 10888 Miles Bader thanks