With CMAKE_SKIP_RPATH=ON Paraview 5.2.0 gives error while compiling vtkkwProcessXML: can't find libvtksys.so.1
While building paraview 5.2.0 for openSUSE [1], the compilation fails at the point where it tries to build vtkkwProcessXML. Here's a relevant snippet:
[ 3246s] [ 22%] Linking CXX executable ../../bin/vtkkwProcessXML
[ 3246s] cd /home/abuild/rpmbuild/BUILD/ParaView-v5.2.0/build/Utilities/ProcessXML && /usr/bin/cmake -E cmake_link_script CMakeFiles/kwProcessXML.dir/link.txt --verbose=1
[ 3246s] /usr/bin/g++ -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -DNDEBUG -O2 -g -DNDEBUG -Wl,--no-undefined -lc -Wl,--no-undefined -lc -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now CMakeFiles/kwProcessXML.dir/ProcessXML.cxx.o -o ../../bin/vtkkwProcessXML -rdynamic ../../lib/libvtkCommonCore.so.1 ../../lib/libvtksys.so.1 -ldl
[ 3249s] ../../../bin/vtkkwProcessXML: error while loading shared libraries: libvtksys.so.1: cannot open shared object file: No such file or directory
But, of course libvtksys.so.1 is present in the same dire where libvtkCommonCore.so.1 is, and the latter is found perfectly. No idea what is going on here. The paraview/vtk cmake options passed are the following (same issue with Qt4 and Qt5, and irrespective of whether we pass the -DVTK_CUSTOM_LIBRARY_SUFFIX:STRING=""
option or not ):
-DPV_INSTALL_LIB_DIR:PATH=%{_lib}/%{name} \
-DVTK_INSTALL_INCLUDE_DIR:PATH=include/%{name} \
-DVTK_INSTALL_ARCHIVE_DIR:PATH=%{_lib}/%{name} \
-DVTK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/%{name} \
-DVTK_INSTALL_DATA_DIR=%{_datadir}/%{name} \
-DCMAKE_CXX_COMPILER:FILEPATH=$CXX \
-DCMAKE_C_COMPILER:FILEPATH=$CC \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPARAVIEW_BUILD_QT_GUI:BOOL=ON \
-DVTK_CUSTOM_LIBRARY_SUFFIX:STRING="" \
%if 0%{?use_qt5}
-DPARAVIEW_QT_VERSION:STRING="5" \
%else
-DPARAVIEW_QT_VERSION:STRING="4" \
%endif
-DPARAVIEW_BUILD_PLUGIN_SLACTools:BOOL=ON \
-DPARAVIEW_ENABLE_PYTHON:BOOL=ON \
-DVTK_WRAP_PYTHON:BOOL=ON \
-DVTK_WRAP_PYTHON_SIP:BOOL=ON \
-DVTK_OPENGL_HAS_OSMESA:BOOL=OFF \
-DVTK_USE_SYSTEM_EXPAT:BOOL=ON \
-DVTK_USE_SYSTEM_FREETYPE:BOOL=ON \
-DVTK_USE_SYSTEM_JPEG:BOOL=ON \
-DVTK_USE_SYSTEM_PNG:BOOL=ON \
-DVTK_USE_SYSTEM_TIFF:BOOL=ON \
-DVTK_USE_SYSTEM_ZLIB:BOOL=ON \
-DVTK_USE_SYSTEM_ZOPE:BOOL=ON \
-DVTK_USE_SYSTEM_TWISTED:BOOL=ON \
-DVTK_USE_SYSTEM_GL2PS:BOOL=OFF \
-DBUILD_DOCUMENTATION:BOOL=ON \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF
Any help will be much appreciated. Thanks!