I was installing pytorch in developing model on MacOS with commandline:
‘USE_NINJA=1 CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ CFLAGS="-O0 -g" CXXFLAGS="-O0 -g" DEBUG=1 ~/bin/pip3.6 install --user -v -e .’
When I imported torch in python3, I get a error message that libraries cannot be loaded because of rpath issue, which I found out that cmake install script deleted rpath from binaries:
execute_process(COMMAND /usr/bin/install_name_tool
-delete_rpath "...Workspace/pytorch/third_party/ideep/mkl-dnn/external/mklml_mac_2019.0.1.20180928/lib"
"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/test/scalar_test")
I know this probably a cmake issue but I want to know whether some specific settings triggered this behavior?