Description of problem: When using CMake to build against VTK, it's possible that the netcdf-cxx-devel package can be missing from a user's system, resulting in linker errors in the downstream project. Version-Release number of selected component (if applicable): vtk-devel-6.1.0-26.fc22.x86_64 How reproducible: Create a directory with a CMakeLists.txt containing the following: cmake_minimum_required(VERSION 3.0) project(vtkcmake) find_package(VTK REQUIRED) message(STATUS "VTK Libraries: ${VTK_LIBRARIES}") add_executable(vtktest vtktest.cpp) target_link_libraries(vtktest ${VTK_LIBRARIES}) And create a vtktest.cpp, containing the following: int main() { return 0; } Run cmake, and observe the output from the status message: -- VTK Libraries: vtkGUISupportQtWebkit;vtkViewsQt;vtkGUISupportQt;vtkCommonExecutionModel;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkFiltersExtraction;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkalglib;vtkInteractionStyle;vtkFiltersSources;vtkRenderingCore;vtkFiltersGeometry;vtkRenderingOpenGL;vtkImagingHybrid;vtkIOImage;vtkDICOMParser;vtkIOCore;/usr/lib64/libz.so;vtkmetaio;/usr/lib64/libjpeg.so;/usr/lib64/libpng.so;/usr/lib64/libtiff.so;vtkViewsInfovis;vtkChartsCore;vtkCommonColor;vtkInfovisCore;vtkRenderingContext2D;vtkRenderingFreeType;/usr/lib64/libfreetype.so;vtkftgl;vtkFiltersImaging;vtkImagingGeneral;vtkImagingSources;vtkFiltersModeling;vtkInfovisLayout;vtkRenderingLabel;vtkViewsCore;vtkInteractionWidgets;vtkFiltersHybrid;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkIOSQL;vtksqlite;vtkIOParallel;vtkFiltersParallel;vtkParallelCore;vtkIOLegacy;vtkIONetCDF;/usr/lib64/libnetcdf_c++.so;/usr/lib64/libnetcdf.so;/usr/lib64/libhdf5.so;/usr/lib64/libdl.so;/usr/lib64/libm.so;/usr/lib64/libhdf5_hl.so;vtkIOXML;vtkIOGeometry;/usr/lib64/libjsoncpp.so;vtkIOXMLParser;/usr/lib64/libexpat.so;vtkexoIIc;vtkFiltersAMR;vtkWrappingJava;vtkWrappingTools;verdict;/usr/lib64/libtheoraenc.so;/usr/lib64/libtheoradec.so;/usr/lib64/libogg.so;vtkRenderingGL2PS;/usr/lib64/libgl2ps.so;vtkImagingStencil;vtkLocalExample;vtkGUISupportQtSQL;vtkImagingStatistics;/usr/lib64/libpython2.7.so;vtkGeovisCore;vtkproj4;vtkInteractionImage;vtkFiltersSMP;vtkFiltersHyperTree;vtkRenderingImage;vtkFiltersSelection;vtkIOLSDyna;vtkViewsGeovis;vtkIOPLY;vtkRenderingVolumeOpenGL;vtkFiltersStatisticsGnuR;vtkIOInfovis;/usr/lib64/libxml2.so;vtkRenderingQt;vtkFiltersTexture;vtkRenderingFreeTypeOpenGL;vtkImagingMorphological;vtkFiltersProgrammable;vtkImagingMath;vtkIOExport;vtkViewsContext2D;vtkIOMINC;vtkFiltersGeneric;vtkIOEnSight;vtkRenderingLIC;vtkWrappingPythonCore;vtkDomainsChemistry;vtkFiltersFlowPaths;vtkIOMovie;vtkFiltersParallelImaging;vtkIOAMR;vtkGUISupportQtOpenGL;vtkIOExodus;vtkRenderingLOD;vtkFiltersVerdict;vtkIOImport;vtkIOVideo;vtkRenderingVolumeAMR;vtkTestingRendering And then run make to produce the following error: Scanning dependencies of target vtktest [100%] Building CXX object CMakeFiles/vtktest.dir/vtktest.cpp.o make[2]: *** No rule to make target '/usr/lib64/libnetcdf_c++.so', needed by 'vtktest'. Stop. The VTK_LIBRARIES variable contains /usr/lib64/libnetcdf_c++.so, which is provided by netcdf-cxx-devel: $ sudo dnf provides /usr/lib64/libnetcdf_c++.so netcdf-cxx-devel-4.2-11.fc22.x86_64 : Development files legacy netCDF C++ library Repo : fedora Installing the above package fixes the issue. The problem is that it's possible to install vtk-devel without netcdf-cxx-devel, leading to the above error case. Actual results: Installing vtk-devel provides all of the packages required to build against vtk using cmake Expected results: Missing netcdf-cxx-devel Additional info: I encountered this with the pcl package, which builds againt vtk and uses the VTK_LIBRARIES in its own cmake output. I worked around it by adding a buildrequires on the netcdf package, and unfortunately never traced the issue back to the root cause until now. As you address this, you should probably double-check that vtk-devel properly requires the devel packages for all of the libs in the VTK_LIBRARIES output. I may have gotten lucky that the rest of the devel packages were installed.
vtk-6.1.0-27.fc22 has been submitted as an update for Fedora 22. https://admin.fedoraproject.org/updates/vtk-6.1.0-27.fc22
vtk-6.1.0-27.fc22 works
Package vtk-6.1.0-27.fc22: * should fix your issue, * was pushed to the Fedora 22 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing vtk-6.1.0-27.fc22' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-8967/vtk-6.1.0-27.fc22 then log in and leave karma (feedback).
vtk-6.1.0-27.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Can you backport this to Fedora 21? Thank you :)
vtk-6.1.0-24.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/vtk-6.1.0-24.fc21
Package vtk-6.1.0-24.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing vtk-6.1.0-24.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-10747/vtk-6.1.0-24.fc21 then log in and leave karma (feedback).
vtk-6.1.0-24.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.