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

Handle rpath for dependency across sub-directories #509

Closed
metab0t opened this issue Oct 4, 2023 · 0 comments · Fixed by #510
Closed

Handle rpath for dependency across sub-directories #509

metab0t opened this issue Oct 4, 2023 · 0 comments · Fixed by #510

Comments

@metab0t
Copy link
Contributor

metab0t commented Oct 4, 2023

If a project has two directories: dirA and dirB

meson.build

_link_to = []

subdir('dirA')
_linkto += libA

subdir('dirB')

dirB\meson.build

meson.build

py = import('python').find_installation()
py.extension_module(
    'libB',
    'libB.c',
    link_with: _linkto,
    install: true,
)

Then the libB.so will have rpath=['$ORIGIN/../dirA'], which cannot be fixed by current mechanism (only applicable to $ORIGIN/)

if '$ORIGIN/' in rpath:

Sample folder:
link-against-local-lib.tar.gz

metab0t added a commit to metab0t/meson-python that referenced this issue Oct 4, 2023
Some library may contain RPATH like '$ORIGIN/../src' and should be fixed as well
Fixes: mesonbuild#509
metab0t added a commit to metab0t/meson-python that referenced this issue Oct 4, 2023
Some library may contain RPATH like '$ORIGIN/../src' and should be fixed as well
Fixes: mesonbuild#509
dnicolodi pushed a commit to metab0t/meson-python that referenced this issue Oct 4, 2023
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 pushed a commit to metab0t/meson-python that referenced this issue Oct 4, 2023
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 pushed a commit that referenced this issue Oct 5, 2023
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 #509.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant