| Summary: | dev-util/nvidia-cuda-toolkit: media-libs/opencv-3.1.0-r2 fails to compile due to >=gcc-4.9 (CUDA) | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Sven Müller <musv> |
| Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | amynka, dilfridge, kde, silvio.gerli, yamadharma |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: |
emerge --info
build.log |
||
Created attachment 428236 [details]
build.log
In file included from /opt/cuda/include/cuda_runtime.h:59:0,
from <command-line>:0:
/opt/cuda/include/host_config.h:82:2: error: #error -- unsupported GNU version! gcc 4.9 and up are not supported!
#error -- unsupported GNU version! gcc 4.9 and up are not supported!
^
Interesting.
Thanks for this hint. Found in nvidia-cuda-toolkit-6.5.14.ebuild:
src_prepare() {
local cuda_supported_gcc
cuda_supported_gcc="4.7 4.8"
sed \
-e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \
"${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die
}
If use a Nvidia Quadro FX3800 graphics card. It's supported by the nvidia legacy driver 340.xx. That's also the constraint for the nvidia-cuda-toolkit version (limited to 6.5.x).
I just tried it without cuda support. Opencv compiles fine.
How do we want to treat this problem now? The best thing would be, if nvidia supports >=gcc-4.9 for compiling the nvidia-cuda-toolkit. But I guess, they won't backport any patches to the legacy versions.
I confirm, as for r1 versions it is necessary to put: =media-libs/opencv-3.1.0-r1 -cuda =media-libs/opencv-3.1.0-r2 -cuda in /etc/portage/package.use and than it compiles.. I suggest adding a pkg_pretend() check for this and failing on GCC 5 and above. Is this ok with all parties? Daniel: The check should be aware of the older CUDA versions. I would conjecture, >=nvidia-cuda-toolkit-7 may compile with gcc-5 and therefore, opencv should compile with >= gcc-4.9 too. Fixed in opencv-2.4.12-r1 and opencv-3.1.0-r4. |
Created attachment 428234 [details] emerge --info Generating moc_singlefilterview.cpp /usr/lib64/qt5/bin/moc -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build/modules/cvv -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build -I/usr/include/eigen3 -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtWidgets -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv/src -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/cudev/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/core/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/flann/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/imgproc/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/ml/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/imgcodecs/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/videoio/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/highgui/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/features2d/include -I/usr/include -I/usr/include -DCVAPI_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -D__OPENCV_BUILD=1 -o /var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build/modules/cvv/moc_singlefilterview.cpp /var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv/src/view/singlefilterview.hpp Generating moc_translationsmatchview.cpp /usr/lib64/qt5/bin/moc -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build/modules/cvv -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build -I/usr/include/eigen3 -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtWidgets -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv/src -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/cudev/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/core/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/flann/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/imgproc/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/ml/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/imgcodecs/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/videoio/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/highgui/include -I/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0/modules/features2d/include -I/usr/include -I/usr/include -DCVAPI_EXPORTS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_WIDGETS_LIB -D__OPENCV_BUILD=1 -o /var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build/modules/cvv/moc_translationsmatchview.cpp /var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv_contrib-3.1.0/modules/cvv/src/view/translationsmatchview.hpp make[2]: Leaving directory '/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build' [ 0%] Built target opencv_cvv_automoc make[1]: Leaving directory '/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build' Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 * ERROR: media-libs/opencv-3.1.0-r2::gentoo failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=media-libs/opencv-3.1.0-r2::gentoo'`, * the complete build log and the output of `emerge -pqv '=media-libs/opencv-3.1.0-r2::gentoo'`. * The complete build log is located at '/var/tmp/portage/media-libs/opencv-3.1.0-r2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/media-libs/opencv-3.1.0-r2/temp/environment'. * Working directory: '/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0_build' * S: '/var/tmp/portage/media-libs/opencv-3.1.0-r2/work/opencv-3.1.0' !!! When you file a bug report, please include the following information: GENTOO_VM= CLASSPATH="" JAVA_HOME="/etc/java-config-2/current-system-vm" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info =opencv-3.1.0 Maybe it's related to gcc-5.3. But I don't have any clue, why it fails. Didn't discover an usable error message.