建立Hello ZED示例时出错

时间:2019-06-23 02:06:47

标签: camera cuda installation computer-vision nvidia

我正在按照here提供的说明进行操作(有关详细说明,请单击here)以在我的Linux(Ubuntu 16.04)计算机上构建zed-examples。首先,我创建了一个构建文件,然后运行了cmake ..命令。项目生成成功:

-- Configuring done
-- Generating done
-- Build files have been written to: path/to/your/project/ZED_Tutorial_1/build

但是,运行make命令会产生以下错误:

[ 50%] Linking CXX executable ZED_Tutorial_1
/usr/bin/ld: warning: libnvidia-fatbinaryloader.so.418.67, needed by /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so, not found (try using -rpath or -rpath-link)
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Finish'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_symbol_name'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_string_at_offset'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_GetCandidate'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_Delete'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf_size'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_section_contents'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Load_Host_Object'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Delete'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Add_Cubin'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_file_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_PickCandidate'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_section_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `gpuInfoRunsOn'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_GetIdentifier'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_symbol_name'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Free_Fatbinary'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `gpucompSetLogLine'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_SetBinary'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_shnum'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_section_name'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Get_FatBinary_From_Object'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_symbol_shndx'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_file_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_section_name'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_SetPtxasOptions'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_SetTargetSM'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_CreateHandle'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Next_Library_Member'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_typed_section_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Start'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Free_Host_Object'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_string_at_offset'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf_end'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_HasDebug'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_shnum'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_named_section_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_symbol_shndx'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf32_section_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf_is_64bit'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_GetPtxasOptions'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Start_Reading_Library'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_typed_section_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elf64_named_section_header'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_Compile'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `gpucompRestoreLogLine'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `fatBinaryCtl_SetPolicy'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcuda.so: undefined reference to `elfLink_Finish_Reading_Library'
collect2: error: ld returned 1 exit status
CMakeFiles/ZED_Tutorial_1.dir/build.make:116: recipe for target 'ZED_Tutorial_1' failed
make[2]: *** [ZED_Tutorial_1] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/ZED_Tutorial_1.dir/all' failed
make[1]: *** [CMakeFiles/ZED_Tutorial_1.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

它找不到应该位于的libnvidia-fatbinaryloader.so.418.67,建议我使用-rpath-rpath-link将其指向正确的目录。我该如何解决这个问题?

我已经安装了Cuda 10.0Zed SDK 2.8.2

编辑

dpkg -l | grep -i nvidia命令显示已安装418.67。但是/usr/lib/x86_64-linux-gnu/libnvidia-fatbinaryloader.so.418.67目录不存在。

csgurel@ThinkPad-T470:~$ dpkg -l | grep -i nvidia
ii  bbswitch-dkms                                   0.8-3ubuntu1                                                amd64        Interface for toggling the power on NVIDIA Optimus video cards
ii  cuda-nsight-compute-10-0                        10.0.130-1                                                  amd64        NVIDIA Nsight Compute
ii  cuda-nsight-compute-10-1                        10.1.168-1                                                  amd64        NVIDIA Nsight Compute
ii  cuda-nsight-systems-10-1                        10.1.168-1                                                  amd64        NVIDIA Nsight Systems
ii  cuda-nvtx-10-0                                  10.0.130-1                                                  amd64        NVIDIA Tools Extension
ii  cuda-nvtx-10-1                                  10.1.168-1                                                  amd64        NVIDIA Tools Extension
ii  libcuda1-418                                    418.67-0ubuntu1                                             amd64        NVIDIA CUDA runtime library
ii  nvidia-418                                      418.67-0ubuntu1                                             amd64        NVIDIA binary driver - version 418.67
ii  nvidia-418-dev                                  418.67-0ubuntu1                                             amd64        NVIDIA binary Xorg driver development files
ii  nvidia-modprobe                                 418.67-0ubuntu1                                             amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-opencl-icd-418                           418.67-0ubuntu1                                             amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                                    0.8.2                                                       amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                                 418.67-0ubuntu1                                             amd64        Tool for configuring the NVIDIA graphics driver

0 个答案:

没有答案