Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#60345 - [netcdf] cmake cannot find hdf5 dependency
Attached to Project:
Community Packages
Opened by Tobias Kremer (tokremer) - Monday, 08 October 2018, 08:42 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Tuesday, 09 October 2018, 09:32 GMT
Opened by Tobias Kremer (tokremer) - Monday, 08 October 2018, 08:42 GMT
Last edited by Bruno Pagani (ArchangeGabriel) - Tuesday, 09 October 2018, 09:32 GMT
|
DetailsDescription:
After installing version 1.10.3-2 of hdf5 library every cmake project fails to build the netcdf-cxx library due to missing hdf5 libraries. The size of the installation varys 57.54 MB from 1.10.3-1 to 1.10.3-2 which is probably due to missing shared libs. Additional info: * First occurence during the update to version 1.10.3-2 Steps to reproduce: mkdir temp git clone https://github.com/Unidata/netcdf-cxx4.git cd netcdf-cxx4 mkdir build cd build cmake .. Output of the cmake script: -- The C compiler identification is GNU 8.2.1 -- The CXX compiler identification is GNU 8.2.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- HDF5: Using hdf5 compiler wrapper to determine C configuration -- Looking for nc_use_parallel_enabled in netcdf CMake Error at /home/tokremer/Code/PhD/source/third_party/netcdf-cxx4/build/CMakeFiles/CMakeTmp/CMakeLists.txt:16 (add_executable): Target "cmTC_fcdfd" links to target "hdf5::hdf5_hl-shared" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? CMake Error at /home/tokremer/Code/PhD/source/third_party/netcdf-cxx4/build/CMakeFiles/CMakeTmp/CMakeLists.txt:16 (add_executable): Target "cmTC_fcdfd" links to target "hdf5::hdf5-shared" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? CMake Error at /usr/share/cmake-3.12/Modules/CheckLibraryExists.cmake:56 (try_compile): Failed to generate test project build system. Call Stack (most recent call first): CMakeLists.txt:339 (CHECK_LIBRARY_EXISTS) -- Configuring incomplete, errors occurred! |
This task depends upon
Closed by Bruno Pagani (ArchangeGabriel)
Tuesday, 09 October 2018, 09:32 GMT
Reason for closing: Fixed
Additional comments about closing: netcdf 4.6.1-3
Tuesday, 09 October 2018, 09:32 GMT
Reason for closing: Fixed
Additional comments about closing: netcdf 4.6.1-3
CMake Error at /home/tokremer/Code/PhD/source/third_party/netcdf-cxx4/build/CMakeFiles/CMakeTmp/CMakeLists.txt:16 (add_executable):
Target "cmTC_fcdfd" links to target "hdf5::hdf5-shared" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED
This is plainly coming from a transient dependency, because why is it looking for a cmake target "hdf5::hdf5-shared"?
And sure enough, this depends on netcdf to build, and netcdf -- but not hdf5 -- comes with cmake files.
$ grep 'hdf5::hdf5_hl-shared' /usr/lib/cmake/netCDF/netCDFTargets.cmake
INTERFACE_LINK_LIBRARIES "hdf5::hdf5_hl-shared;hdf5::hdf5-shared;/usr/lib/libm.so;/usr/lib/libsz.so;/usr/lib/libcurl.so"
The problem is that hdf5 at one point was built with cmake due to faulty reasons, which has now been reverted. But the netcdf package was built against the cmake build and it *remembers* this, so it's trying to find the cmake files...
It should be an easy fix, just rebuild netcdf against the current hdf5.