tum-vision / tandem

[CoRL 21'] TANDEM: Tracking and Dense Mapping in Real-time using Deep Multi-view Stereo
919 stars 150 forks source link

links to target "CUDA::cublas" but the target was not found. #10

Closed DormouseLi closed 2 years ago

DormouseLi commented 2 years ago

Hi, when I run

cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_PREFIX_PATH=$TANDEM_LIBTORCH_DIR \
    -DCUDNN_LIBRARY=$TANDEM_CUDNN_LIBRARY \
    -DCUDNN_INCLUDE_PATH=$TANDEM_CUDNN_INCLUDE_PATH

there are some errors: -- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.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
-- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- thread -- chrono -- date_time -- atomic -- Found CUDA: /usr/local/cuda (found version "11.1") -- Caffe2: CUDA detected: 11.1 -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc -- Caffe2: CUDA toolkit directory: /usr/local/cuda -- Caffe2: Header version is: 11.1 -- Found CUDNN: /usr/local/cuda/lib64/libcudnn.so
-- Found cuDNN: v8.2.1 (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so) -- /usr/local/cuda/lib64/libnvrtc.so shorthash is 3a20f2b6 -- Autodetected CUDA architecture(s): 8.6 -- Added CUDA NVCC flags for: -gencode;arch=compute_86,code=sm_86 -- Found Torch: /home/libtorch-cxx11-abi-shared-with-deps-1.9.0+cu111/libtorch/lib/libtorch.so
-- Found OpenCV: /usr/local (found version "4.5.4") -- Boost version: 1.65.1 -- Found the following Boost libraries: -- system -- thread -- chrono -- date_time -- atomic -- The CUDA compiler identification is NVIDIA 11.1.105 -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Found Eigen headers in: /usr/include/eigen3 -- Release mode (!= not Debug). Adding -O3;-lineinfo to NVCC FLAGS --- found PANGOLIN, compiling tandem_pangolin library. --- found OpenCV (/usr/local/include/opencv4), compiling tandem_opencv library. --- compiling tandem_dataset. -- TANDEM DEMO will be compiled -- Realsense Calib Recorded Will be compiled -- Configuring done CMake Error at CMakeLists.txt:115 (add_library): Target "tandem" links to target "CUDA::cublas" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:142 (add_executable): Target "tandem_demo" links to target "CUDA::cublas" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at CMakeLists.txt:131 (add_executable): Target "tandem_dataset" links to target "CUDA::cublas" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error at libdr/cuda_coarse_tracker/CMakeLists.txt:27 (add_library): Target "cuda_coarse_tracker" links to target "CUDA::cublas" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?

CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_CUDA_DEVICE_LINK_EXECUTABLE CMake Error: Error required internal CMake variable not set, cmake may not be built correctly. Missing variable is: CMAKE_CUDA_DEVICE_LINK_EXECUTABLE -- Generating done

how to fix it ? Thanks!

ko440124 commented 2 years ago

Have you ever modified the cmake file? Try to git clone again.

DormouseLi commented 2 years ago

Have you ever modified the cmake file? Try to git clone again.

It does work!!!

lkskstlr commented 2 years ago

Thank you @ko440124 for the helpful hint. I will close this issue now :)

AreteQin commented 1 year ago

Hi,

I encountered the same error. Can you pls let me know what have you changed in the CMakeList to solve the problem?