Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 617654 - =media-libs/opencv-3.2.0 fails with sys-devel/gcc-6.3.0
Summary: =media-libs/opencv-3.2.0 fails with sys-devel/gcc-6.3.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-06 15:17 UTC by Branko Grubic
Modified: 2017-06-06 14:46 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
complete_build_log (opencv-3.2.0_gcc6.3.0_build.log,262.38 KB, text/x-log)
2017-05-06 15:17 UTC, Branko Grubic
Details
emerge_info (emerge_info,6.18 KB, text/plain)
2017-05-06 15:18 UTC, Branko Grubic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Branko Grubic 2017-05-06 15:17:47 UTC
Created attachment 471810 [details]
complete_build_log

I'm on ~amd64, I did upgrade sys-devel/gcc to 6.3.0 and I was doing rebuild of all stuff linked against libstdc++, opencv seems to fail, similar to #597912 


part of the error message (complete build log attached):

eamer-1.0" -isystem"/usr/include/glib-2.0" -isystem"/usr/lib64/glib-2.0/include" -isystem"/usr/include/gstreamer-1.0" -isystem"/usr/include/glib-2.0" -isystem"/usr/lib64/glib-2.0/include" -isystem"/usr/include/gstreamer-1.0" -isystem"/usr/include/glib-2.0" -isystem"/usr/lib64/glib-2.0/include" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/highgui/include" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/highgui/src" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build/modules/highgui" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/core/include" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/imgproc/include" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/imgcodecs/include" -I"/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/videoio/include" -O2 -pipe -march=native -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -Wno-comment -fdiagnostics-show-option -Wno-long-long -pthread -fno-omit-frame-pointer -mno-sse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -DCVAPI_EXPORTS -x c++-header -o /var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build/modules/highgui/precomp.hpp.gch/opencv_highgui_Gentoo.gch /var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build/modules/highgui/precomp.hpp
In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/bits/stl_algo.h:59:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/algorithm:62,
                 from /var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/core/include/opencv2/core/base.hpp:55,
                 from /var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/core/include/opencv2/core.hpp:54,
                 from /var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0/modules/highgui/include/opencv2/highgui.hpp:46,
                 from /var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build/modules/highgui/precomp.hpp:45:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
make[2]: *** [modules/highgui/CMakeFiles/pch_Generate_opencv_highgui.dir/build.make:64: modules/highgui/precomp.hpp.gch/opencv_highgui_Gentoo.gch] Error 1
make[2]: Leaving directory '/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build'
make[1]: *** [CMakeFiles/Makefile2:2141: modules/highgui/CMakeFiles/pch_Generate_opencv_highgui.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build'
make -f modules/core/CMakeFiles/opencv_core.dir/build.make modules/core/CMakeFiles/opencv_core.dir/build
make[2]: Entering directory '/var/tmp/portage/media-libs/opencv-3.2.0/work/opencv-3.2.0_build'




quad ~ # emerge -pqv '=media-libs/opencv-3.2.0::gentoo'
[ebuild   R   ] media-libs/opencv-3.2.0  USE="eigen ffmpeg gstreamer gtk jpeg opengl openmp pch png python qt5 threads tiff v4l -contrib -contrib_cvv -contrib_hdf -contrib_sfm -contrib_xfeatures2d -cuda -debug -examples -gdal -gflags -glog -gphoto2 -ieee1394 (-ipp) -java -jpeg2k -lapack -libav -opencl -openexr -tesseract -testprograms -vaapi -vtk -webp -xine" PYTHON_TARGETS="python2_7 python3_4 -python3_5"
Comment 1 Branko Grubic 2017-05-06 15:18:40 UTC
Created attachment 471812 [details]
emerge_info
Comment 2 Branko Grubic 2017-05-07 13:17:11 UTC
Disabling precompiled headers (USE="-pch") allows it to build for me. I found it on url I added to this bug report.
Comment 3 Dennis Schridde 2017-05-13 16:15:32 UTC
Could you please change the subject to include the error message? i.e. "/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/include/g++-v6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory"
Comment 4 Thomas Capricelli 2017-05-21 09:24:50 UTC
same problem here, using gcc 6.3.0 as well.
Comment 5 Dennis Schridde 2017-05-21 09:58:03 UTC
Fix for OpenCV 3.2: https://github.com/opencv/opencv/pull/6541
Backport for OpenCV 2.4: https://github.com/opencv/opencv/pull/6545
Comment 6 Amy Liffey gentoo-dev 2017-06-06 14:46:07 UTC
commit 4f5b990bd068f98184e7ecfabf461a33275569c5
Author: Amy Liffey <amynka@gentoo.org>
Date:   Tue Jun 6 16:42:31 2017 +0200

    media-libs/opencv: disable pch for gcc-6.0 bug #617654

Should be disabled now.

Thank you !