Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent snapcraft patching RPATH for library dependencies #122

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

WebDrake
Copy link
Contributor

By default snapcraft will rewrite the RPATH of binaries to link against libraries in the core snap. However, the prebuilt binaries used in the LDC package are designed and expected to link against host system libs. To allow them to do this we need to explicitly instruct snapcraft using the no-patchelf build attribute.

For background see: https://forum.snapcraft.io/t/librt-so-1-undefined-symbol-clock-nanosleep/16246/2

This should allow LTO builds with LDC >= 1.21.0 to work on more recent systems (e.g. Ubuntu 20.04+).

Fixes #121

By default snapcraft will rewrite the RPATH of binaries to link against
libraries in the core snap.  However, the prebuilt binaries used in the
LDC package are designed and expected to link against host system libs.
To allow them to do this we need to explicitly instruct snapcraft using
the `no-patchelf` build attribute.

For background see:
https://forum.snapcraft.io/t/librt-so-1-undefined-symbol-clock-nanosleep/16246/2

This should allow LTO builds with LDC >= 1.21.0 to work on more recent
systems (e.g. Ubuntu 20.04+).

Fixes ldc-developers#121
@WebDrake WebDrake added the bug label Mar 25, 2021
@WebDrake WebDrake merged commit a34959e into ldc-developers:1.21 Mar 30, 2021
@WebDrake WebDrake deleted the no-patchelf branch March 30, 2021 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant