<p dir="auto">My operation is hacktonish OSX 12.<br>
Graphic is GTX960.<br>
Installed Cuda 8 and CLT.<br>
Python version is 2.7<br>
Try the install from the source show error.<br>
How can i fix it?</p>
<p dir="auto">[  4%] Linking CXX shared library libTHD.dylib<br>
Undefined symbols for architecture x86_64:<br>
"_state", referenced from:<br>
_THDTensorDescriptor_newFromTHCudaDoubleTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaFloatTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaLongTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaIntTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaShortTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaCharTensor in TensorDescriptor.cpp.o<br>
_THDTensorDescriptor_newFromTHCudaByteTensor in TensorDescriptor.cpp.o<br>
...<br>
ld: symbol(s) not found for architecture x86_64<br>
clang: error: linker command failed with exit code 1 (use -v to see invocation)<br>
make[2]: *** [libTHD.1.dylib] Error 1<br>
make[1]: *** [CMakeFiles/THD.dir/all] Error 2<br>
make: *** [all] Error 2</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/29519350/27422722-d52a3b1e-5761-11e7-9145-962054c59b19.png"><img src="https://user-images.githubusercontent.com/29519350/27422722-d52a3b1e-5761-11e7-9145-962054c59b19.png" alt="sy" style="max-width: 100%;"></a></p>
<p dir="auto">I'm trying to build on Mac OS X, using</p>
<p dir="auto"><code class="notranslate">MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python3 setup.py install</code></p>
<p dir="auto">And I'm running into this error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[  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:
  &quot;_state&quot;, 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"><pre class="notranslate"><code class="notranslate">[  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
</code></pre></div>
<p dir="auto">Is this a bug or did I miss something?</p>
<p dir="auto">Edit:</p>
<p dir="auto">This might be relevant:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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 &quot;-delete_rpath /usr/local/cuda/lib&quot;"><pre class="notranslate"><code class="notranslate">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"
</code></pre></div>