(Clion Window 10)Cmake setting failed, I have tried all kind of solutions

JonathanSum: <p>it throws: Torch Script Not found: torch;torch_library;C10_LIBRARY</p>
<p>code:<br>
cmake_minimum_required(VERSION 3.5)<br>
project(HappySugarLife)</p>
<p>set(CMAKE_CXX_STANDARD 17)<br>
set(CMAKE_PREFIX_PATH ${Torch_DIR})</p>
<p>find_package(Torch REQUIRED)</p>
<p>set(SOURCE_FILES main.cpp)<br>
set(Torch_DIR libtorch/share/cmake/Torch)</p>
<p>add_executable( HappySugarLife ${SOURCE_FILES} libtorch/lib)<br>
target_link_libraries( HappySugarLife “${TORCH_LIBRARIES}”)<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/4/a/4a8521392f676fe26e8d4fd153613e03b44fad8a.png" data-download-href="https://discuss.pytorch.org/uploads/default/4a8521392f676fe26e8d4fd153613e03b44fad8a" title="image"><img src="https://discuss.pytorch.org/uploads/default/original/3X/4/a/4a8521392f676fe26e8d4fd153613e03b44fad8a.png" alt="image" data-base62-sha1="aDeyQvZqN3RNJfwC2ZZv04jChCi" width="534" height="500" data-dominant-color="363737"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">985×922 52.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/e/be56ae08396e88853a26bdbf097c516191b4c7ea.png" data-download-href="https://discuss.pytorch.org/uploads/default/be56ae08396e88853a26bdbf097c516191b4c7ea" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/e/be56ae08396e88853a26bdbf097c516191b4c7ea_2_690x425.png" alt="image" data-base62-sha1="r9OqF1KJxIiOEs1DEMHMT4NLjMC" width="690" height="425" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/e/be56ae08396e88853a26bdbf097c516191b4c7ea_2_690x425.png, https://discuss.pytorch.org/uploads/default/optimized/3X/b/e/be56ae08396e88853a26bdbf097c516191b4c7ea_2_1035x637.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/b/e/be56ae08396e88853a26bdbf097c516191b4c7ea.png 2x" data-dominant-color="3C3E41"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1219×752 43.5 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
Here are the solutions that I have tried:</p><aside class="onebox githubissue" data-onebox-src="https://github.com/pytorch/pytorch/issues/12449">
  <header class="source">

      <a href="https://github.com/pytorch/pytorch/issues/12449" target="_blank" rel="noopener nofollow ugc">github.com/pytorch/pytorch</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/pytorch/pytorch/issues/12449" target="_blank" rel="noopener nofollow ugc">Could not find a package configuration file provided by "Torch" with any of   the following names:</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2018-10-08" data-time="08:15:55" data-timezone="UTC">08:15AM - 08 Oct 18 UTC</span>
      </div>


      <div class="user">
        <a href="https://github.com/lucasjinreal" target="_blank" rel="noopener nofollow ugc">
          <img alt="lucasjinreal" src="https://avatars.githubusercontent.com/u/21303438?v=4" class="onebox-avatar-inline" width="20" height="20">
          lucasjinreal
        </a>
      </div>
    </div>

    <div class="labels">
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          module: cpp-extensions
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          triaged
        </span>
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">C++ build documentation seems has code bugs:

Simply following the tutorial of<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden"> newest libtorch doc, just got errors.

```
CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Torch", but
  CMake did not find one.

  Could not find a package configuration file provided by "Torch" with any of
  the following names:

    TorchConfig.cmake
    torch-config.cmake

  Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
  "Torch_DIR" to a directory containing one of the above files.  If "Torch"
  provides a separate development package or SDK, be sure it has been
  installed.


-- Configuring incomplete, errors occurred!
See also "/Volumes/xs/tmp/libtorch_learn/example-app/build/CMakeFiles/CMakeOutput.log".
```

It's cmake issue, I think documentation should more specific and make Torch finable.

