Comments (7)
I ran the script in a fresh docker container and it finished without any errors. cv2.__version__
returns "4.2.0".
So issue was my messed up environment (the outdated ffmpeg was a dependency from the OpenCV 3.2 that I built manually).
Again, thanks for your support and thanks for the script.
from nano_build_opencv.
Thanks for the report. I'm trying to replicate now.
from nano_build_opencv.
I ran the build yesterday on Nano an Xavier to test without a problem on the same JetPack. The most common cause of these kind of failures is running out of memory during build. Couple questions:
- Are you running with the GUI enabled?
- Do you have a swapfile mounted?
from nano_build_opencv.
Thanks for looking into this. I have GUI disabled and 8GB swapfile mounted. After system startup there is 0.3GB out 4.0GB RAM used and total swap is 10GB.
I ran bash build_opencv.sh
immediately after a reboot and still see the same error.
Note: currently OpenCV 3.2.0 is installed from a source build (not using your script).
from nano_build_opencv.
I was able to complete the builds on Xavier and Nano yesterday with only zram swap and the GUI off. If you see the same error at the same point in the middle of the build it's probably not memory related. Most failures i've seen happen at the end with the python bindings.
These errors would seem to be ffmpeg related. Do you have ffmpeg installed, and if so, what versions?
from nano_build_opencv.
yes, the error seems to be related to some dependencies...
My ffmpeg version:
ffmpeg version 2.0.7 Copyright (c) 2000-2015 the FFmpeg developers
built on Mar 13 2020 10:05:08 with gcc 7 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04)
configuration: --disable-doc
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
from nano_build_opencv.
So it looks like your version is not the same as mine. I'm not sure how that's happening.
$ ffmpeg --version
ffmpeg version 3.4.6-0ubuntu0.18.04.1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 7 (Ubuntu/Linaro 7.3.0-16ubuntu3)
configuration: --prefix=/usr --extra-version=0ubuntu0.18.04.1 --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librubberband --enable-librsvg --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-omx --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libopencv --enable-libx264 --enable-shared
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libavresample 3. 7. 0 / 3. 7. 0
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
libpostproc 54. 7.100 / 54. 7.100
Your seems to be significantly older, and was built using different config flags. That shouldn't happen on JetPack 4.3 with the version in Canonical's repos (ports.ubuntu.com). Did you build ffmpeg yourself, or do you have some custom version installed? There is a custom version of FFMPEG supplied by a third party for Tegra, but it's untested with OpenCV as far as I am aware.
The easiest solution is probably to uninstall whatever version you have or specify -D WITH_FFMPEG=OFF
as a cmake flag (you can add this around line 121, with the rest of the flags). If you do need ffmpeg support, a version that works* is in the apt repos (sudo apt install libavcodec-dev
)
*I would advise to use gstreamer for any video decoding at the moment since ffmpeg currently lacks hw decode on Tegra (however Nvidia has announced plans to include it in the next JetPack release).
from nano_build_opencv.
Related Issues (20)
- this is support opencv in c++? HOT 1
- Build OpenCV with CUDA on Jetson AGX Xavier HOT 4
- Orin (Ubuntu 20.04) Missing v4l2ucp HOT 1
- Building OpenCV for Orin System HOT 2
- Script not working with Python 3.7.5 HOT 1
- Undefined reference to glXGetProcAddressARB() HOT 1
- Logging is preventing multiple jobs HOT 2
- Not an Issue but you saved my life. Thank you. Drop a star all. HOT 1
- In jtop still cuda support No HOT 3
- Unsupported gpu architecture 'compute_87' HOT 1
- Cannot generate make file - "Configuration Incomplete" HOT 2
- jetson nano errors to install it HOT 5
- Can not install it in docker HOT 1
- After install, opencv version displayed by 'jtop' and python script by 'cv2.getBuildInformation()' doesn't match. HOT 1
- fatal: unable to access 'https://github.com/opencv/opencv.git/': Failed to connect to github.com port 443: θΏζ₯θΆ ζΆ HOT 1
- Makefile:162: recipe for target 'all' failed
- Failed to build : Package 'libavresample-dev' has no installation candidate
- Trying to build into Docker Image - JetsonNX
- DO NOT USE IT, TOTALLY BREAKS SYSTEM
- Error found during Building the Image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nano_build_opencv.