Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir /cpu/cpu_barrier.cpp.o ninja: build stopped: subcommand failed

marcoippolito: <p>In Ubuntu 18.04.02 Desktop I’m trying to install pytorch from source:</p>
<pre><code>(base) marco@marco-U36SG:~$ conda install numpy ninja pyyaml mkl mkl-include     
setuptools cmake cffi typing
Collecting package metadata (current_repodata.json): done
Solving environment: done

# All requested packages already installed.

(base) marco@marco-U36SG:~$ git clone --recursive https://github.com/pytorch
/pytorch
Cloning into 'pytorch'...
remote: Enumerating objects: 18, done.
remote: Counting objects: 100% (18/18), done.

(base) marco@marco-U36SG:~/pytorch$ git submodule sync
Synchronizing submodule url for 'third_party/FP16'
Synchronizing submodule url for 'third_party/FXdiv'
Synchronizing submodule url for 'third_party/NNPACK'
Synchronizing submodule url for 'third_party/QNNPACK'
Synchronizing submodule url for 'third_party/benchmark'

(base) marco@marco-U36SG:~/pytorch$ git submodule update --init --recursive

(base) marco@marco-U36SG:~/pytorch$ export 
CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}

(base) marco@marco-U36SG:~/pytorch$ export "USE_CUDNN=0"
</code></pre>
<p>But the installation step gives errors:</p>
<pre><code>(base) marco@marco-U36SG:~/pytorch$ python setup.py install

CMake Warning at modules/detectron/CMakeLists.txt:34 (add_library):
 Cannot generate a safe runtime search path for target caffe2_detectron_ops
 because files in some directories may conflict with libraries in implicit
 directories
</code></pre>
<p>[521/2706] Building CXX object third_party/ideep/mkl-dnn/src/CMakeFiles/mkldnn.dir<br>
/cpu/cpu_barrier.cpp.o<br>
ninja: build stopped: subcommand failed.</p>
<p>I tried also with python3:</p>
<pre><code>(base) marco@marco-U36SG:~/pytorch$ python3 setup.py install
Building wheel torch-1.3.0a0+5254b12
-- Building version 1.3.0a0+5254b12
cmake --build . --target install --config Release -- -j 4

../third_party/ideep/mkl-dnn/src/common/utils.cpp: In function ‘int    
mkldnn::impl::mkldnn_getenv(char*, const char*, int)’:
../third_party/ideep/mkl-dnn/src/common/utils.cpp:46:34: note: length computed here
   46 |             value_length = strlen(buffer);
      |                            ~~~~~~^~~~~~~~
</code></pre>
<p>I attached the file containing the complete log:<br>
<a href="https://drive.google.com/open?id=1mKl0R_m35cBqIaOF4bVpUAgl9fhYXlA9" rel="nofollow noopener">pytorchInstallationIssueUbuntu18.04DesktopFullLog.txt</a></p>
<p>Looking forward to your kind help.<br>
Marco</p>

Rishav_Sapahia: <p>did you got the answer?</p>

marcoippolito: <p>Unfortunately no answer till know</p>

Rishav_Sapahia: <p>Which <code>cuda</code> version are you using?</p>

marcoippolito: <p>No cuda. Is that a problem?</p>

Rishav_Sapahia: <p>No, actually I am encountering the same issue but I have older cuda versions and after exploring many resoures are pointing that I have to update my cuda to <code>version 10</code>. I’ll let you know if I reach to any conclusion</p>

marcoippolito: <p>Thank you very much Rishav.</p>

arjun0502: <p>Did you figure this out?? Ran into the exact same error</p>