cc @yf225 @glaringlee</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<aside class="onebox githubissue" data-onebox-src="https://github.com/hughperkins/pytorch/issues/36">
  <header class="source">

      <a href="https://github.com/hughperkins/pytorch/issues/36" target="_blank" rel="noopener nofollow ugc">github.com/hughperkins/pytorch</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/hughperkins/pytorch/issues/36" target="_blank" rel="noopener nofollow ugc">CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2017-04-26" data-time="13:08:18" data-timezone="UTC">01:08PM - 26 Apr 17 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2017-04-26" data-time="14:00:26" data-timezone="UTC">02:00PM - 26 Apr 17 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/ahmedmazari" target="_blank" rel="noopener nofollow ugc">
          <img alt="ahmedmazari" src="https://avatars.githubusercontent.com/u/22748223?v=4" class="onebox-avatar-inline" width="20" height="20">
          ahmedmazari
        </a>
      </div>
    </div>

    <div class="labels">
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">Hello,
My error is related to **line 48** from this file code [https://github.c<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden">om/SeanNaren/warp-ctc/blob/pytorch_bindings/CMakeLists.txt](url)

After installing pytorch corrctly. l want to install the Fast parallel CTC [https://github.com/SeanNaren/warp-ctc](url)
l started installing as follow : 
```
git clone https://github.com/baidu-research/warp-ctc.git
cd warp-ctc
mkdir build
cd build
```

then l stacked at the (cmake command)

`cmake ../`

```
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "8.0", minimum required is "6.5") 
-- cuda found TRUE
_**CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):
  By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Torch", but
  CMake did not find one.

  Could not find a package configuration file provided by "Torch" with any of
  the following names:

    TorchConfig.cmake
    torch-config.cmake

  Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
  "Torch_DIR" to a directory containing one of the above files.  If "Torch"
  provides a separate development package or SDK, be sure it has been
  installed.**_


-- Torch found Torch_DIR-NOTFOUND
-- Building shared library with GPU support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ahmed/Downloads/warp-ctc/build
```



**l don't understand the error :** 


**"_CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):
  By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Torch", but
  CMake did not find one.

  Could not find a package configuration file provided by "Torch" with any of
  the following names:

    TorchConfig.cmake
    torch-config.cmake

  Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
  "Torch_DIR" to a directory containing one of the above files.  If "Torch"
  provides a separate development package or SDK, be sure it has been
  installed.
"**</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<aside class="onebox githubissue" data-onebox-src="https://github.com/pytorch/pytorch/issues/17479">
  <header class="source">

      <a href="https://github.com/pytorch/pytorch/issues/17479" target="_blank" rel="noopener nofollow ugc">github.com/pytorch/pytorch</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/pytorch/pytorch/issues/17479" target="_blank" rel="noopener nofollow ugc">Building libtorch-dependent project with CMake</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2019-02-25" data-time="21:30:54" data-timezone="UTC">09:30PM - 25 Feb 19 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2019-02-26" data-time="19:13:36" data-timezone="UTC">07:13PM - 26 Feb 19 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/hengyuan-hu" target="_blank" rel="noopener nofollow ugc">
          <img alt="hengyuan-hu" src="https://avatars.githubusercontent.com/u/4728165?v=4" class="onebox-avatar-inline" width="20" height="20">
          hengyuan-hu
        </a>
      </div>
    </div>

    <div class="labels">
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">## ❓ Questions and Help

I am writing a library depending mainly on torch::Ten<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden">sor in libtorch. The library will have a python interface so that python program can get access to Tensor object defined in C++ code. A minimal example would look like this:
```
#include &lt;pybind11/pybind11.h&gt;
#include &lt;torch/extension.h&gt;

namespace py = pybind11;

struct TensorWrapper {
  TensorWrapper() {
    tensor = torch::ones({3, 3}, torch::kInt32);
  }

  int size;
  torch::Tensor tensor;
};

PYBIND11_MODULE(a, m) {
 py::class_&lt;TensorWrapper&gt;(m, "TensorWrapper")
     .def(py::init&lt;&gt;())
     .def_readwrite("tensor", &amp;TensorWrapper::tensor)
     .def_readwrite("size", &amp;TensorWrapper::size);
}
```

and my CMakeLists.txt looks like this:
```
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(a)

set(CMAKE_PREFIX_PATH /path/to/libtorch)
find_package(Torch REQUIRED)
include_directories(${TORCH_INCLUDE_DIRS})

add_subdirectory(/path/to/pybind11)
pybind11_add_module(a source.cc)

target_link_libraries(a PRIVATE "${TORCH_LIBRARIES}")
set_property(TARGET a PROPERTY CXX_STANDARD 11)
```

However, when I try to 'import a' in python, I get the following error:
```
ImportError: dlopen(a.cpython-37m-darwin.so, 2): Symbol not found: _THPVariableClass
  Referenced from: a.cpython-37m-darwin.so
  Expected in: flat namespace
 in a.cpython-37m-darwin.so
```

The source code works if I use `torch.utils.cpp_extension.load_inline` so I guess there is something wrong with the CMake flags. Any suggestions/help is much appreciated.</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<aside class="onebox githubissue" data-onebox-src="https://github.com/nagadomi/waifu2x/issues/253#issuecomment-445448928">
  <header class="source">

      <a href="https://github.com/nagadomi/waifu2x/issues/253#issuecomment-445448928" target="_blank" rel="noopener nofollow ugc">github.com/nagadomi/waifu2x</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/nagadomi/waifu2x/issues/253#issuecomment-445448928" target="_blank" rel="noopener nofollow ugc">Cant Install Torch Ubuntu 18.04 and CUDA 10.0</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2018-10-05" data-time="07:32:49" data-timezone="UTC">07:32AM - 05 Oct 18 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2018-12-08" data-time="10:27:24" data-timezone="UTC">10:27AM - 08 Dec 18 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/Archit01" target="_blank" rel="noopener nofollow ugc">
          <img alt="Archit01" src="https://avatars.githubusercontent.com/u/39849184?v=4" class="onebox-avatar-inline" width="20" height="20">
          Archit01
        </a>
      </div>
    </div>

    <div class="labels">
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">`Prefix set to /home/archit/torch/install
Installing Lua version: LUAJIT21
Fou<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden">nd CUDA on your machine. Installing CMake 3.6 modules to get up-to-date FindCUDA
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/cmake/3.6/build
Install the project...
-- Install configuration: ""
-- Up-to-date: /home/archit/torch/install/share/cmake/torch
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/FindCUDA.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/FindCUDA
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/FindCUDA/make2cmake.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/FindCUDA/select_compute_arch.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/FindCUDA/run_nvcc.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/FindCUDA/parse_cubin.cmake
FindCuda bits of CMake 3.6 installed
Installing common Lua packages
gcc -O2 -fPIC -I/home/archit/torch/install/include -c src/lfs.c -o src/lfs.o
gcc -shared -o lfs.so -L/home/archit/torch/install/lib src/lfs.o
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
luafilesystem 1.6.3-1 is now built and installed in /home/archit/torch/install/ (license: MIT/X11)

Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
penlight scm-1 is now built and installed in /home/archit/torch/install/ (license: MIT/X11)

gcc -O2 -fPIC -I/home/archit/torch/install/include -c lua_cjson.c -o lua_cjson.o
gcc -O2 -fPIC -I/home/archit/torch/install/include -c strbuf.c -o strbuf.o
gcc -O2 -fPIC -I/home/archit/torch/install/include -c fpconv.c -o fpconv.o
gcc -shared -o cjson.so -L/home/archit/torch/install/lib lua_cjson.o strbuf.o fpconv.o
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
lua-cjson 2.1devel-1 is now built and installed in /home/archit/torch/install/ (license: MIT)

Installing core Torch packages
gcc -O2 -fPIC -I/home/archit/torch/install/include -c test.c -o test.o
gcc -shared -o ffi/libtest.so -L/home/archit/torch/install/lib test.o
gcc -O2 -fPIC -I/home/archit/torch/install/include -c call.c -o call.o -Idynasm
gcc -O2 -fPIC -I/home/archit/torch/install/include -c ctype.c -o ctype.o -Idynasm
gcc -O2 -fPIC -I/home/archit/torch/install/include -c ffi.c -o ffi.o -Idynasm
gcc -O2 -fPIC -I/home/archit/torch/install/include -c parser.c -o parser.o -Idynasm
gcc -shared -o ffi.so -L/home/archit/torch/install/lib call.o ctype.o ffi.o parser.o
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
luaffi scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

gcc -O2 -fPIC -I/home/archit/torch/install/include -c src/autolink.c -o src/autolink.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c src/buffer.c -o src/buffer.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c src/markdown.c -o src/markdown.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c src/stack.c -o src/stack.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c html/houdini_href_e.c -o html/houdini_href_e.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c html/houdini_html_e.c -o html/houdini_html_e.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c html/html.c -o html/html.o -Isrc/ -Ihtml/
gcc -O2 -fPIC -I/home/archit/torch/install/include -c html/html_smartypants.c -o html/html_smartypants.o -Isrc/ -Ihtml/
gcc -shared -o libsundown.so -L/home/archit/torch/install/lib src/autolink.o src/buffer.o src/markdown.o src/stack.o html/houdini_href_e.o html/houdini_html_e.o html/html.o html/html_smartypants.o
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
sundown scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
cwrap scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

Warning: unmatched variable LUALIB
cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_BUILD_TYPE=Release -DLUALIB= -DLUA_INCDIR="/home/archit/torch/install/include" -DLUA_LIBDIR="/home/archit/torch/install/lib" -DLUADIR="/home/archit/torch/install/lib/luarocks/rocks/paths/scm-1/lua" -DLIBDIR="/home/archit/torch/install/lib/luarocks/rocks/paths/scm-1/lib" -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/paths/scm-1" &amp;&amp; make

-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/pkg/paths/build
[100%] Built target paths
cd build &amp;&amp; make install
[100%] Built target paths
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/paths/scm-1/lua/paths/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/paths/scm-1/lib/libpaths.so
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
paths scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

Warning: unmatched variable LUALIB
cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_BUILD_TYPE=Release -DLUA=/home/archit/torch/install/bin/luajit -DLUALIB= -DLUA_BINDIR="/home/archit/torch/install/bin" -DLUA_INCDIR="/home/archit/torch/install/include" -DLUA_LIBDIR="/home/archit/torch/install/lib" -DLUADIR="/home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua" -DLIBDIR="/home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lib" -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/torch/scm-1" &amp;&amp; make -j$(getconf _NPROCESSORS_ONLN)

-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Compiling with OpenMP support
CMake Deprecation Warning at lib/TH/CMakeLists.txt:5 (CMAKE_POLICY):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Compiling with OpenMP support
-- Could not find hardware support for NEON on this machine.
-- No OMAP3 processor on this machine.
-- No OMAP4 processor on this machine.
-- SSE2 Found
-- SSE3 Found
-- AVX Found
-- AVX2 Found
-- TH_SO_VERSION: 0
-- Atomics: using C11 intrinsics
-- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_gf_lp64 - mkl_sequential - mkl_core - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m]
--   Library mkl_gf: not found
-- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
--   Library mkl_intel: not found
-- Checking for [mkl_gf_lp64 - mkl_sequential - mkl_core - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf - mkl_sequential - mkl_core - m]
--   Library mkl_gf: not found
-- Checking for [mkl_intel_lp64 - mkl_sequential - mkl_core - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_sequential - mkl_core - m]
--   Library mkl_intel: not found
-- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - iomp5 - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_gf_lp64 - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf_lp64 - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_gf_lp64: not found
-- Checking for [mkl_gf - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_gf - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_gf: not found
-- Checking for [mkl_intel_lp64 - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel_lp64 - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_intel_lp64: not found
-- Checking for [mkl_intel - mkl_gnu_thread - mkl_core - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl_intel - mkl_intel_thread - mkl_core - pthread - m]
--   Library mkl_intel: not found
-- Checking for [mkl - guide - pthread - m]
--   Library mkl: not found
-- MKL library not found
-- Checking for [openblas]
--   Library openblas: /opt/OpenBLAS/lib/libopenblas.so
-- Found a library with BLAS API (open).
-- Found a library with LAPACK API. (open)
CMake Deprecation Warning at lib/luaT/CMakeLists.txt:3 (CMAKE_POLICY):
  The OLD behavior for policy CMP0026 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/pkg/torch/build
[  5%] Built target luaT
[ 58%] Built target TH
[100%] Built target torch
cd build &amp;&amp; make install
[  5%] Built target luaT
[ 58%] Built target TH
[100%] Built target torch
Install the project...
-- Install configuration: "Release"
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/TorchExports.cmake
-- Installing: /home/archit/torch/install/share/cmake/torch/TorchExports-release.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/TorchConfig.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/TorchWrap.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/TorchPathsInit.cmake
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/TorchPackage.cmake
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lib/libtorch.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lib/libtorch.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/File.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/Tensor.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/CmdLine.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/FFInterface.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/Tester.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/TestSuite.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/paths.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/test.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/README.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/storage.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/serialization.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/gather.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/utility.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/cmdline.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/maths.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/diskfile.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/tensor.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/file.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/random.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/index.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/timer.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/tester.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/memoryfile.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/torch/scm-1/lua/torch/doc/pipefile.md
-- Up-to-date: /home/archit/torch/install/lib/libTH.so.0
-- Up-to-date: /home/archit/torch/install/lib/libTH.so
-- Up-to-date: /home/archit/torch/install/include/TH/TH.h
-- Up-to-date: /home/archit/torch/install/include/TH/THAllocator.h
-- Up-to-date: /home/archit/torch/install/include/TH/THMath.h
-- Up-to-date: /home/archit/torch/install/include/TH/THBlas.h
-- Up-to-date: /home/archit/torch/install/include/TH/THDiskFile.h
-- Up-to-date: /home/archit/torch/install/include/TH/THFile.h
-- Up-to-date: /home/archit/torch/install/include/TH/THFilePrivate.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGeneral.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateAllTypes.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateDoubleType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateFloatType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateHalfType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateLongType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateIntType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateShortType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateCharType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateByteType.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateFloatTypes.h
-- Up-to-date: /home/archit/torch/install/include/TH/THGenerateIntTypes.h
-- Up-to-date: /home/archit/torch/install/include/TH/THLapack.h
-- Up-to-date: /home/archit/torch/install/include/TH/THLogAdd.h
-- Up-to-date: /home/archit/torch/install/include/TH/THMemoryFile.h
-- Up-to-date: /home/archit/torch/install/include/TH/THRandom.h
-- Up-to-date: /home/archit/torch/install/include/TH/THSize.h
-- Up-to-date: /home/archit/torch/install/include/TH/THStorage.h
-- Up-to-date: /home/archit/torch/install/include/TH/THTensor.h
-- Up-to-date: /home/archit/torch/install/include/TH/THTensorApply.h
-- Up-to-date: /home/archit/torch/install/include/TH/THTensorDimApply.h
-- Up-to-date: /home/archit/torch/install/include/TH/THTensorMacros.h
-- Up-to-date: /home/archit/torch/install/include/TH/THVector.h
-- Up-to-date: /home/archit/torch/install/include/TH/THAtomic.h
-- Up-to-date: /home/archit/torch/install/include/TH/THHalf.h
-- Up-to-date: /home/archit/torch/install/include/TH/vector/AVX.h
-- Up-to-date: /home/archit/torch/install/include/TH/vector/AVX2.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THBlas.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THBlas.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THLapack.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THLapack.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THStorage.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THStorage.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THStorageCopy.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THStorageCopy.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensor.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensor.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorConv.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorConv.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorCopy.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorCopy.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorLapack.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorLapack.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorMath.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorMath.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorRandom.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THTensorRandom.h
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THVectorDispatch.c
-- Up-to-date: /home/archit/torch/install/include/TH/generic/THVector.h
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/THConfig.cmake
-- Up-to-date: /home/archit/torch/install/lib/libluaT.so.0
-- Up-to-date: /home/archit/torch/install/lib/libluaT.so
-- Up-to-date: /home/archit/torch/install/include/luaT.h
-- Up-to-date: /home/archit/torch/install/share/cmake/torch/luaTConfig.cmake
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
torch scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
dok scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

gcc -O2 -fPIC -I/home/archit/torch/install/include -c utils.c -o utils.o
gcc -shared -o treplutils.so -L/home/archit/torch/install/lib utils.o
gcc -O2 -fPIC -I/home/archit/torch/install/include -c readline.c -o readline.o
gcc -shared -o readline.so -L/home/archit/torch/install/lib readline.o -lreadline
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
trepl scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

Warning: unmatched variable LUALIB
cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DLUALIB= -DCMAKE_BUILD_TYPE=Release  -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/sys/1.1-0" &amp;&amp; make
-- Found Torch7 in /home/archit/torch/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/pkg/sys/build
[100%] Built target sys
cd build &amp;&amp; make install
[100%] Built target sys
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/sys/1.1-0/lib/libsys.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/sys/1.1-0/lib/libsys.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/sys/1.1-0/lua/sys/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/sys/1.1-0/lua/sys/colors.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/sys/1.1-0/lua/sys/fpath.lua
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
sys 1.1-0 is now built and installed in /home/archit/torch/install/ (license: BSD)

Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
xlua 1.0-0 is now built and installed in /home/archit/torch/install/ (license: BSD)

Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
moses 1.6.1-1 is now built and installed in /home/archit/torch/install/ (license: MIT &lt;http://www.opensource.org/licenses/mit-license.php&gt;)

cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/archit/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/nn/scm-1"  -DLUA_INCDIR="/home/archit/torch/install/include" -DLUA_LIBDIR="/home/archit/torch/install/lib" &amp;&amp; make

-- Found Torch7 in /home/archit/torch/install
-- TH_LIBRARIES: TH
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE)
  lib/THNN/CMakeLists.txt:52 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE)
  lib/THNN/CMakeLists.txt:52 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Compiling with OpenMP support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/extra/nn/build
[100%] Built target THNN
cd build &amp;&amp; make install
[100%] Built target THNN
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Abs.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/AbsCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Add.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/AddConstant.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/BCECriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/BatchNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Bilinear.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Bottle.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CAdd.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CAddTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CAddTensorTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CDivTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CMaxTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CMinTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CMul.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CMulTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CReLU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CSubTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Clamp.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ClassNLLCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ClassSimplexCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Collapse.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Concat.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ConcatTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Constant.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Container.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Contiguous.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Convert.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Copy.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Cosine.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CosineDistance.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CosineEmbeddingCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Criterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CriterionTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/CrossEntropyCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Decorator.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/DepthConcat.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/DistKLDivCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/DistanceRatioCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/DontCast.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/DotProduct.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Dropout.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ELU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ErrorMessages.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Euclidean.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Exp.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/FlattenTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/GPU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/GatedLinearUnit.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/GradientReversal.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/HardShrink.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/HardTanh.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/HingeEmbeddingCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Identity.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Index.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/IndexLinear.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Jacobian.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/JoinTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Kmeans.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/L1Cost.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/L1HingeEmbeddingCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/L1Penalty.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/LayerNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/LeakyReLU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Linear.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/LinearWeightNorm.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Log.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/LogSigmoid.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/LogSoftMax.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/LookupTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MM.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MSECriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MV.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MapTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MarginCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MarginRankingCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MaskedSelect.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Max.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Maxout.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Mean.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Min.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MixtureTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Module.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ModuleCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Mul.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MulConstant.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MultiCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MultiLabelMarginCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MultiLabelSoftMarginCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/MultiMarginCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/NaN.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Narrow.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/NarrowTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Normalize.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/OneHot.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/PReLU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Padding.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/PairwiseDistance.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Parallel.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ParallelCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ParallelTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/PartialLinear.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/PixelShuffle.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Power.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/PrintSize.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Profile.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/RReLU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ReLU.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ReLU6.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Replicate.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Reshape.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Select.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SelectTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Sequential.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Sigmoid.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SmoothL1Criterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SoftMarginCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SoftMax.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SoftMin.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SoftPlus.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SoftShrink.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SoftSign.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SparseJacobian.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SparseLinear.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialAdaptiveAveragePooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialAdaptiveMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialAutoCropMSECriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialAveragePooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialBatchNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialClassNLLCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialContrastiveNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialConvolutionLocal.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialConvolutionMM.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialConvolutionMap.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialCrossMapLRN.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialDepthWiseConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialDilatedConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialDilatedMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialDivisiveNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialDropout.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialFractionalMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialFullConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialFullConvolutionMap.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialLPPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialLogSoftMax.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialMaxUnpooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialReflectionPadding.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialReplicationPadding.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialSoftMax.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialSubSampling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialSubtractiveNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialUpSamplingBilinear.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialUpSamplingNearest.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SpatialZeroPadding.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/SplitTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Sqrt.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Square.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Squeeze.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/StochasticGradient.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Sum.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/THNN.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/THNN_h.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Tanh.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/TanhShrink.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/TemporalConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/TemporalDynamicKMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/TemporalMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/TemporalRowConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/TemporalSubSampling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Threshold.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Transpose.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/Unsqueeze.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/View.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricAveragePooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricBatchNormalization.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricDilatedConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricDilatedMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricDropout.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricFractionalMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricFullConvolution.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricMaxPooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricMaxUnpooling.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/VolumetricReplicationPadding.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/WeightNorm.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/WeightedEuclidean.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/WeightedMSECriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/WhiteNoise.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ZeroGrad.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ZipTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/ZipTableOneToMany.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/hessian.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/test.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/utils.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/simple.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/table.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/containers.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/overview.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/module.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/criterion.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/convolution.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/testing.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/square.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/exp.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/sigmoid.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/prelu.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/lena.jpg
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/rrelu.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/lenap.jpg
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/relu6.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/sigmmoid.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/softplus.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/hshrink.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/sshrink.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/relu.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/logsoftmax.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/softsign.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/sqrt.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/htanh.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/softmin.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/tanh.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/abs.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/elu.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/power.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/logsigmoid.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/image/softmax.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/transfer.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/index.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/doc/training.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lua/nn/README.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lib/libTHNN.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/nn/scm-1/lib/libTHNN.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Up-to-date: /home/archit/torch/install/include/THNN/THNN.h
-- Up-to-date: /home/archit/torch/install/include/THNN/generic/THNN.h
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
nn scm-1 is now built and installed in /home/archit/torch/install/ (license: BSD)

cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/archit/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/graph/scm-1" &amp;&amp; make
   
-- Found Torch7 in /home/archit/torch/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/extra/graph/build
cd build &amp;&amp; make install
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/graph/scm-1/lua/graph/Edge.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/graph/scm-1/lua/graph/Node.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/graph/scm-1/lua/graph/graphviz.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/graph/scm-1/lua/graph/init.lua
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
graph scm-1 is now built and installed in /home/archit/torch/install/ (license: UNKNOWN)

cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/archit/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1" &amp;&amp; make
   
-- Found Torch7 in /home/archit/torch/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/extra/nngraph/build
cd build &amp;&amp; make install
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/JustElement.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/JustTable.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/ModuleFromCriterion.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/gmodule.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/graphinspecting.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/nest.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/nesting.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/node.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/simple_print.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/nngraph/scm-1/lua/nngraph/utils.lua
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
nngraph scm-1 is now built and installed in /home/archit/torch/install/ (license: UNKNOWN)

Warning: unmatched variable LUALIB
cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DLUALIB= -DLUA_INCDIR="/home/archit/torch/install/include" -DLUA_LIBDIR="/home/archit/torch/install/lib"  -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/archit/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0" &amp;&amp; make
   
-- Found Torch7 in /home/archit/torch/install
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE)
  CMakeLists.txt:28 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if):
  if given arguments:

    "TRUE"

  An argument named "TRUE" appears in a conditional statement.  Policy
  CMP0012 is not set: if() recognizes numbers and boolean constants.  Run
  "cmake --help-policy CMP0012" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE)
  CMakeLists.txt:28 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Compiling with OpenMP support
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/pkg/image/build
[ 25%] Built target image
[ 50%] Built target ppm
[ 75%] Built target jpeg
[100%] Built target lua_png
cd build &amp;&amp; make install
[ 25%] Built target image
[ 50%] Built target ppm
[ 75%] Built target jpeg
[100%] Built target lua_png
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/libppm.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/libppm.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/libjpeg.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/libjpeg.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/liblua_png.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/liblua_png.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/libimage.so
-- Set runtime path of "/home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lib/libimage.so" to "$ORIGIN/../lib:/home/archit/torch/install/lib:/opt/OpenBLAS/lib"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/win.ui
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/test.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/bmp-without-ext
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/rectangle.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/P5.pgm
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/rgb2x1.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/gray16-1x2.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/fabio.jpg
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/gray3x1.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/foobar.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/corrupt-ihdr.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/grace_hopper_512.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/P4.pbm
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/P6.ppm
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/fabio.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/rgb16-2x1.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/P2.pgm
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/assets/grace_hopper_512.jpg
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/image/1.1.alpha-0/lua/image/README.md
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
image 1.1.alpha-0 is now built and installed in /home/archit/torch/install/ (license: BSD)

cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/archit/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0" &amp;&amp; make
   
-- Found Torch7 in /home/archit/torch/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/archit/torch/pkg/optim/build
cd build &amp;&amp; make install
Install the project...
-- Install configuration: "Release"
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/ConfusionMatrix.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/Logger.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/adadelta.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/adagrad.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/adam.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/adamax.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/asgd.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/cg.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/checkgrad.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/cmaes.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/de.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/fista.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/init.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/lbfgs.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/lswolfe.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/nag.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/polyinterp.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/rmsprop.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/rprop.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/sgd.lua
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/intro.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/logger.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/image
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/image/parameterflattening.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/image/parameterflattening.svg
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/image/parameterflattening.svg.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/algos.md
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/doc/logger_plot.png
-- Installing: /home/archit/torch/install/lib/luarocks/rocks/optim/1.0.5-0/lua/optim/README.md
Updating manifest for /home/archit/torch/install/lib/luarocks/rocks
optim 1.0.5-0 is now built and installed in /home/archit/torch/install/ (license: BSD)

Found CUDA on your machine. Installing CUDA packages
Warning: unmatched variable LUALIB

jopts=$(getconf _NPROCESSORS_CONF)

echo "Building on $jopts cores"
cmake -E make_directory build &amp;&amp; cd build &amp;&amp; cmake .. -DLUALIB= -DLUA_INCDIR=/home/archit/torch/install/include -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="/home/archit/torch/install/bin/.." -DCMAKE_INSTALL_PREFIX="/home/archit/torch/install/lib/luarocks/rocks/cutorch/scm-1" &amp;&amp; make -j$jopts install

