Repository navigation
Setting lower gcc version for cuda #8
Description
Activity
Could you try the docker-based installation for now? It should have the correct gcc version.
http://tensorflow.org/get_started/os_setup.md#docker-based_installation
It is possible to modify the lower-level scripts to use a different gcc. But you will need to modify a few places in the source code to make that happen.
In case you have any trouble with the docker flow, this is the place you can modify to use a different compiler with Cuda, although we don't currently have a more user-friendly way of doing that.
CPU_COMPILER = ('/usr/bin/gcc')
NVCC_PATH = CURRENT_DIR + '/../../../cuda/bin/nvcc'
GCC_HOST_COMPILER_PATH = ('/usr/bin/gcc')
LLVM_HOST_COMPILER_PATH = ('/usr/bin/gcc')I changed the required gcc version in CUDA before installing so I could use my system version.
Seems to have worked. There are rumors about possible problems but I've seen none so far.Here are some other options for you:
https://stackoverflow.com/questions/6622454/cuda-incompatible-with-my-gcc-version- added 4 commits that reference this issue
on Jan 27, 2017 - added a commit that references this issue
on Mar 30, 2017 27 remaining items
- added 7 commits that reference this issue
on Apr 9, 2025 - added 5 commits that reference this issue
on Jul 28, 2025 - added a commit that references this issue
on Nov 26, 2025
gcc 4.10 and up are not supported for the required cuda toolkit. How can I specify a different version of gcc to bazel? I tried setting a new version with --compiler, but it reported that no toolchain was found. Do I need to provide a CROSSTOOL file or is there an easier way?