OpenCV build script

Sorry about that. I edited my above post to correct the code section. I’m about to rerun the build.

Edit: before I reran the build I wanted to make sure the information that I had was correct. So when I first checked the build information I noticed that python was preinstalled on my nano (I’m going to assume that it maybe comes with the Jetpack 4.3 image that I wrote to the SD card. note: I did not use the SDK manager) so I used the python command getBuildInformation of the opencv build. I did this in python2 and python3. In 2 it said the build version was 4.1.1 and that none of the cuda modules were installed. I then check in 3 and it spat out a bunch of errors about not having numpy installed. So I just assumed that it was 4.1.1 installed. Not trusting python at this point I created a c++ executable to read the build version and build information of opencv and it says 4.2.0 installed with all the CUDA modules there.

To put a long story short it seems I have wasted your time a bit. It seems your script ran perfectly and that it was just python giving me false information. Sorry for all the fuss and thank you very much for helping me.

1 Like

No worries. It possible it failed building the python module during make install, and that’s why the version reported by python wasn’t 4.2.0.

You may want to try the no-python branch anyway just to ensure the make install wasn’t interrupted. And you didn’t waste any time. It’s useful to have a no python version anyways.

Thanks for the help. I will definitely use the no-python branch. I am currently running my Nano off a temporary SD while I wait for a new one to be delivered. When I get the new one I will use the no-python build. Thanks again for all the help.

Yw. I will keep the branch up to date so when 4.3 is released you’ll be able to upgrade. All this being said, if you’re interested in performance, there are better options to OpenCV on Tegra. It wasn’t really designed for the architecture while Nvidia has solutions that are tuned for it.

When I use the build script, it fails because it can’t find sys/videoio.h.
I see that this is an ongoing issue for some people, but I can not locate a definitive fix. I’m trying to build 4.1.1 for a robot project and I’m stuck. Please advise.

Are you using my script to build? Please try re-running it like:

./build_opencv.sh 4.1.1

(or whatever version you want).

If the problem persists, please attach copies of the following files here:

/tmp/build_opencv/opencv/build/configure.log
/tmp/build_opencv/opencv/build/build.log

M,

Here are the files. Thank you for taking that time to help.

Thomas.

CMakeOutput.log (59.7 KB)

CMakeError.log (54.1 KB)

Thomas,
Yw. Can you post the configure.log and build.log (the regular ones, not the CMake*.log)? The configure.log will give me a better idea about your system configuration so I can attempt to replicate.

My understanding based on googling the issue is that deleting the build folder and recreating it should fix it. (in your case, /tmp/opencv_build) That’s why I suggested re-running the script. When it asks you if you want to delete that folder, say yes, and it should try and re-download everything before building again. The header in question is actually part of opencv so it should be included.

Michael,

I have tried/rebuilt 3 times using the Nivida script, 3 times with the Jetsonhacks scripts, twice with JEB script and manually tried to build through by the script here:

http://www.bojankomazec.com/2019/12/installing-opencv-4-on-nvidia-jetson.html
.

I get the same results on all of them. I’ve seen the postings where people say they’ve started from scratch and all of a sudden it works, but there are always other things they’ve done and no one seems to understand why this keeps happening,
and as far as I can tell, it has be a problem for people for years. I have attached the build and configure log. There is nothing in the build log, but the configure log shows what happened. I’m not even sure where videoio.h comes from, otherwise I’d
just install it. Thanks again.

Thomas.

build.log (61 Bytes)

configure.log (27.5 KB)

From the log, the configure step failed.
What was your cmake command ? This would help.

I ran the Nvidia OpenCV build script as follows: