-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Closed
Labels
Description
I'm trying to build on Mac OS X, using
MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python3 setup.py install
And I'm running into this error:
[ 4%] Linking CXX shared library libTHD.dylib
ld: warning: directory not found for option '-L/usr/local/cuda/lib64'
Undefined symbols for architecture x86_64:
"_state", referenced from:
_THDTensorDescriptor_newFromTHCudaDoubleTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaFloatTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaLongTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaIntTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaShortTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaCharTensor in TensorDescriptor.cpp.o
_THDTensorDescriptor_newFromTHCudaByteTensor in TensorDescriptor.cpp.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libTHD.1.dylib] Error 1
make[1]: *** [CMakeFiles/THD.dir/all] Error 2
make: *** [all] Error 2
Is this a bug or did I miss something?
Edit:
This might be relevant:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: no LC_RPATH load command with path: /usr/local/cuda/lib found in: ~/Desktop/pytorch/torch/lib/tmp_install/lib/libTHPP.1.dylib (for architecture x86_64), required for specified option "-delete_rpath /usr/local/cuda/lib"