Building on 4 cores
-- Found Torch7 in /home/archit/torch/install
-- Removing -DNDEBUG from compile flags
-- TH_LIBRARIES: TH
-- MAGMA not found. Compiling without MAGMA support
-- Autodetected CUDA architecture(s): 5.0
-- got cuda version 10.0
-- Found CUDA with FP16 support, compiling with torch.CudaHalfTensor
-- CUDA_NVCC_FLAGS: -gencode;arch=compute_50,code=sm_50;-DCUDA_HAS_FP16=1
-- THC_SO_VERSION: 0
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_device_LIBRARY (ADVANCED)
    linked by target "THC" in directory /home/archit/torch/extra/cutorch/lib/THC

-- Configuring incomplete, errors occurred!
See also "/home/archit/torch/extra/cutorch/build/CMakeFiles/CMakeOutput.log".
See also "/home/archit/torch/extra/cutorch/build/CMakeFiles/CMakeError.log".

Error: Build error: Failed building.
`</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<aside class="onebox githubissue" data-onebox-src="https://github.com/pytorch/pytorch/issues/14684">
  <header class="source">

      <a href="https://github.com/pytorch/pytorch/issues/14684" target="_blank" rel="noopener nofollow ugc">github.com/pytorch/pytorch</a>
  </header>

  <article class="onebox-body">
    <div class="github-row">
  <div class="github-icon-container" title="Issue">
	  <svg width="60" height="60" class="github-icon" viewBox="0 0 14 16" aria-hidden="true"><path fill-rule="evenodd" d="M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"></path></svg>
  </div>

  <div class="github-info-container">
    <h4>
      <a href="https://github.com/pytorch/pytorch/issues/14684" target="_blank" rel="noopener nofollow ugc">[libtorch] build failed with opencv-4.0.0 using cmake (CPU and GPU)</a>
    </h4>

    <div class="github-info">
      <div class="date">
        opened <span class="discourse-local-date" data-format="ll" data-date="2018-12-02" data-time="13:44:37" data-timezone="UTC">01:44PM - 02 Dec 18 UTC</span>
      </div>

        <div class="date">
          closed <span class="discourse-local-date" data-format="ll" data-date="2018-12-04" data-time="04:08:05" data-timezone="UTC">04:08AM - 04 Dec 18 UTC</span>
        </div>

      <div class="user">
        <a href="https://github.com/Oldpan" target="_blank" rel="noopener nofollow ugc">
          <img alt="Oldpan" src="https://avatars.githubusercontent.com/u/9389127?v=4" class="onebox-avatar-inline" width="20" height="20">
          Oldpan
        </a>
      </div>
    </div>

    <div class="labels">
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          module: build
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          module: cpp
        </span>
        <span style="display:inline-block;margin-top:2px;background-color: #B8B8B8;padding: 2px;border-radius: 4px;color: #fff;margin-left: 3px;">
          module: abi
        </span>
    </div>
  </div>
</div>

  <div class="github-row">
    <p class="github-body-container">## 🐛 Bug

I think it's a small problem but I still can't future it out ..I wan<span class="show-more-container"><a href="" rel="noopener" class="show-more">…</a></span><span class="excerpt hidden">t to accomplish inference feature using libtorch and OpenCV . So I downloaded the last libtorch(GPU) from Pytorch.org. And also build OpenCV(4.0.0) from source.

When I build libtorch app and OpenCV app with cmake independently, it succeeds.

And when I build libtorch and OpenCV together and don't use 'imread()' function,it succeeds. And the code works in GPU(speed faster than CPU):
```c++
#include &lt;opencv2/opencv.hpp&gt;
#include "torch/script.h"
#include "torch/torch.h"

