Spack: ParaView installs libraries to prefix/lib64 but creates empty prefix/lib making ParaView's modulefile invalid
@utkarsh.ayachit @patchett2002
Some context for this. CMake is making a decision to set CMAKE_INSTALL_LIBDIR to lib64. Apparently, this is an attempt to match the host install infrastructure. This decision is not handled well with Spack. ParaView libraries, VTK libraries, CMake files, and python modules are installed to prefix/lib64, but empty directories are still created in prefix/lib. The Spack generated modulefile for ParaView has a condition:
if {[file isdirectory "/path/to/linux-rhel7-x86_64/gcc-7.4.0/paraview-5.8.1-eo5nay2rlcoeghg4pxysx4tubhyqxexv/lib"]} {
setenv PARAVIEW_LIB_DIR "/path/to/linux-rhel7-x86_64/gcc-7.4.0/paraview-5.8.1-eo5nay2rlcoeghg4pxysx4tubhyqxexv/lib"
setenv VTK_DIR "/path/to/linux-rhel7-x86_64/gcc-7.4.0/paraview-5.8.1-eo5nay2rlcoeghg4pxysx4tubhyqxexv/lib/cmake/paraview-5.8"
} elseif {[file isdirectory "/path/to/linux-rhel7-x86_64/gcc-7.4.0/paraview-5.8.1-eo5nay2rlcoeghg4pxysx4tubhyqxexv/lib64"]} {
setenv PARAVIEW_LIB_DIR "/path/to/linux-rhel7-x86_64/gcc-7.4.0/paraview-5.8.1-eo5nay2rlcoeghg4pxysx4tubhyqxexv/lib64"
setenv VTK_DIR "/path/to/linux-rhel7-x86_64/gcc-7.4.0/paraview-5.8.1-eo5nay2rlcoeghg4pxysx4tubhyqxexv/lib64/cmakeparaview-5.8"
}
Since there is a prefix/lib, PARAVIEW_LIB_DIR and VTK_DIR are set to the wrong path. This causes issues when building codes against that ParaView with errors like:
20 By not providing "FindVTK.cmake" in CMAKE_MODULE_PATH this project has
21 asked CMake to find a package configuration file provided by "VTK", but
22 CMake did not find one.
23
24 Could not find a package configuration file provided by "VTK" with any of
25 the following names:
Edited by Ethan Stam