-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors such as: Error when building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o #4
Comments
I'd be happy to help. It looks like it's failing at the building python2 module. One possible troubleshooting step is to try to build without python2 and see if that fixes it. here is a version with no Python2 support. Please let me know if it builds. Also, please note that building OpenCV requires a lot of memory. If you encounter failures at random points, you might consider running headless (ssh in and then |
Thanks, @mdegans. I will give this a try. I appreciate the heads up about running a swap file on my microSD card, as I just set that up today. I guess I will switch over to an external hard drive for swap. I was able to get OpenCV version 4.0 to build/install using this script from NVIDIA. |
That's a good solution, just make sure it's usb3 and fast. You can use the
That script works perfectly well, but please be aware that you will likely have similar issues if you try to build without enough free memory. It will probably work fine until it comes time to link everything together at the end, and then fail at some random thing, yielding no useful google results from the error message. |
The link is not found , Please update |
Please update link for no-python2/build, as I'm encountering this same issue. Thanks! |
Sorry for the necropost. I removed that becuase it wasn't the root of the problem. If you are having the same issue, please try building again with a swap file / partition. |
Thanks for providing this script, as I will need OpenCV for software I plan to run on my Jetson Nano board.
I have run the build script and it failed right near the end. [please see the output copied from the console]
This was run on a fresh Jetson Nano. The only thing I've done there before running the build script was to update/install a few packages (following this tutorial):
The final message in the output (where the fatal error occurs?) appears to be Python2 related. Is it necessary to build OpenCV for Python2 support? I don't plan to use Python2 (all my Python code is Python 3.6+), so maybe I can eliminate the parts that are building for Python2 support and maybe bypass this error as a result?
I apologize I'm unfamiliar with OpenCV builds, compilation error messages, etc. so I'm dependent on others to make sense of this for me. If I can help debug or troubleshoot this issue further from my end then please ask so I can help you help me.
The text was updated successfully, but these errors were encountered: