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

curl linking problem for ISMRMD with system HDF5 on Ubuntu 22.04 #935

Open
Cate-Gascoigne opened this issue Jan 8, 2025 · 0 comments
Open

Comments

@Cate-Gascoigne
Copy link

When choosing USE_SYSTEM_HDF5=ON, CMake finds the Ubuntu hdf5 libraries. However, we get the following error

cd /home/cate/devel/build/builds/ISMRMRD/build/utilities && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/ismrmrd_generate_cartesian_shepp_logan.dir/link.txt --verbose=ON
/usr/bin/c++ -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED -Wall -std=c++11 -Werror -O3 -DNDEBUG -rdynamic CMakeFiles/ismrmrd_generate_cartesian_shepp_logan.dir/generate_cartesian_shepp_logan.cpp.o CMakeFiles/ismrmrd_generate_cartesian_shepp_logan.dir/ismrmrd_phantom.cpp.o -o ismrmrd_generate_cartesian_shepp_logan  -Wl,-rpath,/home/cate/devel/build/builds/ISMRMRD/build:/home/cate/anaconda3/lib:/usr/lib/x86_64-linux-gnu/hdf5/serial: ../libismrmrd.so.1.13.7 /home/cate/anaconda3/lib/libboost_program_options.so.1.82.0 -lfftw3 -lfftw3f /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so /usr/lib/x86_64-linux-gnu/libpugixml.so.1.12
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_global_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_perform@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_slist_free_all@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_setopt@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_init@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_slist_append@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_easy_cleanup@CURL_OPENSSL_4'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so: undefined reference to `curl_global_cleanup@CURL_OPENSSL_4'
collect2: error: ld returned 1 exit status

@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.

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

No branches or pull requests

1 participant