Library conflict between libtorch and opencv?

dalalaa: <p>I’m trying to deploy model by C++, I got this error when &lt;torch/script.h&gt; is included in my code:</p>
<pre><code class="lang-auto">mat_tensor.cpp:(.text+0x6d): undefined reference to `cv::imread(std::string const&amp;, int)'
mat_tensor.cpp:(.text+0xad): undefined reference to `cv::namedWindow(std::string const&amp;, int)'
mat_tensor.cpp:(.text+0x126): undefined reference to `cv::imshow(std::string const&amp;, cv::_InputArray const&amp;)'
collect2: error: ld returned 1 exit status
CMakeFiles/mat_tensor.dir/build.make:116: recipe for target 'mat_tensor' failed
make[2]: *** [mat_tensor] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/mat_tensor.dir/all' failed
make[1]: *** [CMakeFiles/mat_tensor.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
</code></pre>
<p>When I removed torch from my code and CMakeLists.txt, everything words well.</p>
<p>My code:</p>
<pre><code class="lang-auto">#include &lt;opencv2/core/core.hpp&gt;
#include &lt;opencv2/imgproc/imgproc.hpp&gt;
#include &lt;opencv2/highgui/highgui.hpp&gt;
#include &lt;iostream&gt;
#include &lt;torch/script.h&gt;
#include &lt;string&gt;

int main()
{
    std::string p = "/home/dai/scripts/pytorch_chineseocr/pictures/1.png";
    cv::Mat img = cv::imread(p);
    cv::namedWindow("img");
    cv::imshow("img",img);
    cv::waitKey(0);
    return 0;
}
</code></pre>
<p>CMakeLists.txt</p>
<pre><code class="lang-auto">cmake_minimum_required(VERSION 3.10)
project(mat_tensor)

SET(OpenCV_DIR /home/dai/library/opencv-2.4.13.6/build)
SET(Torch_DIR /home/dai/library/libtorch_cpu/share/cmake/Torch)
find_package(OpenCV REQUIRED)
find_package(Torch REQUIRED)
add_executable(mat_tensor mat_tensor.cpp)
target_link_libraries(mat_tensor ${OpenCV_LIBRARIES})
target_link_libraries(mat_tensor ${TORCH_LIBRARIES})
</code></pre>
<p>My Libtorch version is libtorch1.3+cpu, and OpenCV version is 2.4.13( 2.4.9 doesn’t work either).</p>

yf225: <p>This is likely an ABI compatibility issue. Could you try using libtorch binary with new ABI?</p>

dambo: <p>Use my docker here:<br>
<aside class="onebox whitelistedgeneric">
  <header class="source">
      <img src="https://github.githubassets.com/favicon.ico" class="site-icon" width="16" height="16">
      <a href="https://github.com/QuantScientist/DarkTorch" target="_blank" rel="nofollow noopener">GitHub</a>
  </header>
  <article class="onebox-body">
    <img src="https://avatars1.githubusercontent.com/u/18743986?s=400&amp;v=4" class="thumbnail onebox-avatar" width="60" height="60">

<h3><a href="https://github.com/QuantScientist/DarkTorch" target="_blank" rel="nofollow noopener">QuantScientist/DarkTorch</a></h3>

<p>A low-latency deep learning inference server using pytorch C++ frontend &amp; NVIDIA GPUs.  - QuantScientist/DarkTorch</p>


  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
<br>
<aside class="onebox githubblob">
  <header class="source">
      <a href="https://github.com/QuantScientist/DarkTorch/blob/master/docker/cuda10/Dockerfile" target="_blank" rel="nofollow noopener">github.com</a>
  </header>
  <article class="onebox-body">
    <h4><a href="https://github.com/QuantScientist/DarkTorch/blob/master/docker/cuda10/Dockerfile" target="_blank" rel="nofollow noopener">QuantScientist/DarkTorch/blob/master/docker/cuda10/Dockerfile</a></h4>
<pre><code class="lang-">#FROM nvcr.io/nvidia/tensorrt:19.03-py3
# FROM nvcr.io/nvidia/pytorch:19.07-py3
# FROM nvcr.io/nvidia/pytorch:18.12-py3
FROM nvcr.io/nvidia/pytorch:19.02-py3
# https://github.com/freemanix/torchbuilder/blob/master/Dockerfile

RUN apt-get update &amp;&amp;\
    apt-get install -y sudo git bash


ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:/code/cmake-3.14.3-Linux-x86_64/bin:${PATH}
ENV PYTHONPATH=/opt/conda/lib/python3.6/site-packages/:$PYTHONPATH
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/conda/lib/:/opt/conda/lib/python3.6

RUN apt-get update \
 &amp;&amp; apt-get install -y \
    build-essential git gfortran \
    cmake curl wget unzip libreadline-dev libjpeg-dev libpng-dev ncurses-dev \
    imagemagick gnuplot gnuplot-x11 libssl-dev libzmq3-dev graphviz

</code></pre>

  This file has been truncated. <a href="https://github.com/QuantScientist/DarkTorch/blob/master/docker/cuda10/Dockerfile" target="_blank" rel="nofollow noopener">show original</a>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>
<p>It resolves the issue. An example is available here:<br>
<aside class="onebox githubblob">
  <header class="source">
      <a href="https://github.com/QuantScientist/DarkTorch/blob/master/001_verify/CMakeLists.txt" target="_blank" rel="nofollow noopener">github.com</a>
  </header>
  <article class="onebox-body">
    <h4><a href="https://github.com/QuantScientist/DarkTorch/blob/master/001_verify/CMakeLists.txt" target="_blank" rel="nofollow noopener">QuantScientist/DarkTorch/blob/master/001_verify/CMakeLists.txt</a></h4>
<pre><code class="lang-txt">cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(001_verify VERSION 1.2.3.4 LANGUAGES CXX)
set(PROJECT_NAME 001_verify)
set(CMAKE_BUILD_TYPE Release)

if (NOT DEFINED CMAKE_CXX_STANDARD)
    SET(CMAKE_CXX_STANDARD 11)
    SET(CMAKE_CXX_STANDARD_REQUIRED ON)
    set(CMAKE_VERBOSE_MAKEFILE ON)
endif ()
if (CMAKE_CXX_STANDARD LESS 11)
    message(FATAL_ERROR "CMAKE_CXX_STANDARD is less than 11.")
endif ()


set(CXX_RELEASE_FLAGS = -O3 -march=native)

if (CMAKE_SIZEOF_VOID_P EQUAL 8)
    message(STATUS "*** Have SIZEOF void * = 8, so 64-bit")
</code></pre>

  This file has been truncated. <a href="https://github.com/QuantScientist/DarkTorch/blob/master/001_verify/CMakeLists.txt" target="_blank" rel="nofollow noopener">show original</a>

  </article>
  <div class="onebox-metadata">
    
    
  </div>
  <div style="clear: both"></div>
</aside>
</p>

dalalaa: <p>I met error as following using libtorch binary with new ABI:</p>
<pre><code class="lang-auto">In function `c10::tensorTypeIdToBackend(c10::TensorTypeId)':
ocr.cpp:(.text+0x35d): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::backendToDeviceType(c10::Backend)':
ocr.cpp:(.text+0x5c3): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
ocr.cpp:(.text+0x6e8): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::typeMetaToScalarType(caffe2::TypeMeta)':
ocr.cpp:(.text+0xdd5): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `LoadModels(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, torch::jit::script::Module&amp;, torch::jit::script::Module&amp;, torch::jit::script::Module)':
ocr.cpp:(.text+0x135f): undefined reference to `torch::jit::load(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, c10::optional&lt;c10::Device&gt;, std::unordered_map&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::hash&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::equal_to&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;std::pair&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;&amp;)'
ocr.cpp:(.text+0x13af): undefined reference to `torch::jit::load(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, c10::optional&lt;c10::Device&gt;, std::unordered_map&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::hash&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::equal_to&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;std::pair&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;&amp;)'
ocr.cpp:(.text+0x13fe): undefined reference to `torch::jit::load(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, c10::optional&lt;c10::Device&gt;, std::unordered_map&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;, std::hash&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::equal_to&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt;, std::allocator&lt;std::pair&lt;std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; &gt; &gt; &gt;&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::Device::validate()':
ocr.cpp:(.text._ZN3c106Device8validateEv[_ZN3c106Device8validateEv]+0x10f): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
ocr.cpp:(.text._ZN3c106Device8validateEv[_ZN3c106Device8validateEv]+0x256): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::operator&lt;&lt;(std::ostream&amp;, c10::Layout)':
ocr.cpp:(.text._ZN3c10lsERSoNS_6LayoutE[_ZN3c10lsERSoNS_6LayoutE]+0x155): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::intrusive_ptr_target::~intrusive_ptr_target()':
ocr.cpp:(.text._ZN3c1020intrusive_ptr_targetD2Ev[_ZN3c1020intrusive_ptr_targetD5Ev]+0x12b): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
ocr.cpp:(.text._ZN3c1020intrusive_ptr_targetD2Ev[_ZN3c1020intrusive_ptr_targetD5Ev]+0x259): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o:ocr.cpp:(.text._ZN3c1011StorageImplC2EN6caffe28TypeMetaElNS_7DataPtrEPNS_9AllocatorEb[_ZN3c1011StorageImplC5EN6caffe28TypeMetaElNS_7DataPtrEPNS_9AllocatorEb]+0x1bf): more undefined references to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)' follow
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::Symbol::dimname(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)':
ocr.cpp:(.text._ZN3c106Symbol7dimnameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN3c106Symbol7dimnameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x3b): undefined reference to `c10::Symbol::fromQualString(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::IValue::toTensor() &amp;&amp;':
ocr.cpp:(.text._ZNO3c106IValue8toTensorEv[_ZNO3c106IValue8toTensorEv]+0x11d): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `at::ATenDispatch::getOpTable(char const*) const':
ocr.cpp:(.text._ZNK2at12ATenDispatch10getOpTableEPKc[_ZNK2at12ATenDispatch10getOpTableEPKc]+0x180): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `at::Context::getDeviceFromPtr(void*, c10::DeviceType)':
ocr.cpp:(.text._ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE[_ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE]+0x113): undefined reference to `c10::DeviceTypeName[abi:cxx11](c10::DeviceType, bool)'
ocr.cpp:(.text._ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE[_ZN2at7Context16getDeviceFromPtrEPvN3c1010DeviceTypeE]+0x1ab): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `at::from_blob(void*, c10::ArrayRef&lt;long&gt;, c10::ArrayRef&lt;long&gt;, std::function&lt;void (void*)&gt; const&amp;, c10::TensorOptions const&amp;)':
ocr.cpp:(.text._ZN2at9from_blobEPvN3c108ArrayRefIlEES3_RKSt8functionIFvS0_EERKNS1_13TensorOptionsE[_ZN2at9from_blobEPvN3c108ArrayRefIlEES3_RKSt8functionIFvS0_EERKNS1_13TensorOptionsE]+0x1e5): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `torch::autograd::make_variable(at::Tensor, bool, bool)':
ocr.cpp:(.text._ZN5torch8autograd13make_variableEN2at6TensorEbb[_ZN5torch8autograd13make_variableEN2at6TensorEbb]+0x108): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::intrusive_ptr&lt;c10::intrusive_ptr_target, c10::detail::intrusive_target_default_null_type&lt;c10::intrusive_ptr_target&gt; &gt;::reclaim(c10::intrusive_ptr_target*)':
ocr.cpp:(.text._ZN3c1013intrusive_ptrINS_20intrusive_ptr_targetENS_6detail34intrusive_target_default_null_typeIS1_EEE7reclaimEPS1_[_ZN3c1013intrusive_ptrINS_20intrusive_ptr_targetENS_6detail34intrusive_target_default_null_typeIS1_EEE7reclaimEPS1_]+0x145): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o: In function `c10::KernelFunction const&amp; c10::DispatchTable::lookup_&lt;c10::DispatchTable::lookup(c10::TensorTypeId) const::{lambda()#1}&gt;(c10::DispatchTable::lookup(c10::TensorTypeId) const::{lambda()#1} const&amp;) const':
ocr.cpp:(.text._ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_[_ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_]+0x1e2): undefined reference to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
CMakeFiles/cpp_deploy.dir/ocr.cpp.o:ocr.cpp:(.text._ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_[_ZNK3c1013DispatchTable7lookup_IZNKS0_6lookupENS_12TensorTypeIdEEUlvE_EERKNS_14KernelFunctionERKT_]+0x3a4): more undefined references to `c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)' follow
tools/libtools.so: undefined reference to `torch::jit::parseSchemaOrName(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
</code></pre>

yf225: <p><a class="mention" href="/u/dalalaa">@dalalaa</a> hmm this is weird, did you download <a href="https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.3.1.zip" rel="nofollow noopener">https://download.pytorch.org/libtorch/cu101/libtorch-cxx11-abi-shared-with-deps-1.3.1.zip</a> ?</p>

dalalaa: <p>I downloaded it from <a href="https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.3.1%2Bcpu.zip" rel="nofollow noopener">https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.3.1%2Bcpu.zip</a><br>
And my environment is :</p>
<pre><code class="lang-auto">gcc:7.5
Lubuntu:18.04
Python:3.7.4
PyTorch:1.3.1
</code></pre>
<p>CMakeLists.txt:</p>
<pre><code class="lang-auto">cmake_minimum_required(VERSION 3.10)
add_definitions(-std=c++11)
project(cpp_deploy)

set(OpenCV_DIR /home/dai/lib/opencv-2.4.9/build)
set(Torch_DIR /home/dai/lib/libtorch_cxx11/libtorch/share/cmake/Torch)
find_package(OpenCV REQUIRED)
find_package(Torch REQUIRED)

add_subdirectory(tools)
add_executable(cpp_deploy ocr.cpp)
target_link_libraries(cpp_deploy ${TORCH_LIBRARIES})
target_link_libraries(cpp_deploy ${OpenCV_LIBRARIES})
target_link_libraries(cpp_deploy -Wl,--no-as-needed tools)
target_compile_features(cpp_deploy PRIVATE cxx_range_for)
</code></pre>

offset-null1: <p>Did this issue resolve? Even I’m facing the same.</p>

lzl_jnu: <p><a class="mention" href="/u/offset-null1">@offset-null1</a> I fixed it using <a href="https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.8.1%2Bcpu.zip" rel="noopener nofollow ugc">cxx11 ABI</a> instead of <a href="https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.8.1%2Bcpu.zip" rel="noopener nofollow ugc">Pre-cxx11 ABI</a></p>

AlexT: <p>Bingo !!! Thanks a lot !! This is big unrecognizing bug !! After reinstall libtorch, all dependences  resolved.<br>
For CUDA reliase too.<br>
Please USE <strong>libtorch-cxx11-abi-shared-with-deps</strong>-1.10.0+cu102 NOT <strong>libtorch-shared-with-deps</strong>-1.10.0+cu102.</p>