Qengineering / Install-OpenCV-Jetson-Nano

OpenCV installation script with CUDA and cuDNN support
https://qengineering.eu/install-opencv-on-jetson-nano.html
BSD 3-Clause "New" or "Revised" License
137 stars 47 forks source link

E: Unable to locate package libdc1394-22-dev #24

Open AazainIrfan opened 3 months ago

AazainIrfan commented 3 months ago

When I run the script ./OpenCV-4-9-0.sh it throws an error after only seconds stating: E: Unable to locate package libdc1394-22-dev

I have tried to find solutions for this online such as installing libdc1394-dev. However, the issue persists preventing the execution of the script. Any ideas? I am using the Jetson Orin Nano

Qengineering commented 2 months ago

I've updated the script. libdc1394-22-dev is not supported in JetPack 6 (Ubuntu 22). Replaced it with libdc1394-dev. The same applies to libavresample-dev. It is being replaced by libswresample-dev.

AazainIrfan commented 2 months ago

Ah well now I am running into this issue which stops the script:

[ 22%] Processing OpenCL kernels (core) [ 22%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o [ 22%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat_nd.cu.o /home/azain/opencv/modules/core/src/cuda/gpu_mat.cu(67): warning #177-D: parameter "numBytes" was declared but never referenced

/home/azain/opencv/modules/core/src/cuda/gpu_mat.cu(77): warning #177-D: parameter "ptr" was declared but never referenced

/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 | function(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 | operator=(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’ CMake Error at cuda_compile_1_generated_gpu_mat_nd.cu.o.RELEASE.cmake:282 (message): Error generating file /home/azain/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat_nd.cu.o

make[2]: [modules/core/CMakeFiles/opencv_core.dir/build.make:84: modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat_nd.cu.o] Error 1 make[2]: Waiting for unfinished jobs.... /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’: 435 | function(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:435:145: note: ‘_ArgTypes’ /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’: 530 | operator=(_Functor&& f) | ^ /usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’ CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.RELEASE.cmake:282 (message): Error generating file /home/azain/opencv/build/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o

make[2]: [modules/core/CMakeFiles/opencv_core.dir/build.make:77: modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/cuda_compile_1_generated_gpu_mat.cu.o] Error 1 make[1]: [CMakeFiles/Makefile2:4198: modules/core/CMakeFiles/opencv_core.dir/all] Error 2 make[1]: * Waiting for unfinished jobs.... [ 22%] Linking CXX static library ../../../../../../lib/libopencv.sfm.multiview.a [ 22%] Built target opencv.sfm.multiview *make: [Makefile:166: all] Error 2**

Qengineering commented 2 months ago

Sorry to hear. Which Jetpack are you using? 5 of 6? I like to replicate your issue here at the office. Could you also test the script without the libdc1394-dev or libdc1394-22-dev? We need to isolate the source since the error file reveals only compiler issues without reference to the library at hand.

AazainIrfan commented 2 months ago

Jetpack 6 and I have tried a freshly flashed image many times only to receive this error which prevents the script from successfully running. I noticed there were a few extra errors while the script ran before this final error ended the script.

Qengineering commented 2 months ago

I googled your issue and it seems a known problem. https://forums.developer.nvidia.com/t/build-python-opencv2-with-cuda-support-for-jetpack-6-0/289016/3 https://github.com/NVlabs/instant-ngp/issues/119 I suggest trying the script mentioned in the first link. Could you be so kind as to let us know your findings? Other people may stubble on the same issue in the future.