Bug 12730 - meson strips RPATH during install
Summary: meson strips RPATH during install
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.6 M3
Assignee: Ross Burton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2018-05-04 01:51 UTC by Linus Svensson
Modified: 2018-09-27 13:39 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Linus Svensson 2018-05-04 01:51:09 UTC
The meson build system removes RPATH from binaries it installs. More info in: https://github.com/mesonbuild/meson/issues/314

This breaks -native builds for meson based packages.

There is support to add RPATH entries after install with the 'install_rpath' keyword, given to executable and shared_library family of functions in meson. This is, however, needed to be done in every package built with meson.
Comment 1 Ross Burton 2018-05-08 02:43:58 UTC
NetBSD has a work around: https://github.com/NetBSD/pkgsrc/commit/2fb2c013715a6374b4e2d1f8e9f2143e827f0f64
Comment 2 Linus Svensson 2018-05-08 04:33:03 UTC
I brought up this subject with Nirbheek Chauhan during GStreamer hackfest last weekend. This is one of the subjects he intends to discuss with Jussi at GUADEC, which starts at July 6.

Is it an option to set LD_LIBRARY_PATH in the environment?

Wouldn't it be best for OE if there was option in meson to control this, and only keep rpaths for -native packges? Or are there use cases for host builds as well?
Comment 3 Ross Burton 2018-06-21 13:03:35 UTC
Good news: appears to be fixed in meson git.
Comment 4 Linus Svensson 2018-06-21 13:31:26 UTC
Perhaps it's good enough to wait for a release with that fixed then.

I think we have one package that suffers from this problem, but we temporarily fixed it with patchelf.
Comment 5 Randy MacLeod 2018-09-24 14:41:37 UTC
Linus, is this fixed by:
   6c09949663 meson: update to 0.47.2
??
Comment 6 Ross Burton 2018-09-26 13:12:53 UTC
Closing as we believe this was solved with Meson 0.47.2.  Linus, if you can verify, that would be much appreciated.
Comment 7 Linus Svensson 2018-09-26 14:17:48 UTC
Hi,

Sure, I can verify this. I'll get back. Don't know if I can do it today or tomorrow, but I'll try to have it done before the weekend.
Comment 8 Linus Svensson 2018-09-27 13:39:14 UTC
Yes,

This works for me now.

Thanks.