Repository navigation
Adopt meson-python install_rpath for runtime library paths - #274
antonwolfy wants to merge 2 commits into
Conversation
Consolidate the installed runtime library search paths into a single install_rpath argument on the loops shared library and both extension modules, replacing the previous -Wl,-rpath link_args workaround. meson-python 0.22 honors install_rpath and no longer preserves the RPATH entries meson auto-inserts for internal link_with dependencies, so the extension modules could no longer locate the co-located libmkl_umath_loops.so at import time on Linux/macOS. Requesting the package directory ($ORIGIN / @loader_path) via install_rpath restores that, and folds the MKL runtime search paths into the same mechanism. Raise the minimum build-time meson-python requirement to 0.22.0 in pyproject.toml and both conda recipes accordingly.
Blocked on Python 3.10 support — revisit once 3.10 is droppedThe
conda-forge dependency floor by version, for reference:
The RPATH change itself is validated: the Linux 3.11+ conda builds produce extension modules with the intended RPATH ( PlanKeep this PR open. Revise/merge it once the project drops Python 3.10 ( |
jharlow-intel
left a comment
There was a problem hiding this comment.
Thanks for exploring this! Using install_rpath is the cleaner long-term setup, and the comment explaining each path is really helpful. Since #275 already fixed the ImportError and shipped in 0.6.0, I think the main question is timing; a couple of thoughts below.
- Now that #275 covers the meson-python 0.22 case on every version, do we still want this, or should we park it until the floor can move? It also conflicts with main on the same
meson.buildlines, and when rebasing, the changelog entry would need to move out of the released 0.6.0 section.
| - {{ compiler('dpcpp') }} >=2024.2 # [not osx] | ||
| host: | ||
| - meson-python >=0.16.0 | ||
| - meson-python >=0.22.0 |
There was a problem hiding this comment.
I think this one needs sorting out before merge: the 0.22 floor would drop Python 3.10 from the conda builds. conda-forge's meson-python 0.22 packages are noarch with python >=3.11, so a 3.10 env can't solve, which matches the CI here (only the 3.10 builds fail, and the rest were cancelled). PyPI's 0.22 still supports 3.10, so it's just the conda side. Worth keeping the raw link_args from #275 until 3.10 is dropped?
There was a problem hiding this comment.
Yes, the idea is to keep the PR as draft until support of python 3.10 is dropped
This PR migrates the installed RPATH handling to meson-python's
install_rpathargument and raises the minimum build-timemeson-pythonrequirement to0.22.0.Previously the runtime library search paths were injected as raw
-Wl,-rpath,...link_args, which existed only because meson-python < 0.22 ignored theinstall_rpathargument. meson-python 0.22 (released 2026-09-25) adds first-classinstall_rpathsupport and, in the same release, stops preserving the$ORIGINRPATH that Meson auto-inserts for internallink_withdependencies. The extension modules relied on that auto-inserted entry to locate the co-locatedlibmkl_umath_loops.so, so builds against meson-python 0.22 fail at import time on Linux:This surfaced as red
test_linuxjobs on unrelated PRs (e.g. #273) with no code change, once conda-forge shipped meson-python 0.22.