Summary: | media-libs/opencv-4.5.1 USE=cuda: with gcc-10.3.0: /usr/lib/gcc/x86_64-pc-linux-gnu/10.3.0/include/g++-v10/chrono:428:27: internal compiler error: Segmentation fault | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Bernd <waebbl-gentoo> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | amynka, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info-opencv-4.5.1.txt
opencv-4.5.1:20210411-180924-gcc-10.3.0.log opencv-4.5.1:20210412-081952-gcc-10.2.0.log.xz |
Description
Bernd
2021-04-12 16:49:41 UTC
Created attachment 699471 [details]
emerge-info-opencv-4.5.1.txt
Output of emerge --info opencv
Created attachment 699474 [details]
opencv-4.5.1:20210411-180924-gcc-10.3.0.log
Build log using gcc-10.3.0
Created attachment 699477 [details]
opencv-4.5.1:20210412-081952-gcc-10.2.0.log.xz
Build log with gcc-10.2.0-r5, compressed due to size
Not sure, if this issue belongs to opencv maintainers or toolchain, so I leave the assignee open for more experienced bug-wranglers. Before downgrading gcc, I tried rebuilding glibc and binutils with gcc-10.3.0, but the issue stayed the same. Could you follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide? Can you rebuild nvcc with the new GCC first? (In reply to Sam James from comment #5) > Could you follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide? Yeah, please at least extract preprocessed file and make sure it still crashes gcc. If I understand your log correctly the command is [30/1387] /usr/bin/x86_64-pc-linux-gnu-g++ -DCERES_FOUND=0 -DGLOG_NO_ABBREVIATED_SEVERITIES -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/include/opencv -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/sfm/src/libmv_light -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/sfm/include -Imodules/sfm -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/cudev/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/core/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/cudaarithm/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/flann/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/imgproc/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/ml/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/features2d/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/imgcodecs/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/calib3d/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/shape/include -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/xfeatures2d/include -isystem . -isystem /usr/include/gdal -isystem /usr/include/openblas -isystem /usr/include/eigen3 -O2 -pipe -march=bdver2 -frecord-gcc-switches -fstack-protector-strong -fstack-check -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Winit-self -Wpointer-arith -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mf16c -mfma -mavx -fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -Wno-undef -Wno-shadow -Wno-sign-compare -Wno-missing-declarations -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-function -Wno-suggest-override -Wno-suggest-override -Wno-class-memaccess -Wno-deprecated-copy -fPIC -std=c++11 -MD -MT modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o -MF modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o.d -o modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o -c /var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc (In reply to Sam James from comment #6) > Can you rebuild nvcc with the new GCC first? Isn't nvcc provided as binary in nvidia-cuda-toolkit? I can of course try and re-emerge the package first. (In reply to Sergei Trofimovich from comment #7) > (In reply to Sam James from comment #5) > > Could you follow https://wiki.gentoo.org/wiki/Gcc-ICE-reporting-guide? > > Yeah, please at least extract preprocessed file and make sure it still > crashes gcc. > > If I understand your log correctly the command is > > [30/1387] /usr/bin/x86_64-pc-linux-gnu-g++ -DCERES_FOUND=0 > -DGLOG_NO_ABBREVIATED_SEVERITIES -D_USE_MATH_DEFINES -D__OPENCV_BUILD=1 > -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/include/opencv > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > sfm/src/libmv_light > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > sfm/include -Imodules/sfm > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > cudev/include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/core/ > include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > cudaarithm/include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/flann/ > include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/imgproc/ > include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/ml/ > include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/ > features2d/include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/ > imgcodecs/include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv-4.5.1/modules/calib3d/ > include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > shape/include > -I/var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > xfeatures2d/include -isystem . -isystem /usr/include/gdal -isystem > /usr/include/openblas -isystem /usr/include/eigen3 -O2 -pipe -march=bdver2 > -frecord-gcc-switches -fstack-protector-strong -fstack-check -fsigned-char > -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address > -Werror=sequence-point -Wformat -Werror=format-security -Winit-self > -Wpointer-arith -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor > -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow > -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer > -ffunction-sections -fdata-sections -msse -msse2 -msse3 -mssse3 -msse4.1 > -mpopcnt -msse4.2 -mf16c -mfma -mavx -fvisibility=hidden > -fvisibility-inlines-hidden -fopenmp -Wno-undef -Wno-shadow > -Wno-sign-compare -Wno-missing-declarations -Wno-unused-but-set-variable > -Wno-unused-parameter -Wno-unused-function -Wno-suggest-override > -Wno-suggest-override -Wno-class-memaccess -Wno-deprecated-copy -fPIC > -std=c++11 -MD -MT > modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental. > cc.o -MF > modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental. > cc.o.d -o > modules/sfm/src/libmv/libmv/multiview/CMakeFiles/multiview.dir/fundamental. > cc.o -c > /var/tmp/portage/media-libs/opencv-4.5.1/work/opencv_contrib-4.5.1/modules/ > sfm/src/libmv_light/libmv/multiview/fundamental.cc AFAICS it's file 29 which causes the ICE, as stated in my initial comment. The log shows no error after file 30. IMO it's stopping there, because of -j2 MAKEOPTS. I can try to verify this by using -j1, of course. Will follow the Gcc-ICE wiki page and try to get more meaningful results. Hmm... weird. Using -j1, the package builds just fine, although the error happened several times when using multiple cores to build, before I filed the bug. Closing the bug then. Didn't even have to rebuild nvcc. Just noticed I still used 10.2.0 for the test in comment #10. I verified, the package indeed fails at the file noted in the description comment #0 when build with -j1. Rebuilding nvcc is not possible, as it's a binary package, as noted by me in comment #8. However, I noticed from the pkg_postinst_check message, current cuda-11 versions in the tree only support up to gcc-10.2. This is probably the reason for the crash. Because I need cuda support for several apps, I'm masking 10.3.0 for now. Do you pan to extract preprocessed file or we should keep the bug closed? I think we should keep it closed for now, as nvidia-cuda-toolkit-11 is incompatible with gcc-10.3.0. Once it get's updated to support this version and the issue still remains, we can reopen it. |