#include &lt;iostream&gt;
#include &lt;memory&gt;
#include &lt;ctime&gt;

using namespace std;
using namespace cv;

int main(int argc, const char* argv[])
{
    if (argc != 2) {
        std::cerr &lt;&lt; "usage: example-app &lt;path-to-exported-script-module&gt;\n";
        return -1;
    }

    std::shared_ptr&lt;torch::jit::script::Module&gt; module = torch::jit::load(argv[1]);

    std::vector&lt;torch::jit::IValue&gt; inputs;
    inputs.push_back(torch::ones({1,3,224,224}).to(at::kCUDA));

    module-&gt;to(at::kCUDA);
    // inputs.at[0].to(at::kCUDA);
    double timeStart = (double)getTickCount();

    for(int i = 0 ; i &lt; 1000 ; i++)
        at::Tensor output = module-&gt;forward(inputs).toTensor();

    double nTime = ((double)getTickCount() - timeStart) / getTickFrequency();

    cout &lt;&lt; "Time used:" &lt;&lt; nTime*1000 &lt;&lt; " ms" &lt;&lt; endl;
}
```
the CMakeLists:
```cmake
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
project(simnet)

find_package(Torch REQUIRED)
find_package(OpenCV REQUIRED)

if(NOT Torch_FOUND)
    message(FATAL_ERROR "Pytorch Not Found!")
