Closed gdevenyi closed 7 years ago
Not sure about this; @jakirkham?
Confirmed that if I build my own VTK-7.0 from scratch I don't have this issue.
Grim - looks like the cmake file is hardcoding the paths to all 'linkable' libraries and this includes system libraries such as librt that exist in /usr/lib64
on CentOS but in other places on Debian for example. I don't see why these libraries couldn't just be relative link requirements? Can you try rebuilding but changing /usr/lib64/librt.so
to rt
to see if CMake will just resolve the link requirements itself? If it does, then we can just sed
those out in our build (I think).
Should we file an issue with VTK maybe? Or is there already a CMAKE option to use relative paths perhaps?
Maybe try using CMAKE_SKIP_RPATH
?
I had a similar problem with ITK some times ago (but didn't found the solution...)
Can you try rebuilding but changing /usr/lib64/librt.so to rt to see if CMake will just resolve the link requirements itself?
I encountered this problem for ITK rather than VTK, but can confirm that manually editing the file to makes these changes as suggested above allowed me to build a third party project successfully. I have raised a related issue in the ITK feedstock here: https://github.com/conda-forge/itk-feedstock/issues/7
For VTK, there appear to be two files with hardcoded paths that should be removed:
Closing this unless someone issues a plan of approach to resolve this.
Analysis/suggested fix in https://github.com/conda-forge/libitk-feedstock/issues/7 [edit: fixed link] PR to fix in ITK: https://github.com/InsightSoftwareConsortium/ITK/pull/343 (similar fix could be done in VTK, or arguably upstream in CMake I guess).
I think @ihnorton meant to link here: https://github.com/conda-forge/libitk-feedstock/issues/7
This also affects libXext.so
. On my Ubuntu 19.10 the CMake build links to /usr/lib64/libXext.so
which does not exist. I circumvented it with a symlink
I've been running into this error trying to build against vtk:
I thoroughly examined the very simple VTK cmake I'm using, and I've come down to it being included somewhere else:
Grepping through the cmake files included with vtk-7.0.0:
It looks like somehow the conda build system's library paths got embedded as target link libraries for CMAKE, so when I try and use it, it also targets those. I don't have my libraries at that location.