Issue 1:
[ 20%] Built target opencv_test_optflow_pch_dephelp

[ 20%] Generating precomp.hpp

[ 20%] Generating precomp.hpp.gch/opencv_highgui_RELEASE.gch

[ 20%] Linking CXX static library ../../lib/libopencv_stitching_pch_dephelp.a

[ 20%] Built target opencv_stitching_pch_dephelp

[ 20%] Generating precomp.hpp

[ 20%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch

In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,

from /usr/include/c++/6/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++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory

#include_next <stdlib.h>

^

compilation terminated.

modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: recipe for target 'modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch' failed

make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1

CMakeFiles/Makefile2:2014: recipe for target 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all' failed

make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2

make[1]: *** Waiting for unfinished jobs....

[ 20%] Linking CXX static library ../../lib/libopencv_test_stitching_pch_dephelp.a

[ 20%] Built target opencv_test_stitching_pch_dephelp

[ 20%] Linking CXX static library ../../lib/libopencv_perf_stitching_pch_dephelp.a

[ 20%] Built target opencv_perf_stitching_pch_dephelp

[ 20%] Built target pch_Generate_opencv_highgui

Makefile:160: recipe for target 'all' failed

make: *** [all] Error 2

Has you can see i hav a trouble with trying to compile.

Someone can help me?

thanks to anyone can give me a way to compil all 💃

Issue 2:
I get the next error compiling Opencv v2.4.12 in Arch linux https://aur.archlinux.org/packages/opencv2/:

[ 0%] Built target opencv_core_pch_dephelp

[ 0%] Generating precomp.hpp.gch/opencv_core_Release.gch

cc1plus: aviso: la opción de línea de órdenes ‘-Wmissing-prototypes’ es válida para C/ObjC pero no para C++

cc1plus: aviso: la opción de línea de órdenes ‘-Wstrict-prototypes’ es válida para C/ObjC pero no para C++

In file included from /usr/include/c++/6.1.1/bits/stl_algo.h:59:0,

from /usr/include/c++/6.1.1/algorithm:62,

from /tmp/packerbuild-1001/opencv2/opencv2/src/opencv-2.4.12.3/modules/core/include/opencv2/core/core.hpp:53,

from /tmp/packerbuild-1001/opencv2/opencv2/src/opencv-2.4.12.3/modules/core/precomp.hpp:48:

/usr/include/c++/6.1.1/cstdlib:75:25: error fatal: stdlib.h: No existe el fichero o el directorio

include_next <stdlib.h>

^

compilación terminada.

modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: fallo en las instrucciones para el objetivo 'modules/core/precomp.hpp.gch/opencv_core_Release.gch'

make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_Release.gch] Error 1

CMakeFiles/Makefile2:862: fallo en las instrucciones para el objetivo 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all'

make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2

Makefile:160: fallo en las instrucciones para el objetivo 'all'

make: *** [all] Error 2