endif(NOT Torch_FOUND)

message(STATUS "Pytorch status:")
message(STATUS "    libraries: ${TORCH_LIBRARIES}")

message(STATUS "OpenCV library status:")
message(STATUS "    version: ${OpenCV_VERSION}")
message(STATUS "    libraries: ${OpenCV_LIBS}")
message(STATUS "    include path: ${OpenCV_INCLUDE_DIRS}")

add_executable(simnet main.cpp)
# link_directories(/usr/local/lib)   'find_package' has already done this
target_link_libraries(simnet ${TORCH_LIBRARIES} ${OpenCV_LIBS})
set_property(TARGET simnet PROPERTY CXX_STANDARD 11)
```
and cmake config:
```cmake
/home/prototype/Downloads/clion-2018.3/bin/cmake/linux/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=/home/prototype/Desktop/Cuda-project/libtorch -G "CodeBlocks - Unix Makefiles" /home/prototype/CLionProjects/simnet
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found CUDA: /usr/local/cuda (found suitable version "9.2", minimum required is "7.0") 
-- Caffe2: CUDA detected: 9.2
-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda
-- Caffe2: Header version is: 9.2
-- Found CUDNN: /usr/local/cuda/include  
-- Found cuDNN: v7.4.1  (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s): 6.1;6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
-- Found torch: /home/prototype/Desktop/Cuda-project/libtorch/lib/libtorch.so  
-- Found OpenCV: /usr/local (found version "4.0.0") 
-- Pytorch status:
--     libraries: torch;caffe2_library;caffe2_gpu_library;/usr/lib/x86_64-linux-gnu/libcuda.so;/usr/local/cuda/lib64/libnvrtc.so;/usr/local/cuda/lib64/libnvToolsExt.so;/usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/x86_64-linux-gnu/librt.so
-- OpenCV library status:
--     version: 4.0.0
--     libraries: opencv_calib3d;opencv_core;opencv_dnn;opencv_features2d;opencv_flann;opencv_gapi;opencv_highgui;opencv_imgcodecs;opencv_imgproc;opencv_ml;opencv_objdetect;opencv_photo;opencv_stitching;opencv_video;opencv_videoio
--     include path: /usr/local/include/opencv4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/prototype/CLionProjects/simnet/cmake-build-debug
```
**But when I build libtorch and OpenCV together and  use 'imread()' and 'imshow()'(with same CMakeLists),it build failed:**
```c++
#include &lt;opencv2/opencv.hpp&gt;
#include "torch/script.h"
#include "torch/torch.h"

