openpose
openpose copied to clipboard
[Compilation error]Get undefined reference to `cudaGetDeviceProperties_v2' error when compile from source in ubuntu.
I was on the step in this link: https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation/0_index.md#ubuntu
Then compile is reporting an error:
[ 98%] Built target compute_image_mean
[ 98%] Built target convert_mnist_data
/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
make[4]: *** Waiting for unfinished jobs....
/usr/bin/ld: CMakeFiles/caffe.bin.dir/caffe.cpp.o: in function `test()':
caffe.cpp:(.text+0x1165): undefined reference to `cudaGetDeviceProperties_v2'
/usr/bin/ld: CMakeFiles/caffe.bin.dir/caffe.cpp.o: in function `train()':
caffe.cpp:(.text+0x230f): undefined reference to `cudaGetDeviceProperties_v2'
/usr/bin/ld: ../lib/libcaffe.so.1.0.0: undefined reference to `cudaGetDeviceProperties_v2'collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
make[5]: *** [tools/CMakeFiles/caffe.bin.dir/build.make:118: tools/caffe] Error 1
make[5]: *** [tools/CMakeFiles/extract_features.dir/build.make:118: tools/extract_features] Error 1
make[4]: *** [CMakeFiles/Makefile2:651: tools/CMakeFiles/caffe.bin.dir/all] Error 2
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]: *** [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/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]: *** [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[3]: *** [Makefile:130: all] Error 2
make[2]: *** [CMakeFiles/openpose_lib.dir/build.make:112: caffe/src/openpose_lib-stamp/openpose_lib-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/openpose_lib.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
I gauss it is the cuda12 issue
I also met this preblem. I haven't found the solution yet.
undefined reference to `cudaGetDeviceProperties_v2'
collect2: error: ld returned 1 exit status
met this preblem too, any solotion?
Ensure you have CUDA 12.2 or newer active. Does it work then?