OpenCV Linux Installation make error

Source: Internet
Author: User
Tags yocto

The following error occurred while executing cmake after executing

1[6%] generating precomp.hpp.gch/OPENCV_CORE_RELEASE.GCH2In file included from/usr/include/c++/6/bits/stl_algo.h: -:0,3                   from/usr/include/c++/6/algorithm: +,4                   from/opt/opencv/opencv-3.1.0/modules/core/include/opencv2/core/Base. HPP: -,5                   from/opt/opencv/opencv-3.1.0/MODULES/CORE/INCLUDE/OPENCV2/CORE.HPP: Wu,6                   from/opt/opencv/opencv-3.1.0/MODULES/CORE/INCLUDE/OPENCV2/CORE/UTILITY.HPP: the,7                   from/OPT/OPENCV/BUILD/MODULES/CORE/PRECOMP.HPP: the:8/usr/include/c++/6/cstdlib: the: -: Fatal error:stdlib.h: No file or directory9#include_next <stdlib.h>Ten^ One compilation terminated. AModules/core/cmakefiles/pch_generate_opencv_core.dir/build.make: +: recipe forTarget'MODULES/CORE/PRECOMP.HPP.GCH/OPENCV_CORE_RELEASE.GCH'failed -make[2]: * * * [MODULES/CORE/PRECOMP.HPP.GCH/OPENCV_CORE_RELEASE.GCH] Error1 -Cmakefiles/makefile2:1178: recipe forTarget'Modules/core/cmakefiles/pch_generate_opencv_core.dir/all'failed themake[1]: * * * [Modules/core/cmakefiles/pch_generate_opencv_core.dir/all] Error2 -Makefile: the: recipe forTarget' All'failed -Make: * * * [ALL] Error2

This is because GCC6 has been stdlib.h included in the libstdc++ for better optimization, C Library's header file stdlib.h use include_next, and Include_ Next is very sensitive to the wrong system header file path.

The recommended fix is not to use the include path as the system directory, but rather to include the include directory in a standard way

Translated from https://bugs.webkit.org/show_bug.cgi?id=161697

Original Description:

Trying to build webkitgtk+ with GCC6I got Thiserror:in file included from/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/sysroots/qemux86/usr/include/c++/6.2.0/ext/string_conversions.h: A:0,                  from/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/sysroots/qemux86/usr/include/c++/6.2.0/bits/basic_string.h:5402,                  from/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/sysroots/qemux86/usr/include/c++/6.2.0/string: the,                  from/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/work/i586-oe-linux/webkitgtk/2.12.5-r0/webkitgtk-2.12.5/source/thirdparty/angle/src/common/debug.h: -,                  from/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/work/i586-oe-linux/webkitgtk/2.12.5-r0/webkitgtk-2.12.5/source/thirdparty/angle/src/common/mathutil.h: A,                  from/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/work/i586-oe-linux/webkitgtk/2.12.5-r0/webkitgtk-2.12.5/source/thirdparty/angle/src/common/mathutil.cpp:9:/home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/qemux86- -/tmp-glibc/sysroots/qemux86/usr/include/c++/6.2.0/cstdlib: the: -: Fatal error:stdlib.h:no Such file or directory #include_next<stdlib.h>The issue seems to being that GCC6have now introduced stdlib.hinchLibstdc++ forBetter compliance and its including the C library stdlib.husingInclude_next which isSensitive to order of system header include paths. See:https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129The recommended to fix This  isTo stop adding include directories asSystem ones (-isystem) and instead use the "standard" to include directories (-I) The OpenEmbedded project isCarrying ThisDownstream patch against webkitgtk+2.12With the above fix:http://git.openembedded.org/openembedded-core/tree/meta/recipes-sato/webkit/files/0001- Webkitmacros-append-to-i-and-not-to-isystem.patch

OpenCV Linux Installation make error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.