colmap icon indicating copy to clipboard operation
colmap copied to clipboard

/usr/bin/ld: cannot find -lCUDA_cublas_LIBRARY-NOTFOUND

Open wliang410 opened this issue 4 years ago • 6 comments

Hello, I am on Ubuntu 18.04 and I am using CUDA 11.1.

[100%] Building CXX object src/exe/CMakeFiles/colmap_exe.dir/sfm.cc.o [100%] Building CXX object src/exe/CMakeFiles/colmap_exe.dir/vocab_tree.cc.o [100%] Linking CXX executable colmap /usr/bin/ld: cannot find -lCUDA_cublas_LIBRARY-NOTFOUND collect2: error: ld returned 1 exit status src/exe/CMakeFiles/colmap_exe.dir/build.make:265: recipe for target 'src/exe/colmap' failed make[2]: *** [src/exe/colmap] Error 1 CMakeFiles/Makefile2:756: recipe for target 'src/exe/CMakeFiles/colmap_exe.dir/all' failed make[1]: *** [src/exe/CMakeFiles/colmap_exe.dir/all] Error 2 Makefile:135: recipe for target 'all' failed make: *** [all] Error 2

wliang410 avatar Mar 13 '22 10:03 wliang410

I am also facing the same issue. (I am using CUDA 10.2.89). Could you figure out the issue by any chance?

jsreddy avatar Mar 14 '22 03:03 jsreddy

This problem has not been solved yet.

wliang410 avatar Mar 14 '22 05:03 wliang410

Can you verify that the cublas library is installed as part of CUDA? At least according to the error, the library seems to be missing.

tsattler avatar Mar 14 '22 19:03 tsattler

Can you verify that the cublas library is installed as part of CUDA? At least according to the error, the library seems to be missing.

Yes, the libcublas library is existed in the path —— /usr/local/cuda/lib64.

wliang410 avatar Mar 15 '22 00:03 wliang410

Can you verify that the cublas library is installed as part of CUDA? At least according to the error, the library seems to be missing.

Yes, the libcublas library is existed in the path —— /usr/local/cuda/lib64. Have you solved it now?

godzzbboss avatar Jul 04 '22 11:07 godzzbboss

Have you solved it now?

godzzbboss avatar Jul 04 '22 11:07 godzzbboss

Thought i've just solved a similar problem #1686

oxyhexagen avatar Nov 11 '22 05:11 oxyhexagen

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

godzzbboss avatar Nov 11 '22 05:11 godzzbboss

Hi, I've met the same issue and solved it by adding following three lines after the similar lines in CMakeLists.txt https://github.com/colmap/colmap/blob/2b1f843e23f4383c4e2667451ec73271fb67e96b/CMakeLists.txt#L145-L146

declare_imported_cuda_target(cublas ${CUDA_LIBRARIES})
declare_imported_cuda_target(cusparse ${CUDA_LIBRARIES})
declare_imported_cuda_target(cusolver ${CUDA_LIBRARIES})

HajimeTaira avatar Mar 13 '23 13:03 HajimeTaira

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

godzzbboss avatar Mar 13 '23 13:03 godzzbboss