Bug 108766

Summary: Mesa built with meson has RPATH entries
Product: Mesa Reporter: Emil Velikov <emil.l.velikov>
Component: OtherAssignee: Dylan Baker <baker.dylan.c>
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium CC: baker.dylan.c
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Emil Velikov 2018-11-16 14:06:53 UTC
Looking at my distro package and a local build - the DRI modules have RPATH, which should be removed. I'd imagine other binaries - vdpau, vaapi, xvmc, etc also have this issue.

A wild guess is that meson removes the RPATH only for files that are installed in the lib folder.
Comment 1 Eric Engestrom 2018-11-16 16:08:12 UTC
Issue confirmed, and tracked down to the fact meson passes the build-time file to meson.add_install_script() instead of the install-time one, which has gone through the stripping process and everything.
I'm looking at ways to get meson to give us the right file.

On an other note, I'm not sure that having unnecessary rpath entries should be a blocker for the release; do you? As you said, distros have been shipping this for a while and I'm not aware of any issue this has caused.
Comment 2 Emil Velikov 2018-11-16 16:15:06 UTC
Thanks the amazingly fast reaction Eric.
Agreed, it's not serious enough to be a blocker - got trigger happy.
Comment 3 Eric Engestrom 2018-11-16 16:43:02 UTC
OK, I raised an issue with meson: https://github.com/mesonbuild/meson/issues/4523

To be clear, this affects all the megadrivers: dri, gallium, va, vdpau & xvmc.

I'm trying something that might work around this bug, but I'm not sure it's gonna be reliable at all (it involves guessing the install path).
Comment 4 Dylan Baker 2018-11-16 17:35:59 UTC
Yeah, it looks like this is an odd interaction between the install megadrivers script and meson.

I'll go ahead and look into it, hopefully we can get this in for the 0.49 release scheduled for December 9th.
Comment 5 Eric Engestrom 2019-04-01 08:00:26 UTC
Fixed by:

commit aa7afe324c2092fb31f9498cb3eda47dda96e6f2
Author: Eric Engestrom <eric.engestrom@intel.com>
Date:   Tue Mar 26 11:21:09 2019 +0000

    meson: strip rpath from megadrivers
    
    More specifically, use the library file that has been post-processed by Meson
    when creating the hardlinks.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.