Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22148

Issue installing opencv on raspberry pi 4 with gnu compiler/default c++ library

$
0
0

First post don't eat me up. Just spend 8 hours trying to get this to work. I have raspberry pi 4 with raspbian (updated to latest release) and tried to get opencv. I have python 2.7, all the dependencies, etc. I am working in a virtual environment but have another version install on a non-virtual version and I got the same error.

(cv) pi@raspberrypi:~ $ cd ~/opencv-3.1.0/build(cv) pi@raspberrypi:~/opencv-3.1.0/build $ make[  2%] Built target libwebp[  4%] Built target libjasper[  7%] Built target IlmImf[  7%] Built target opencv_highgui_pch_dephelp[  7%] Built target pch_Generate_opencv_highgui[  8%] Built target opencv_core_pch_dephelp[  8%] Generating precomp.hpp.gch/opencv_core_RELEASE.gchIn file included from /usr/include/c++/8/bits/stl_algo.h:59,             from /usr/include/c++/8/algorithm:62,             from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/base.hpp:53,             from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core.hpp:54,             from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:52,             from /home/pi/opencv-3.1.0/build/modules/core/precomp.hpp:49:/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No such file or directory #include_next <stdlib.h>           ^~~~~~~~~~compilation terminated.make[2]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:64: modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1make[1]: *** [CMakeFiles/Makefile2:2336: modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2make: *** [Makefile:163: all] Error 2

cv is my virtual environment. The error occurs in a file in the default c++ directory that comes with the pi.The c++ standard library can't find the c standard library in the same folder. I've checked they are both there and both unedited. I am wondering how the gnu compiler only has access to part of the c++ directory. God bless your soul if you take the time to read and respond.


Viewing all articles
Browse latest Browse all 22148

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>