Fixes relative to RPATH handling - #788
Conversation
3c3bcf5 to
f84c84f
Compare
54c1583 to
21c079d
Compare
|
This should fix RPATH handling for good. The only thing not included is automatic translation of the There is one case in which this may break projects that work now: when libraries or modules require setting an RPATH to dynamically link to a library installed in the Python install path (with something like @rgommers I think I added test cases for all scenarios we discussed. It would be great if you could test with packages that may be affected and that do not pin the meson-python version to any released version. |
87b4cee to
1fa120b
Compare
This entries are not meaningful. This has the additional benefit of not returning an empty string RPATH entry for binaries with RPATH unset.
This reorganizes the test package to a flatter layout that helps visualizing all the parts involved in the test and introduces an asymmetry between the source layout and the installation layout that demonstrates the bugs in RPATH handling as currently implemented.
meson-python does not support `install_rpath` yet and Meson does not expose it in introspection data prior to version 1.6.0. Use `link_args` to set the RPATH.
macOS requires using `@loader_path` in place of `$ORIGIN`.
This shows that build RPATHs are not correctly stripped.
This does not introduce any functional changes, except removing duplicates entries from RPATH. Fixes mesonbuild#813.
There is no need to perform the check for every native file installed.
for packages using internal shared libraries relocated by meson-python. Fixes mesonbuild#711.
Revise tests to exercise support when executed with Meson > 1.6
Requires Meson 1.9.0.
|
I think it is about time that we straighten out our RPATH story, thus tentatively marking this for the next release. However, it still needs a decision regarding the handling of the anchors in |
|
@rgommers I want to add extended tests in CI that test building SciPy (and maybe some other projects later). I had a quick look at how to do it and I didn't find what the preferred way of building SciPy is these days. Should I use pixi, spin, or something else? Or is downloading the source distribution and installing with pip or uv the way to go? The latter seems the easiest but pip does not have a way to install the build dependencies for a package and disabling build isolation is by far the simplest to test a local version of meson-python. |
|
Hmm, are you sure - that's a really heavy build (10-15 min), and it's nontrivial to set up because of the BLAS dependency. Or are you thinking as a one-off or some sort of extended test suite? We do test And that doesn't test all RPATH rewriting issues. I think what we probably need for more coverage is a macOS SciPy job against main? Re building:
I did plan on getting back to this PR after the release. It'd be great to get this merged soon. |
|
I was thinking to add an extended test suite gated on all the existing CI jobs to complete successfully. However, I didn't expect SciPy to take 15 min to compile, it is a long time since I had to do it. Do you think it is worth having something like this in our CI? |
|
Does ccache not help here? I know that scipy takes a while because it has 1200 compile edges, with quite a bit of C++. On my laptop (znver5, -j16) it takes But on a second run, it completes significantly faster: |
|
(Needing to compile all of highs despite a system package existing for it, surely is not helping compile times. Compiling that package from source with |
I'm inclined to say no here. I think there's a lot of value in our CI being simple and very fast. We'd make the completion time way longer, and the setup quite a bit more maintenance-intensive. I'd much rather add more CI jobs in SciPy's CI that use meson-python's main branch on different platforms. I do like the idea of better integration testing though. I think we can (a) push more of our large users to test our
Yes it does, and we use it in SciPy - but that comes with its own extra work; two job steps per build, cache management, having to run CI jobs on |
Builds on top of #783 and replaces #724
Fixes #725
Fixes #813