helpGNU Libtool - Support: sr #108637, libtool adds -rpath to staging...

 
 

sr #108637: libtool adds -rpath to staging directory

Submitted by:  None
Submitted on:  Tue 19 Aug 2014 11:30:33 PM UTC  
 
Category: NonePriority: 5 - Normal
Severity: 3 - NormalStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 03 Dec 2014 04:24:36 PM UTC, comment #2:

As pointed out by Roumen Petrov, overriding the sys_lib_dlsearch_path_spec variable gets the behavior I want. In specific, passing lt_cv_sys_lib_dlsearch_path_spec=... with a list of paths to ./configure gets them excluded from the default -rpath.

http://lists.gnu.org/archive/html/libtool/2014-08/msg00004.html

More follow up on this issue here:

http://lists.gnu.org/archive/html/libtool/2014-12/msg00003.html

I think this one can be closed now.

Anonymous
Tue 26 Aug 2014 04:20:20 AM UTC, comment #1:

Small correction, step #4 should read "Build dbus".

If someone could confirm this is indeed a bug and whether there's a good workaround for it that would be great.

Thinking about it, my impression is that bintest should actually be a wrapper shell script with the actual binary under .libs/bintest and make install should possibly relink it without the rpath to the staging directory...

I'd be happy to contribute code, but I'd need some pointers on where the issue is and what would be an acceptable way to fix this.

Thanks!
Filipe

Anonymous
Tue 19 Aug 2014 11:30:33 PM UTC, original submission:

Hi,

I'm trying to link binaries to libraries that are not installed on the system, but just unpacked to a "staging" directory.

Consider this (real) example:

1) Build expat with "--libdir=/usr/lib/${platform}"
2) Install expat with "make install DESTDIR=${stagedir}"
3) Configure dbus with "-L${stagedir}/usr/lib/${platform}" where it will find expat now, and "-rpath /usr/lib/${platform}" where it will find expat at real runtime when both are installed.
4) Build expat

The problem is that ${stagedir} is leaking and the resulting dbus-daemon gets both /usr/lib/${platform} and ${stagedir}/usr/lib/${platform} added to it...

I tried working around it by passing --with-sysroot=${stagedir} to the dbus configure, but unfortunately that didn't work...

I wrote a small reproducer that seems to illustrate the issue, I tried it with latest libtool from git (commit ac180507c123469d0fe9b25437d459af24b3f789) and I still have the same problem.

$ libtool_rpath/reproduce.sh
...
===> RPATH of bintest:
0x000000000000000f (RPATH) Library rpath: [/path/to/libtool_rpath/destdir/usr/lib/platform:/usr/lib/platform]

Do you have a suggestion of something I could do to accomplish what I'm trying to accomplish?

Is this a libtool bug?

Any suggestions of workarounds?

Thanks!
Filipe

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #31921:  libtool_rpath.tgz added by None (912B - application/x-compressed-tar - Script to reproduce this bug.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 19 Aug 2014 11:30:33 PM UTCNoneAttached File-=>Added libtool_rpath.tgz, #31921

    Back to the top


    Powered by Savane 3.1-cleanup1