сделать ошибку при сборке Hello ZED - PullRequest
0 голосов
/ 23 июня 2019

Я следовал приведенным инструкциям здесь (для подробных инструкций нажмите здесь ), чтобы собрать zed-examples на моем компьютере с Linux (Ubuntu 16.04). Сначала я создал файл сборки, а затем выполнил команду 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.0 и Zed SDK 2.8.2 .

EDIT

Команда 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
...