Skip to content

Setting lower gcc version for cuda #8

Description

@kmatzen

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?

Activity

  1. zheng-xq commented on Nov 9, 2015

    @zheng-xq
    Contributor

    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.

  2. zheng-xq commented on Nov 9, 2015

    @zheng-xq
    Contributor

    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.

    https://github.com/tensorflow/tensorflow/blob/master/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc

    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')

  3. jontis commented on Dec 1, 2015

    @jontis

    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.

    https://www.udacity.com/wiki/cs344/troubleshoot-gcc47

  4. jontis commented on Dec 1, 2015

    @jontis
  5. added 2 commits that reference this issue on Mar 9, 2016
  6. added a commit that references this issue on Mar 30, 2017
  7. 27 remaining items

  8. added 7 commits that reference this issue on Apr 9, 2025
  9. added 2 commits that reference this issue on Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions