[release] Fixes finding static scotch metis bindings
Using Scotch a replacement work on Debian only for the default shared libraries. But to use the ones supporting larger integer types one needs to use the static version (shared ones are missing!). This MR fixes finding static Scotch/PT-Scotch instead of METIS/ParMETIS.
Please cherry-pick to the release.
Merge request reports
Activity
Your change breaks ParMETIS detection for me. Tested with openSuse 42.1, GCC 6 and ParMETIS 4.0.3.
Relevant part from the CMakeError.log:
gmpx library directory: /usr/lib64/libgmpxx.so Determining if the function parmetis_v3_partkway exists failed with the following output: Change Dir: /temp/gruenich/dune/complete/dune-istl/build-cmake/CMakeFiles/CMakeTmp Run Build Command:"/usr/bin/gmake" "cmTC_a8bd3/fast" /usr/bin/gmake -f CMakeFiles/cmTC_a8bd3.dir/build.make CMakeFiles/cmTC_a8bd3.dir/build gmake[1]: Entering directory '/temp/gruenich/dune/complete/dune-istl/build-cmake/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o /usr/bin/gcc-6 -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/hwloc/hwloc172/hwloc/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent -I/usr/lib64/mpi/gcc/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include -I/usr/lib64/mpi/gcc/openmpi/include -I/usr/lib64/mpi/gcc/openmpi/include/openmpi -I/temp/gruenich/dune/zusatz/parmetis-4.0.3/install/include -DCHECK_FUNCTION_EXISTS=parmetis_v3_partkway -o CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c Linking C executable cmTC_a8bd3 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a8bd3.dir/link.txt --verbose=1 /usr/bin/gcc-6 -DCHECK_FUNCTION_EXISTS=parmetis_v3_partkway CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o -o cmTC_a8bd3 -rdynamic CMakeFiles/cmTC_a8bd3.dir/CheckFunctionExists.c.o: In function `main': CheckFunctionExists.c:(.text+0x15): undefined reference to `parmetis_v3_partkway' collect2: error: ld returned 1 exit status CMakeFiles/cmTC_a8bd3.dir/build.make:97: recipe for target 'cmTC_a8bd3' failed gmake[1]: *** [cmTC_a8bd3] Error 1 gmake[1]: Leaving directory '/temp/gruenich/dune/complete/dune-istl/build-cmake/CMakeFiles/CMakeTmp' Makefile:126: recipe for target 'cmTC_a8bd3/fast' failed gmake: *** [cmTC_a8bd3/fast] Error 2 Determing location of ARPACK failed:
Added 1 commit:
- 1606ed1f - Readd PARMETIS_LIBRARY to CMAKE_REQUIRED_LIBRARIES.
Added 1 commit:
- 8b565d2b - [release] Search for helper libraries only in the directory of main lib.
mentioned in issue #17 (closed)
Don't squash anything - I'll just cherry-pick the merge commit for the MR anyway.
This test is turning into a rather ugly beast - I had to read the code twice to understand the point of the
_CMAKE_REQUIRED_LIBRARIES
store / restore hack. I think it would be more understandable using the standardcmake_{push,pop}_check_state()
, but I'll just merge this now, otherwise it won't make the release.Reassigned to @smuething
Added backport label
mentioned in commit 834efd97
mentioned in commit 78ebeed6
Mentioned in commit 834efd97