GNU bug report logs - #10888
Wait, isn't rpath supposed to be set automagically?

Previous Next

Package: automake;

Reported by: Miles Bader <miles <at> gnu.org>

Date: Sun, 26 Feb 2012 15:15:02 UTC

Severity: normal

To reply to this bug, email your comments to 10888 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-automake <at> gnu.org:
bug#10888; Package automake. (Sun, 26 Feb 2012 15:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Sun, 26 Feb 2012 15:15:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: Miles Bader <miles <at> gnu.org>
Cc: bug-automake <at> gnu.org, automake <at> gnu.org
Subject: Re: Wait, isn't rpath supposed to be set automagically?
Date: Sun, 26 Feb 2012 16:10:54 +0100
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 <blahblaha>" 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







Changed bug submitter to 'Miles Bader <miles <at> gnu.org>' from 'Stefano Lattarini <stefano.lattarini <at> gmail.com>' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 26 Feb 2012 15:24:01 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 173 days ago.

Previous Next


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