After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 603275 - rpaths are not disabled by ./configure --disable-rpath
rpaths are not disabled by ./configure --disable-rpath
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.25
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-29 01:26 UTC by David Ward
Modified: 2009-12-17 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description David Ward 2009-11-29 01:26:19 UTC
When building the latest gstreamer, gstreamer-plugins-base, or gstreamer-plugins-good releases,
'./configure --disable-rpath' does not actually prevent rpaths in the resulting libraries, with the exception of libgstreamer-0.10.so.

I am simply unpacking the source tarballs from http://gstreamer.freedesktop.org/src/, then running './configure --disable-rpath', 'make', and 'make install' in each.  I am not running './autogen.sh', using an external libtool or automake, etc.  The --disable-rpath option should work in the 'configure' script as shipped.

This behavior appears on clean installations of Red Hat Enterprise Linux 5.4, Fedora 12, and ArchLinux 2009.08.


$ readelf -d /usr/local/lib/libgst*.so /usr/local/lib/gstreamer-0.10/libgst*.so | grep -E 'File:|RPATH'
File: /usr/local/lib/libgstapp-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstaudio-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstbase-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstcdda-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstcheck-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstcontroller-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstdataprotocol-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstfft-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstinterfaces-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstnet-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstnetbuffer-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstpbutils-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstreamer-0.10.so
File: /usr/local/lib/libgstriff-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstrtp-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstrtsp-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstsdp-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgsttag-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/libgstvideo-0.10.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstadder.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstalaw.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstalpha.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstalphacolor.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstannodex.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstapetag.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstapp.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstaudioconvert.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstaudiofx.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstaudiorate.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstaudioresample.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstaudiotestsrc.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstauparse.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstautodetect.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstavi.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstcoreelements.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstcoreindexers.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstcutter.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstdebug.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstdecodebin.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstdecodebin2.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstdeinterlace.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstefence.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgsteffectv.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstequalizer.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstffmpegcolorspace.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstflv.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstflxdec.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstgamma.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstgdp.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstgio.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstgoom.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstgoom2k1.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgsticydemux.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstid3demux.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstinterleave.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstlevel.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstmatroska.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstmulaw.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstmultifile.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstmultipart.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstnavigationtest.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstossaudio.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstplaybin.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstqtdemux.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstqueue2.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstreplaygain.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstrtp.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstrtpmanager.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstrtsp.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstsmpte.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstspectrum.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstsubparse.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgsttcp.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgsttypefindfunctions.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstudp.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideo4linux.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideo4linux2.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideobalance.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideobox.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideocrop.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideoflip.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideomixer.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideorate.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideoscale.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvideotestsrc.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstvolume.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstwavenc.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgstwavparse.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
File: /usr/local/lib/gstreamer-0.10/libgsty4menc.so
 0x000000000000000f (RPATH)              Library rpath: [/usr/local/lib]
Comment 1 Sebastian Dröge (slomo) 2009-12-01 12:29:40 UTC
I can't confirm this here when building from the 0.10.25 tarballs and providing --disable-rpath to configure. The resulting library files have no RPATH set.

Any idea what might cause this for you?
Comment 2 David Ward 2009-12-02 14:30:27 UTC
Sebastian, what environment are you compiling under?

I just tried this under Ubuntu 9.10 and also noticed that the resulting libraries have no RPATHs.  Maybe I can compare the build process between it and Fedora/RHEL and figure out what is different.
Comment 3 Sebastian Dröge (slomo) 2009-12-02 15:45:41 UTC
(In reply to comment #2)
> Sebastian, what environment are you compiling under?
> 
> I just tried this under Ubuntu 9.10 and also noticed that the resulting
> libraries have no RPATHs.  Maybe I can compare the build process between it and
> Fedora/RHEL and figure out what is different.

Debian/unstable. IIRC Fedora had weird hacks to gcc/ld to add an RPATH in any case because of the multiarch stuff... but I might be wrong :)
Comment 4 David Ward 2009-12-15 21:25:21 UTC
Okay, I figured out the discrepancy in behavior between these distributions (Fedora/Red Hat, Ubuntu/Debian, and ArchLinux):

When 'configure' is run, it generates a 'libtool' script in the build directory, which includes a variable named 'sys_lib_dlsearch_path_spec'.  This variable is a list of pathnames separated by spaces.  If it contains the installation prefix (i.e., '/usr/local/lib'), then the resulting libraries will have no RPATHs.  Otherwise they will.

It's not clear to me exactly how 'sys_lib_dlsearch_path_spec' gets set, but when I add a pathname into /etc/ld.so.conf, it shows up in this variable.

Under Fedora/Red Hat and ArchLinux, 'sys_lib_dlsearch_path_spec' contains only '/lib' and '/usr/lib', while under Debian and Ubuntu it also contains '/usr/local/lib'.  (Under 64-bit Fedora/Red Hat, it would seem that '/lib64' and '/usr/lib64' should also show up, but they don't.)

I'm not sure what needs to get fixed.  But it would seem to me like the "weird hacks" might actually be in Debian/Ubuntu, which has '/usr/local/lib' as a default library path.
Comment 5 Sebastian Dröge (slomo) 2009-12-17 16:53:40 UTC
That should be a libtool bug then... if --disable-rpath is used it should never add one. No matter if the libdir is in the dl search path or not.