Paraview internally setting RPATH.
I'm trying to build a non-graphical version of Paraview with Python support on a RHEL6-based HPC cluster. I'm trying to use GCC 6.4; the RHEL6 default is 4.4.7. Everything is fine and dandy, until the ParaView compilation process generates vtkSocketCommunicatorHash.h
. This appears to invoke vtkHashSource-pv5.4
, which complains about not finding the right shared objects:
../../../bin/vtkHashSource-pv5.4: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ../../../bin/vtkHashSource-pv5.4)
../../../bin/vtkHashSource-pv5.4: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /apps/src/paraview/fslbuild/ParaView-v5.4.1-build/lib/libvtksys-pv5.4.so.1)
../../../bin/vtkHashSource-pv5.4: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /apps/src/paraview/fslbuild/ParaView-v5.4.1-build/lib/libvtksys-pv5.4.so.1)
I tried rebuilding after adding the relevant GCC library paths to LD_LIBRARY_PATH
. Because this resulted in the same error, I began to believe that it was an RPATH issue.
This was confirmed by running readelf -d
:
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x0000000000000001 (NEEDED) Shared library: [libvtksys-pv5.4.so.1]
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x000000000000000f (RPATH) Library rpath: [<ommitted>]
While I'm not comfortable sharing the full Library rpath readelf
output, I can say that it was the install library path I had specified.
I tried again from scratch, this time specifying the RPATH explicitly via CMAKE_INSTALL_RPATH
per the wiki article to be $LD_RUN_PATH:${CMAKE_INSTALL_PATH}
. Interestingly, running readelf -d
again showed that the RPATH had not changed.
I'm not sure what's wrong here - it seems to me that this is a CMake problem, since it seems like I can't manually override the defaults that Paraview is providing. On the other hand, it could also be a ParaView problem where the build scripts are overwriting my RPATH configuration.