-
Notifications
You must be signed in to change notification settings - Fork 701
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
netCDF 4.9.0 tests fail when RPATH support is enabled #17983
Comments
I think this is not so much because you enabled |
This rings a bell, I could've sworn I ran into this (and maybe even fixed it somehow), but I'm not sure it was with |
Unless it somehow does this automatically (but I don't think that's the case?), I'm not filtering |
I'm now seeing similar issues for other packages that use the
I checked the build dir of a Xerces build (with EB RPATH support disabled), and can indeed confirm that the executables that were called for the tests had an RPATH pointing to, in this case, I guess that, with EB RPATH support enabled, this RPATH entry gets overwritten / ignored by the RPATH wrappers of EB, resulting in executables that cannot find the shared libraries in the build directory anymore. I'm not sure if it's easy to detect this, but it would be nice if these directories that CMake wants to add to the RPATH, can somebow be added to (and, later on, removed again from) the ones from EB. Alternatively, we would have to set |
@boegel This settings instructs CMake to not do any RPATH stuff, and hence the tests (performed in the build directory) fail due to binaries not being able to locate shared libraries in the build directory. I just did some tests with |
Some more details: I did a
Then I added
So, that seems to contain both the paths added by EB (just like with the original easyconfig) and the one (the last one) added by CMake. Finally, when doing a full installation and checking a shared library in the installation directory:
So I don't see any signs of CMake stripping the EB-added paths in RPATH here. |
We saw a similar problem with GMP, see #11188, but there CMake is not involved. |
@pescobar Does this ring any bells for you? Have you seen failing test step for stuff like netCDF or json-c when installing with RPATH linking? I'm trying to figure out why not everyone is seeing problems due to the |
@boegel our installation with RPATH enabled passes the
my colleagues built this module long ago using I tried edit: update log |
I think netCDF 4.8.x also worked fine for me, don't know why though. I started encountering this issue with netCDF 4.9.0, do you have this version as well by any chance? |
We're only running the netCDF tests since v4.9.0 |
Based on some testing by @bedroge and some digging in the CMake commits in GitHub, it seems like the |
I've run several tests, also for For instance, with CMake 2.8.x I found that CMake does add RPATHs to the binaries in the build directory, but then removes them when it's actually installing them to the installation directory: With more recent CMake versions (e.g. 3.18.4) this problem is gone though: CMake will add some additional paths to RPATH during the build stage, as that's required to pass the tests that are run after the build step but before the install step. These additional paths are removed again when the binaries are getting installed, and you end up with only the paths added by EasyBuild. After @boegel found the commit that should fix this in CMake, I've tried the same thing with CMake 3.4.3 and 3.5.0, and indeed the issue was still there with 3.4.3, but it was gone when using 3.5.0: with that version, the behaviour is similar to version 3.18.4. Conclusion: it looks like |
Solved in easybuilders/easybuild-easyblocks#3012. |
When using
--rpath
, all tests fornetCDF-4.9.0-gompi-2022a.eb
fail due to:The binaries do actually have an
RPATH
section, but they point to the installation dir, while the tests run before the installation step. It also includes$ORIGIN:$ORIGIN/../lib:$ORIGIN/../lib64
, but the library is located in../liblib/
in the build dir...The text was updated successfully, but these errors were encountered: