extension-script
extension-script copied to clipboard
Under Ubuntu18.04。When I compile the number, there is an error calling the libwarp_perspective.so file。
OSError: /home/huang/vsopencv/extension-script/example_app/build/warp_perspective/libwarp_perspective.so: undefined symbol: _ZN3c1017RegisterOperators25checkSchemaAndRegisterOp_ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEONS0_7OptionsE
(pytorch) huang@huang-ubuntu:~/vsopencv/extension-script/example_app/warp_perspective/build$ cmake -DCMAKE_PREFIX_PATH=/home/huang/libtorch1.2.0/libtorch ..
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.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
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- 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-10.0 (found version "10.0")
-- Caffe2: CUDA detected: 10.0
-- Caffe2: CUDA nvcc is: /usr/local/cuda-10.0/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda-10.0
-- Caffe2: Header version is: 10.0
-- Found CUDNN: /usr/local/cuda-10.0/include
-- Found cuDNN: v7.6.4 (include: /usr/local/cuda-10.0/include, library: /usr/local/cuda-10.0/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s): 7.5
-- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
-- Found torch: /home/huang/libtorch1.2.0/libtorch/lib/libtorch.so
-- Pytorch status:
-- libraries: torch;torch_library;/home/huang/libtorch1.2.0/libtorch/lib/libc10.so;/usr/lib/x86_64-linux-gnu/libcuda.so;/usr/local/cuda-10.0/lib64/libnvrtc.so;/usr/local/cuda-10.0/lib64/libnvToolsExt.so;/usr/local/cuda-10.0/lib64/libcudart.so;/home/huang/libtorch1.2.0/libtorch/lib/libc10_cuda.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/huang/vsopencv/extension-script/example_app/warp_perspective/build
(pytorch) huang@huang-ubuntu:~/vsopencv/extension-script/example_app/warp_perspective/build$ make
Scanning dependencies of target warp_perspective
[ 50%] Building CXX object CMakeFiles/warp_perspective.dir/op.cpp.o
/home/huang/vsopencv/extension-script/example_app/warp_perspective/op.cpp:11:78: warning: ‘torch::jit::RegisterOperators::RegisterOperators(const string&, Implementation&&) [with Implementation = at::Tensor (*)(at::Tensor, at::Tensor); std::__cxx11::string = std::__cxx11::basic_string
Why don't you use a provided docker?
@zetyquickly The anaconda tool I use. But it's not about using containers. Containers are just convenient to provide a clean environment.
@zetyquickly The anaconda tool I use. But it's not about using containers. Containers are just convenient to provide a clean environment.
I got the same error with docker, and several other issues. What version of pytorch do you use?