-
Notifications
You must be signed in to change notification settings - Fork 18
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
curl linking problem for ISMRMD with system HDF5 on Ubuntu 22.04 #935
Comments
Discussion with @KrisThielemans
Decision is to set the |
@paskino I tried this on the 3.6.0 VM and there it works. I found this is because on that system On debian/ubuntu, this can be done with
which we do for our VM/docker SIRF-SuperBuild/docker/build_system-ubuntu.sh Lines 56 to 59 in 5f1a7f4
Could you confirm that on the system where you had problems, PS: We do recommend already to our users to use that install script, https://github.com/SyneRBI/SIRF/wiki/SIRF-SuperBuild-Ubuntu#1-install-dependencies-via-apt |
I've created https://gitlab.kitware.com/cmake/cmake/-/issues/26654, but don't really expect a fix in CMake. |
we already do SIRF-SuperBuild/SuperBuild.cmake Line 189 in 5f1a7f4
|
I tested the docker build on master:
|
Does it fail with the above error? is |
That's what CMake finds. I think the problem is that HDF5 is installed both by conda and on ubuntu system if CMake SuperBuild log
CMake ISMRMRD log
|
I tried not to install the SIRF-SuperBuild/docker/build_gadgetron-ubuntu.sh Lines 8 to 13 in 5f1a7f4
However I suggest to move the installation of |
I did a test on my local machine with a new conda env with only h5py (
Running with
Root cause therefore:
Indeed, https://github.com/SyneRBI/SIRF/wiki/Building-SIRF-and-CIL-with-conda says to add Summary: when using conda, install both |
While this might build, I think it's a failing strategy unfortunately. Reason: we build with system hdf5, and then install conda hdf5, so any python program will use the conda hdf5 shared library at run-time, while ISMRMRD, STIR and possibly ITK assume it will be the system hdf5. In my experience, this can easily lead to segfaults. (libgcc shared libraries are backwards compatible somehow, hdf5 shared libraries are not). The only case where this might be safe is if we are NOT using the conda env where CIL is installed. I have no idea if this is the case, but it seems unlikely. I see 3 solutions:
|
On the VM we use the system python, while on docker we install conda or better conda is installed by the base image to run jupyter. I agree that it is dangerous, but I thought that once built, the libraries would find the libraries they had been linked to during the build. I might be wrong. Several CIL requirements are needed for reading scanner data such as However, this docker image is the base of the joined courses that we've been running, therefore we've kept the full list of dependencies. If I remember correctly It may not be a bad idea to use conda packages all the way through. Gadgetron has a list in their |
When choosing
USE_SYSTEM_HDF5=ON
, CMake finds the Ubuntu hdf5 libraries. However, we get the following error@KrisThielemans thinks this is because APT installs HDF5 with its
hdf5-config.cmake
, and CMake does not know it needs to link with curl.Adding
-lcurl
to the above line resolves this, but this is not really a SIRF or even ISMRMRD problem.The text was updated successfully, but these errors were encountered: