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
142 stars 46 forks source link

OpenCV 4.5.2 error at 95%. Is this considered an issue? #1

Closed DWSuryo closed 3 years ago

DWSuryo commented 3 years ago

I encountered issue at 95% when running the .sh file for 4.5.2 version. Here's the issue I got: Note opencv install (250621).txt

is this normal?

Qengineering commented 3 years ago

Dear @DWSuryo,

In file included from /home/lunar/opencv_contrib/modules/tracking/src/gtrTracker.hpp:47:0,
                 from /home/lunar/opencv_contrib/modules/tracking/src/gtrTracker.cpp:42:
/home/lunar/opencv/modules/video/include/opencv2/video/tracking.hpp:713:20: error: redefinition of ‘class cv::Tracker’
 class CV_EXPORTS_W Tracker

This behavior is not normal. It hints at two files declaring the same variable differently. The question is now, how does you end up with these two files? I see that one is located at /home/lunar/opencv and the other in /home/lunar/opencv_contrib. I think you have somehow different versions of opencv and opencv_contrib. Please make sure they are both of the same relaese. I've modified the script file a bit. Now all opencv directories will removed before a new build is initiated. Hopefully, it will prevent version mismatches.

DWSuryo commented 3 years ago

I'm back. So I deleted manually opencv related folders, then i used your latest shell file. Here's the terminal message: OpenCV 452 error2.txt

Looks like i had trouble while doing cmake commands. Here's the file: CMakeError.log CMakeOutput.log I think this one is not normal. Are there solutions?

Qengineering commented 3 years ago

Dear @DWSuryo,

I'm not sure how you done it, but your system is serious corrupted.

Looking at your OpenCV 452 error2.txt, you can see it tries to load '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0', which is normally found on a PC running a x86_64 core, not the ARM core found on the Jetson Nano.

The script installs libgtk-3-dev. However, it should be the ARM version, located at /usr/lib/aarch64-linux-gnu. Simply deleting the '/usr/lib/x86_64-linux-gnu/ folder will not do. You have all kinds of references to the location, which will crash you system as soon as you call them.

Personally, I would flash a new and clean SD card with the latest Jetpack and install this fresh version.

DWSuryo commented 3 years ago

Sorry late reply, I've flashed the image. Now I've done it properly. Thank you for updated instructions