Ask Your Question
0

Error compiling openCV-3.0.0 in Raspberry Pi Zero

asked 2017-08-20 17:34:29 -0600

mirrijakys gravatar image

Dear all,

This is my first post in this forum, so I hope I am doing it correctly...

I am trying to install OpenCV-3.0.0 in a Raspberry Pi Zero following the instructions from pyimageresearch.com http://www.pyimagesearch.com/2015/12/...

I have followed all the steps but the virtual environment, and when the make process is about 10% I get the following error:

             from /home/pi/opencv-3.0.0/build/modules/core/precomp.hpp:49:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory
 #include_next <math.h>
                       ^
compilation terminated.

Any ideas why?

I am using gcc and g++ 6.3.0

Thanks in advance. I really appreciate your help.

Marcos

edit retag flag offensive close merge delete

Comments

  • please use recent 3.3, not 3.0
  • try to disable precompiled headers
berak gravatar imageberak ( 2017-08-21 02:15:10 -0600 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2017-12-11 03:08:26 -0600

Hi,

Have you try with -D ENABLE_PRECOMPILED_HEADERS=OFF flag ?

The cmake command with this flag will prevent this error.

Try to copy and paste this command to your terminal. It should work cmake -D CMAKE_BUILD_TYPE=RELEASE \     -D CMAKE_INSTALL_PREFIX=/usr/local \     -D INSTALL_C_EXAMPLES=ON\     -D INSTALL_PYTHON_EXAMPLES=ON\ -D ENABLE_PRECOMPILED_HEADERS=OFF \     -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.0.0/modules \     -D BUILD_EXAMPLES=ON..

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-08-20 17:34:29 -0600

Seen: 4,520 times

Last updated: Aug 20 '17