<p dir="auto">I am trying to cmake a C++ project as follows: cmake .. -G Xcode -DCMAKE_PREFIX_PATH=/pathto/libtorch</p>
<p dir="auto">where libtorch was downloaded from here: <a href="https://download.pytorch.org/libtorch/nighlty/cpu/libtorch-macos-1.3.0.zip" rel="nofollow">https://download.pytorch.org/libtorch/nighlty/cpu/libtorch-macos-1.3.0.zip</a></p>
<p dir="auto">however, I get the following error:<br>
mported target "torch" includes non-existent path</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;MKL_INCLUDE_DIR-NOTFOUND&quot;"><pre class="notranslate"><code class="notranslate">"MKL_INCLUDE_DIR-NOTFOUND"
</code></pre></div>
<p dir="auto">I have installed mkl-dnnl through homebrew, and I suspect the problem is that libtorch has not updated the name to dnnl? because dnnl.h exists in my /usr/local/include.</p>
<p dir="auto">Hi,</p>
<p dir="auto">I try to run the following example from here, but run into some issues:<br>
<a href="https://pytorch.org/cppdocs/installing.html" rel="nofollow">https://pytorch.org/cppdocs/installing.html</a></p>
<p dir="auto">ld: warning: ignoring file libtorch/lib/libtorch.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): libtorch/lib/libtorch.so<br>
ld: warning: ignoring file libtorch/lib/libcaffe2.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): libtorch/lib/libcaffe2.so<br>
ld: warning: ignoring file libtorch/lib/libc10.so, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): libtorch/lib/libc10.so</p>
<p dir="auto">full error log: <a href="https://ideone.com/wqgzzy" rel="nofollow">https://ideone.com/wqgzzy</a></p>
<p dir="auto">i installed pytorch:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip3 install torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Collecting torch_nightly
  Downloading https://download.pytorch.org/whl/nightly/cpu/torch_nightly-1.0.0.dev20181203-cp36-none-macosx_10_7_x86_64.whl (61.3MB)
    100% |████████████████████████████████| 61.3MB 33kB/s 
Installing collected packages: torch-nightly
Successfully installed torch-nightly-1.0.0.dev20181203"><pre class="notranslate"><code class="notranslate">pip3 install torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
Collecting torch_nightly
  Downloading https://download.pytorch.org/whl/nightly/cpu/torch_nightly-1.0.0.dev20181203-cp36-none-macosx_10_7_x86_64.whl (61.3MB)
    100% |████████████████████████████████| 61.3MB 33kB/s 
Installing collected packages: torch-nightly
Successfully installed torch-nightly-1.0.0.dev20181203
</code></pre></div>
<p dir="auto">im running pytorch on:<br>
osx 10.11.6</p>
<p dir="auto">i installed libtorch following these steps:<br>
<a href="https://pytorch.org/cppdocs/installing.html" rel="nofollow">https://pytorch.org/cppdocs/installing.html</a></p>
<p dir="auto">here the cmake output:<br>
<a href="https://ideone.com/go44HN" rel="nofollow">https://ideone.com/go44HN</a></p>