Open soumith opened 4 years ago
Ah yeah -- I remember running into this with the conda build setup. @mosra you said there may be a way to to this with cmake: https://github.com/facebookresearch/habitat-sim/pull/445/files#r371710997 ?
Looking at the build script for conda, it looks like we have the same issue with the python components of magnum/corrade: https://github.com/facebookresearch/habitat-sim/blob/master/conda-build/habitat-sim/build.sh#L63-L64
yes, you can set RPATH with CMake and also in setup.py where relevant. You can look at pointers from the PyTorch repo:
the conda-build
patchelf hacks we have in the PyTorch builder repos, I wrote them before we fixed the build system correctly. They can, I believe removed now, but we never got around to it.
🐛 Bug
The installed file
habitat_sim/_ext/habitat_sim_bindings.cpython-36m-x86_64-linux-gnu.so
still uses thebuild/
folder to resolve it's dependencies. So, if afterpython setup.py install
, if one removes thebuild/
folder, the installedhabitat-sim
stops working, because the_ext/habitat_sim_bindings
on import, cant resolve the paths tolibCorradePluginManager.so.2
andlibCorradeUtility.so.2
.One can verify that this is happening by running:
A simple fix that I used as a bandaid is to set the RPATH of this
.so
file to$ORIGIN
, because the_ext
folder correctly already contains thoselibCorrade*
libraries. I can do this by:The correct fix is to set the RPATH for the generated extension library correctly within the build scripts
Command
# command that you run
Expected behavior
the above commands work
System Info