Summary: | dev-util/nvidia-cuda-toolkit-8.0.61 doesn't work with GCC >= 6 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Karl-Johan Karlsson <creideiki+gentoo-bugzilla> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jstein, plevine457 |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 582084 |
Description
Karl-Johan Karlsson
2017-06-19 21:23:18 UTC
(In reply to Karl-Johan Karlsson from comment #0) > Trying to use dev-util/nvidia-cuda-toolkit-8.0.61-r1::seden, which just > changes that 5 to a 6, results in hundreds of error from internal GCC header > files. Does adding '-std=c++98' to CXXFLAGS fix it? (In reply to Peter Levine from comment #1) > (In reply to Karl-Johan Karlsson from comment #0) > > Trying to use dev-util/nvidia-cuda-toolkit-8.0.61-r1::seden, which just > > changes that 5 to a 6, results in hundreds of error from internal GCC header > > files. > > Does adding '-std=c++98' to CXXFLAGS fix it? Actually, a better option would be to add -DCUDA_NVCC_FLAGS="-Xcompiler \"-std=c++98\"" to mycmakeargs in src_configure() in the ebuild itself. (In reply to Peter Levine from comment #2) > Actually, a better option would be to add > > -DCUDA_NVCC_FLAGS="-Xcompiler \"-std=c++98\"" > > to mycmakeargs in src_configure() in the ebuild itself. Doing that allows me to build media-libs/opensubdiv[cuda] with dev-util/nvidia-cuda-toolkit-8.0.61-r1::seden and sys-devel/gcc-6.3.0, and media-gfx/blender- 2.78a-r1 loads it at startup without complaining. > /opt/cuda/include/host_config.h:119:2: error:
> #error -- unsupported GNU version! gcc versions later than 5 are not supported!
The CUDA toolkit has many patched headers that only work for the compiler versions they tested, hence the message above. Using CUDA with other compiler versions is not supported. Please file this bug upstream if you must use GCC 6.
Support for GCC 6.x is included with CUDA 9, see https://devblogs.nvidia.com/parallelforall/cuda-9-features-revealed/ (In reply to Guilherme Amadio from comment #4) > The CUDA toolkit has many patched headers that only work for the compiler > versions they tested, hence the message above. Using CUDA with other > compiler versions is not supported. Please file this bug upstream if you > must use GCC 6. That is not what this bug is about, and I disagree that it is resolved and that it is a matter for upstream. At issue is the fact that the Gentoo package for dev-util/nvidia-cuda-toolkit-8.0.61 claims to run on >=sys-devel/gcc-4.7[cxx], when that is clearly false, since it refuses to run on >=sys-devel/gcc-6. (In reply to Karl-Johan Karlsson from comment #6) > (In reply to Guilherme Amadio from comment #4) > > The CUDA toolkit has many patched headers that only work for the compiler > > versions they tested, hence the message above. Using CUDA with other > > compiler versions is not supported. Please file this bug upstream if you > > must use GCC 6. > > That is not what this bug is about, and I disagree that it is resolved and > that it is a matter for upstream. > > At issue is the fact that the Gentoo package for > dev-util/nvidia-cuda-toolkit-8.0.61 claims to run on > >=sys-devel/gcc-4.7[cxx], when that is clearly false, since it refuses to > run on >=sys-devel/gcc-6. Fair enough. I've fixed the ebuilds by adding the missing dependency. Thanks for reporting. commit b22237d973413d2c5ce17f574269f3c3698da1b8 Author: Guilherme Amadio <amadio@gentoo.org> Date: Thu Jul 6 10:51:46 2017 +0200 dev-util/nvidia-cuda-toolkit: add missing dependency, bug #622256 Support for GCC 6 is only available starting with CUDA 9: https://devblogs.nvidia.com/parallelforall/cuda-9-features-revealed Package-Manager: Portage-2.3.6, Repoman-2.3.2 Please notice, however, that the ebuild does not (and cannot) prevent users from having the right compilers installed, but setting the system compiler to an unsupported version, in which case compiling code with CUDA support with the system compiler will not work. Please make sure to select a supported compiler with gcc-config by hand when needed, or use gcc-5.x.y instead of just gcc when compiling the specific packages. In your case, you can do $ CC=gcc-5.4.0 CXX=g++-5.4.0 emerge -av1 opensubdiv However, doing that, I just noticed that opensubdiv itself has problems, so please open a separate bug for it. I see the error below: nvcc fatal : Stray '"' character CMake Error at osd_static_gpu_generated_cudaKernel.cu.o.Gentoo.cmake:224 (message): Error generating /var/tmp/portage/media-libs/opensubdiv-3.1.1/work/opensubdiv-3.1.1_build/opensubdiv/CMakeFiles/osd_static_gpu.dir/osd/./osd_static_gpu_generated_cudaKernel.cu.o (In reply to Guilherme Amadio from comment #8) > However, doing that, I just noticed that opensubdiv itself has problems, so > please open a separate bug for it. > > I see the error below: > nvcc fatal : Stray '"' character That's bug 605958. |