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

BUG: fix all RPATHs that start with $ORIGIN #510

Merged
merged 1 commit into from Oct 5, 2023

Conversation

metab0t
Copy link
Contributor

@metab0t metab0t commented Oct 4, 2023

Attempt to fix #509

Copy link
Member

@dnicolodi dnicolodi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This looks good. Just one comment.

Well, two actually. The commit message should be something like: BUG: fix all RPATHs that start with $ORIGIN or something similar, where the BUG: prefix is the important change. It would also be great to explain the motivation for the change in the commit message (something similar to the description of the issue). And it should contain Fixes: #509. as last line.

tests/packages/link-against-local-lib/ext/examplemod.c Outdated Show resolved Hide resolved
@dnicolodi
Copy link
Member

This fixes only the the RPATH handling for ELF binaries on Linux. The macOS code needs a similar change.

@metab0t metab0t force-pushed the rpath_fix branch 2 times, most recently from bf2f0f7 to 98d3544 Compare October 4, 2023 18:18
@metab0t metab0t changed the title Fix all rpaths that starts with '$ORIGIN/' BUG: fix all RPATHs that start with $ORIGIN Oct 4, 2023
mesonpy/_rpath.py Outdated Show resolved Hide resolved
mesonpy/_rpath.py Outdated Show resolved Hide resolved
When shared libraries are build in a project subdir or in a
subproject, the RAPTH added by meson pointing to the shared library
build directory is not just '$ORIGIN/' but a longer relative path.

Apply the same fix to all RPATHs that start with '$ORING/'.

Fixes mesonbuild#509.
@dnicolodi
Copy link
Member

I've pushed a patch that fixes the identified issues. Please take a look.

@metab0t
Copy link
Contributor Author

metab0t commented Oct 4, 2023

I've pushed a patch that fixes the identified issues. Please take a look.

Thanks for the fix! LGTM

@dnicolodi dnicolodi merged commit edf8ba2 into mesonbuild:main Oct 5, 2023
36 checks passed
@metab0t metab0t deleted the rpath_fix branch October 5, 2023 08:05
metab0t added a commit to metab0t/HiGHS that referenced this pull request Oct 5, 2023
meson-python 0.14.0 has a bug that handles rpath of python binding incorrectly.
Use 0.13.2 temporarily as a fix.
The upstream fix has landed in mesonbuild/meson-python#510
@rgommers rgommers added this to the v0.15.0 milestone Oct 5, 2023
@rgommers rgommers added the bug Something isn't working label Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle rpath for dependency across sub-directories
3 participants