Reputation: 146
I have the following error when compiling caffe in ubuntu 20 and cuda 11.
Any ideas? Thanks!
/usr/bin/ld: ../lib/libcaffe.so.1.0.0: undefined reference to `cudaGetDeviceProperties_v2'
collect2: error: ld returned 1 exit status
make[5]: *** [tools/CMakeFiles/upgrade_net_proto_text.dir/build.make:118: tools/upgrade_net_proto_text] Error 1
make[4]: *** [CMakeFiles/Makefile2:483: tools/CMakeFiles/upgrade_net_proto_text.dir/all] Error 2
make[4]: *** Waiting for unfinished jobs....
/usr/bin/ld: ../lib/libcaffe.so.1.0.0: undefined reference to `cudaGetDeviceProperties_v2'
collect2: error: ld returned 1 exit status
make[5]: *** [tools/CMakeFiles/upgrade_solver_proto_text.dir/build.make:118: tools/upgrade_solver_proto_text] Error 1
make[4]: *** [CMakeFiles/Makefile2:623: tools/CMakeFiles/upgrade_solver_proto_text.dir/all] Error 2
/usr/bin/ld: ../lib/libcaffe.so.1.0.0: undefined reference to `cudaGetDeviceProperties_v2'
collect2: error: ld returned 1 exit status
make[5]: *** [examples/CMakeFiles/convert_cifar_data.dir/build.make:118: examples/cifar10/convert_cifar_data] Error 1
make[4]: *** [CMakeFiles/Makefile2:763: examples/CMakeFiles/convert_cifar_data.dir/all] Error 2
/usr/bin/ld: ../lib/libcaffe.so.1.0.0: undefined reference to `cudaGetDeviceProperties_v2'
collect2: error: ld returned 1 exit status
make[5]: *** [tools/CMakeFiles/extract_features.dir/build.make:118: tools/extract_features] Error 1
make[4]: *** [CMakeFiles/Makefile2:539: tools/CMakeFiles/extract_features.dir/all] Error 2
/usr/bin/ld: ../lib/libcaffe.so.1.0.0: undefined reference to `cudaGetDeviceProperties_v2'
collect2: error: ld returned 1 exit status
make[5]: *** [tools/CMakeFiles/upgrade_net_proto_binary.dir/build.make:118: tools/upgrade_net_proto_binary] Error 1
make[4]: *** [CMakeFiles/Makefile2:511: tools/CMakeFiles/upgrade_net_proto_binary.dir/all] Error 2
The compile should succeed, basically there no google result if you search: cudaGetDeviceProperties_v2
Upvotes: 1
Views: 2049
Reputation: 23
cudaGetDeviceProperties_v2 is in cuda 12.2 , you might have changed the cuda version to cuda 11.* , where the function is only
cudaGetDeviceProperties and _v2 is not there. make clean and run make
Upvotes: 1