#include &lt;iostream&gt;
#include &lt;memory&gt;
#include &lt;ctime&gt;

using namespace std;
using namespace cv;

int main(int argc, const char* argv[])
{
    Mat image = imread("/home/prototype/Documents/gesture/show/paper.png");
    cout&lt;&lt;"image size is "&lt;&lt;image.size()&lt;&lt;endl;

    if (argc != 2) {
        std::cerr &lt;&lt; "usage: example-app &lt;path-to-exported-script-module&gt;\n";
        return -1;
    }

    std::shared_ptr&lt;torch::jit::script::Module&gt; module = torch::jit::load(argv[1]);

    std::vector&lt;torch::jit::IValue&gt; inputs;
    inputs.push_back(torch::ones({1,3,224,224}).to(at::kCUDA));

    module-&gt;to(at::kCUDA);
    // inputs.at[0].to(at::kCUDA);
    double timeStart = (double)getTickCount();

    for(int i = 0 ; i &lt; 1000 ; i++)
        at::Tensor output = module-&gt;forward(inputs).toTensor();

    double nTime = ((double)getTickCount() - timeStart) / getTickFrequency();

    cout &lt;&lt; "Time used:" &lt;&lt; nTime*1000 &lt;&lt; " ms" &lt;&lt; endl;
}
```
the output log:
```
/home/prototype/Downloads/clion-2018.3/bin/cmake/linux/bin/cmake --build /home/prototype/CLionProjects/simnet/cmake-build-release --target simnet -- -j 10
Scanning dependencies of target simnet
[ 50%] Building CXX object CMakeFiles/simnet.dir/main.cpp.o
[100%] Linking CXX executable simnet
CMakeFiles/simnet.dir/main.cpp.o: In function `main':
main.cpp:(.text.startup+0x55): undefined reference to `cv::imread(std::string const&amp;, int)'
collect2: error: ld returned 1 exit status
CMakeFiles/simnet.dir/build.make:114: recipe for target 'simnet' failed
make[3]: *** [simnet] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/simnet.dir/all' failed
make[2]: *** [CMakeFiles/simnet.dir/all] Error 2
CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/simnet.dir/rule' failed
make[1]: *** [CMakeFiles/simnet.dir/rule] Error 2
Makefile:118: recipe for target 'simnet' failed
make: *** [simnet] Error 2
```
From the begin I think maybe in CPU the code will work, however when I use libtorch-cpu it gave rise to the same problem.

I also tried the same thing on MacOS and it works (with libtorch-mac and OpenCV-4.0.0). I really don't know why. I feel confused.

## Environment

 - libtorch Version : 1.0.0.dev20181128
 - OS (e.g., Linux): ubuntu 16.04
 - How you installed PyTorch (`conda`, `pip`, source): downloaded from Pytorch.org
 - CUDA/cuDNN version: CUDA:9.2 cuDNN:7.4.1
- OpenCV version: 4.0.0 
- cmake:3.12.2
- gcc-7 g++-7

Can you help me, thanks~</span></p>
  </div>

  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<aside class="quote" data-post="3" data-topic="44286">
  <div class="title">
    <div class="quote-controls"></div>
    <img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/h/c5a1d2/48.png" class="avatar">
    <a href="https://discuss.pytorch.org/t/cmake-problem-minimal-example-for-c-frontend/44286/3">Cmake problem minimal example for c++ frontend</a> <a class="badge-category__wrapper " href="/c/c/11"><span data-category-id="11" style="--category-badge-color: #9EB83B; --category-badge-text-color: #FFFFFF;" data-drop-close="true" class="badge-category " title="Topics related to the C++ Frontend, C++ API or C++ Extensions"><span class="badge-category__name">C++</span></span></a>
  </div>
  <blockquote>
    I found a solution : for some reasons the function 

find_library(TORCH_LIBRARY torch PATHS “${TORCH_INSTALL_PREFIX}/lib”) 

in the torchConfig.cmake file wasn’t working. 
I just added 

set(TORCH_LIBRARY, “${TORCH_INSTALL_PREFIX}/lib/libtorch.so”) 

below and it worked like a charm.
  </blockquote>
</aside>
<p>
All failed to slove this problem.</p>

peterjc123: <p><code>CMAKE_PREFIX_PATH</code> should be set to <code>C:\Users\The Shape of Voice\CLionProjects\HappySugarLife\libtorch</code>. Also, please ensure you are using MSVC as the compiler/generator.</p>

JonathanSum: <p>Thank You, I will try it later.</p>