Bug 192056 - [new_xorg] freebsd:10:x86:32 repository: libGL/dri libraries have DT_RPATH tags but are missing DT_RUNPATH tags
Summary: [new_xorg] freebsd:10:x86:32 repository: libGL/dri libraries have DT_RPATH ta...
Status: Closed Unable to Reproduce
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: i386 Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-23 07:21 UTC by Nils Beyer
Modified: 2014-10-19 12:54 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Beyer 2014-07-23 07:21:46 UTC
I've built "i386-wine-devel" using an i386 chroot on an amd64 10.0-STABLE. In 
that chroot I'm using the X.Org libraries from the "new_xorg" PKG repository. 
For some reason in some of its libraries the "DT_RPATH" tag is set but not the 
"DT_RUNPATH" tag:
================================================================================
(32-bit chroot)
# elfdump -d /usr/local/lib/libX11.so | grep PATH
        d_tag: DT_RPATH
        d_tag: DT_RUNPATH

# elfdump -d /usr/local/lib/libGL.so | grep PATH
        d_tag: DT_RPATH

# elfdump -d /usr/local/lib/dri/i965_dri.so  | grep PATH
        d_tag: DT_RPATH
================================================================================


That leads to the problem that some 32-bit libraries cannot be found on the 64-
bit host (because of that DT_RPATH without DT_RUNPATH precedence):
================================================================================
(64-bit host)

#env LD_32_LIBRARY_PATH=/usr/local/lib32 ldd32 /usr/local/lib32/libGL.so.1
/usr/local/lib32/libGL.so.1:
        libglapi.so.0 => not found (0)
        libXext.so.6 => not found (0)
        libXdamage.so.1 => not found (0)
        libXfixes.so.3 => not found (0)
        libX11-xcb.so.1 => not found (0)
        libX11.so.6 => not found (0)
        libxcb-glx.so.0 => not found (0)
        libxcb-dri2.so.0 => not found (0)
        libxcb.so.1 => not found (0)
        libXxf86vm.so.1 => not found (0)
        libdrm.so.2 => not found (0)
        libm.so.5 => /usr/lib32/libm.so.5 (0x28253000)
        libthr.so.3 => /usr/lib32/libthr.so.3 (0x28278000)
        libc.so.7 => /usr/lib32/libc.so.7 (0x2806d000)
================================================================================


Using the "LD_32_LIBRARY_PATH_RPATH" workaround:
================================================================================
(64-bit host)

#env LD_32_LIBRARY_PATH_RPATH=y LD_32_LIBRARY_PATH=/usr/local/lib32 ldd32 /usr/local/lib32/libGL.so.1
/usr/local/lib32/libGL.so.1:
        libglapi.so.0 => /usr/local/lib32/libglapi.so.0 (0x28253000)
        libXext.so.6 => /usr/local/lib32/libXext.so.6 (0x28272000)
        libXdamage.so.1 => /usr/local/lib32/libXdamage.so.1 (0x28281000)
        libXfixes.so.3 => /usr/local/lib32/libXfixes.so.3 (0x28284000)
        libX11-xcb.so.1 => /usr/local/lib32/libX11-xcb.so.1 (0x28289000)
        libX11.so.6 => /usr/local/lib32/libX11.so.6 (0x2828b000)
        libxcb-glx.so.0 => /usr/local/lib32/libxcb-glx.so.0 (0x283a2000)
        libxcb-dri2.so.0 => /usr/local/lib32/libxcb-dri2.so.0 (0x283b5000)
        libxcb.so.1 => /usr/local/lib32/libxcb.so.1 (0x283b9000)
        libXxf86vm.so.1 => /usr/local/lib32/libXxf86vm.so.1 (0x283d4000)
        libdrm.so.2 => /usr/local/lib32/libdrm.so.2 (0x283d9000)
        libm.so.5 => /usr/lib32/libm.so.5 (0x28c00000)
        libthr.so.3 => /usr/lib32/libthr.so.3 (0x28c25000)
        libc.so.7 => /usr/lib32/libc.so.7 (0x2806d000)
        librpcsvc.so.5 => /usr/lib32/librpcsvc.so.5 (0x283e4000)
        libpthread-stubs.so.0 => /usr/local/lib32/libpthread-stubs.so.0 (0x283ed000)
        libXau.so.6 => /usr/local/lib32/libXau.so.6 (0x283ef000)
        libXdmcp.so.6 => /usr/local/lib32/libXdmcp.so.6 (0x283f2000)
================================================================================

I don't know if that's intentional...
Comment 1 Koop Mast freebsd_committer freebsd_triage 2014-10-19 12:54:57 UTC
This seems to have been fixed. I have no idea how or why. Please reopen if it still a problem.

libGL & dri 10.3.0
> elfdump -d /usr/local/lib/libGL.so| grep PATH
	d_tag: DT_RPATH
	d_tag: DT_RUNPATH
> elfdump -d /usr/local/lib/dri/i965_dri.so  | grep PATH
	d_tag: DT_RPATH
	d_tag: DT_RUNPATH

libGL & dri 9.1.7
> elfdump -d /usr/local/lib/dri/i965_dri.so | grep PATH
	d_tag: DT_RPATH
	d_tag: DT_RUNPATH
> elfdump -d /usr/local/lib/libGL.so | grep PATH
	d_tag: DT_RPATH
	d_tag: DT_RUNPATH