Summary: | sci-libs/vtk-6.1.0-r1 fails to find system netcdf-c++ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marius N Sletten <mariusns> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kredba, sci |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
VTK-6.1.0/CMake/FindNetCDF.cmake patch
Updated ebuild emerge --info Build log |
Created attachment 409212 [details]
Updated ebuild
Created attachment 409214 [details]
emerge --info
Please attach the failing build log. Created attachment 409894 [details]
Build log
Build log of failed vtk build
which version of sci-libs/netcdf-cxx do you have installed? sci-libs/netcdf: 4.3.2-r1 sci-libs/netcdf-cxx: 4.2-r300 at slot 3 and 4.2.1 at slot 0 vtk builds against libnetcdf_c++.so.4 from the 4.2-r300 version and both builds fine. So 4.2.1 in slot 0 is not relevant with libnetcdf_c++4.so. The only problem here was the macro, NetCDF_check_interface, inside FindNetCDF.cmake. Where find_path and find_library has NO_DEFAULT_PATH as last parameter. I didnt check how NO_DEFAULT_PATH is set. NO_DEFAULT_PATH=/usr/local It works here, so I need to figure out what is different on your system. On the top of the FindNetCDF.cmake I addad a few lines: if (NETCDF_INCLUDE_DIR AND NETCDF_LIBRARY) # Already in cache, be silent set (NETCDF_FIND_QUIETLY TRUE) endif () message("NETCDF_CXX NETCDF_INCLUDE_DIR: ${NETCDF_INCLUDE_DIR}") message("NETCDF_CXX NETCDF_LIBRARY: ${NETCDF_LIBRARY}") where, $ ebuild vtk-6.1.0-r1.ebuild configure gives: NETCDF_CXX NETCDF_INCLUDE_DIR: /usr/local/include NETCDF_CXX NETCDF_LIBRARY: /usr/local/lib64/libnetcdf.so -- Failed to find NetCDF interface for CXX CMake Error at CMake/FindPackageHandleStandardArgs.cmake:97 (MESSAGE): Could NOT find NetCDF (missing: NETCDF_HAS_INTERFACES) implying: NetCDF_lib_dirs = /usr/local/lib64 using NO_DEFAULT_PATH) and NetCDF_lib_dirs = /usr/lib64 using DEFAULT_PATH Same result with the find_path for NETCDF_INCLUDE_DIR inside the macro NetCDF_check_interface And YES, I had a copy similar to sci-libs/netcdf-4.3.2-r1 on /usr/local from a local git install of moose, http://mooseframework.org/. Sorry, I didnt know! These files are removed and the vtk ebuild in portage works fine now. So the real problem here: When a copy of sci-libs/netcdf is placed in /usr/local then sci-libs/vtk requires sci-libs/netcdf-cxx to be installed at the same path. Not very PIC compatible. Also, primary search paths, INCLUDES/LIBS, should come first if there's parallel installs of anything. Is there a USE-flag switch for this? A little strange if you have your own modified copy of netcdf. I would still like to have a patch for the FindNetCDF.cmake in vtk to correct this. Reproduce error by: $ ln -s /usr/include/netcdf.h /usr/local/include/netcdf.h $ cd /usr/portage/sci-libs/vtk $ ebuild vtk-6.1.0-r1.ebuild configure My use-flags: USE="X boost doc ffmpeg imaging python qt4 rendering smp tbb theora views" PYTHON_TARGETS="python2_7" Un-CCing Java since this doesn't look like our battle. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4dd17f5b702e2f5fd47c9ddf33bd306b1a8dffab commit 4dd17f5b702e2f5fd47c9ddf33bd306b1a8dffab Author: Andreas Sturmlechner <asturm@gentoo.org> AuthorDate: 2019-12-28 16:05:59 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2019-12-28 16:09:54 +0000 sci-libs/vtkdata: Remove last-rited package Closes: https://bugs.gentoo.org/542756 Closes: https://bugs.gentoo.org/554388 Closes: https://bugs.gentoo.org/555768 Closes: https://bugs.gentoo.org/557974 Closes: https://bugs.gentoo.org/574854 Closes: https://bugs.gentoo.org/574890 Closes: https://bugs.gentoo.org/589182 Closes: https://bugs.gentoo.org/590640 Closes: https://bugs.gentoo.org/612302 Closes: https://bugs.gentoo.org/622574 Closes: https://bugs.gentoo.org/698940 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> profiles/package.mask | 7 ------- sci-libs/vtkdata/Manifest | 1 - sci-libs/vtkdata/metadata.xml | 8 -------- sci-libs/vtkdata/vtkdata-6.1.0.ebuild | 26 -------------------------- 4 files changed, 42 deletions(-) |
Created attachment 409210 [details, diff] VTK-6.1.0/CMake/FindNetCDF.cmake patch Due to wrong path hits in VTK-6.1.0/CMake/FindNetCDF.cmake, NO_DEFAULT_PATH. configure fails finding the system netcdf-c++ libs and includs. Quick fix is this attached patch and ebuild :-)