Hi,
Currently, im compile your SiamMaskCpp project using dlib, opencv, torchscript and CUDA 10.1.
When compiler linking demo excutable, i got error as the following:
ERROR
CMakeFiles/demo.dir/demo.cpp.o: In function dlib::config_reader_kernel_1<dlib::map_kernel_1<std::string, std::string, dlib::binary_search_tree_kernel_2<std::string, std::string, dlib::memory_manager_stateless_kernel_1<char>, std::less<std::string> >, dlib::memory_manager_stateless_kernel_1<char> >, dlib::map_kernel_1<std::string, void*, dlib::binary_search_tree_kernel_2<std::string, void*, dlib::memory_manager_stateless_kernel_1<char>, std::less<std::string> >, dlib::memory_manager_stateless_kernel_1<char> >, dlib::tokenizer_kernel_1>::parse_config_file(dlib::config_reader_kernel_1<dlib::map_kernel_1<std::string, std::string, dlib::binary_search_tree_kernel_2<std::string, std::string, dlib::memory_manager_stateless_kernel_1<char>, std::less<std::string> >, dlib::memory_manager_stateless_kernel_1<char> >, dlib::map_kernel_1<std::string, void*, dlib::binary_search_tree_kernel_2<std::string, void*, dlib::memory_manager_stateless_kernel_1<char>, std::less<std::string> >, dlib::memory_manager_stateless_kernel_1<char> >, dlib::tokenizer_kernel_1>&, dlib::tokenizer_kernel_1&, unsigned long&, bool) [clone .constprop.767]': demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x5e): undefined reference to
dlib::tokenizer_kernel_1::get_token(int&, std::string&)'
demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x3bd): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x3d1): undefined reference to
dlib::tokenizer_kernel_1::peek_token() const'
demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x53e): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x5c4): undefined reference to
dlib::tokenizer_kernel_1::peek_token() const'
demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x5e2): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x694): undefined reference to
dlib::tokenizer_kernel_1::peek_token() const'
demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x6b2): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN4dlib22config_reader_kernel_1INS_12map_kernel_1ISsSsNS_27binary_search_tree_kernel_2ISsSsNS_33memory_manager_stateless_kernel_1IcEESt4lessISsEEES4_EENS1_ISsPvNS2_ISsS9_S4_S6_EES4_EENS_18tokenizer_kernel_1EE17parse_config_fileERSD_RSC_Rmb.constprop.767[_ZN5State11load_configERKSs]+0x79e): undefined reference to
dlib::tokenizer_kernel_1::get_token(int&, std::string&)'
CMakeFiles/demo.dir/demo.cpp.o: In function main': demo.cpp:(.text.startup+0x9b4): undefined reference to
dlib::directory::init(std::string const&)'
CMakeFiles/demo.dir/demo.cpp.o: In function State::load_config(std::string const&)': demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x1f8): undefined reference to
dlib::tokenizer_kernel_1::numbers() const'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x20a): undefined reference to dlib::tokenizer_kernel_1::uppercase_letters() const' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x21c): undefined reference to
dlib::tokenizer_kernel_1::lowercase_letters() const'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x28d): undefined reference to dlib::tokenizer_kernel_1::uppercase_letters() const' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x29f): undefined reference to
dlib::tokenizer_kernel_1::lowercase_letters() const'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x2d4): undefined reference to dlib::tokenizer_kernel_1::set_identifier_token(std::string const&, std::string const&)' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x3e3): undefined reference to
dlib::tokenizer_kernel_1::get_token(int&, std::string&)'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0xe42): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0xe60): undefined reference to
dlib::tokenizer_kernel_1::peek_token() const'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0xfdb): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x1071): undefined reference to
dlib::tokenizer_kernel_1::peek_token() const'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x1094): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x1109): undefined reference to
dlib::tokenizer_kernel_1::peek_token() const'
demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x112c): undefined reference to dlib::tokenizer_kernel_1::get_token(int&, std::string&)' demo.cpp:(.text._ZN5State11load_configERKSs[_ZN5State11load_configERKSs]+0x1269): undefined reference to
dlib::tokenizer_kernel_1::get_token(int&, std::string&)'
collect2: error: ld returned 1 exit status
CMakeFiles/demo.dir/build.make:178: recipe for target 'demo' failed
make[2]: *** [demo] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/demo.dir/all' failed
make[1]: *** [CMakeFiles/demo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Information about my environment:
OS: Ubuntu 16.04
OPENCV: 3.4.4 version (Build from source with CUDA 10.1, cuDNN: v7.6.5)
DLIB version: 19.19.0 (Build from source with CUDA 10.1, cuDNN: v7.6.5)
Cmake version: 3.16.3
Here is my Cmake config output:
-- Caffe2: CUDA detected: 10.1
-- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr/local/cuda
-- Caffe2: Header version is: 10.1
-- Found cuDNN: v7.6.5 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)
-- Autodetected CUDA architecture(s): 6.1
-- Added CUDA NVCC flags for: -gencode;arch=compute_61,code=sm_61
-- Using CMake version: 3.16.3
-- Compiling dlib version: 19.19.0
-- Enabling AVX instructions
-- Found system copy of libpng: /usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so
-- Found system copy of libjpeg: /usr/lib/x86_64-linux-gnu/libjpeg.so
-- Searching for BLAS and LAPACK
-- Searching for BLAS and LAPACK
-- Checking for module 'cblas'
-- No package 'cblas' found
-- Found OpenBLAS library
-- Using OpenBLAS's built in LAPACK
-- C++11 activated.
-- Configuring done
-- Generating done
Questions
Could you please help me check it?
Or atl least, could you share to me your configuration like above?
Thank you very much!