rocm-arch / tensorflow-rocm

tensorflow-rocm AUR package
17 stars 12 forks source link

`no such package '@local_config_cc//': Auto-Configuration Error: Cannot find gcc or CC (gcc-10)` #29

Closed CyberShadow closed 2 years ago

CyberShadow commented 3 years ago

Build is failing for me:

INFO: Repository local_config_cc instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:368:13: in <toplevel>
  /build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/cc_configure.bzl:184:16: in cc_configure
Repository rule cc_autoconf defined at:
  /build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/cc_configure.bzl:145:30: in <toplevel>
ERROR: An error occurred during the fetch of repository 'local_config_cc':
   Traceback (most recent call last):
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/cc_configure.bzl", line 127, column 33, in cc_autoconf_impl
        configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools)
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 340, column 23, in configure_unix_toolchain
        cc = _find_generic(repository_ctx, "gcc", "CC", overriden_tools)
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 310, column 32, in _find_generic
        auto_configure_fail(msg)
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 112, column 9, in auto_configure_fail
        fail("\n%sAuto-Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: 
Auto-Configuration Error: Cannot find gcc or CC (gcc-10); either correct your path or set the CC environment variable
ERROR: Error fetching repository: Traceback (most recent call last):
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/cc_configure.bzl", line 127, column 33, in cc_autoconf_impl
        configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools)
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 340, column 23, in configure_unix_toolchain
        cc = _find_generic(repository_ctx, "gcc", "CC", overriden_tools)
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/unix_cc_configure.bzl", line 310, column 32, in _find_generic
        auto_configure_fail(msg)
    File "/build/.cache/bazel/_bazel_builduser/a80f9089daf990a34a68f0cd3ef998d9/external/bazel_tools/tools/cpp/lib_cc_configure.bzl", line 112, column 9, in auto_configure_fail
        fail("\n%sAuto-Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail: 
Auto-Configuration Error: Cannot find gcc or CC (gcc-10); either correct your path or set the CC environment variable
INFO: Repository llvm-project instantiated at:
  /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/WORKSPACE:15:14: in <toplevel>
  /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/tensorflow/workspace2.bzl:1118:21: in workspace
  /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/tensorflow/workspace2.bzl:667:9: in _tf_repositories
  /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/third_party/llvm/workspace.bzl:10:20: in repo
  /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/third_party/repo.bzl:112:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
  /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/third_party/repo.bzl:65:35: in <toplevel>
ERROR: /build/tensorflow-rocm/src/tensorflow-2.5.0-rocm/tensorflow/lite/tools/BUILD:16:10: //tensorflow/lite/tools:visualize depends on @local_config_cc//:cc-compiler-k8 in repository @local_config_cc which failed to fetch. no such package '@local_config_cc//': 
Auto-Configuration Error: Cannot find gcc or CC (gcc-10); either correct your path or set the CC environment variable
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Analysis failed
INFO: Elapsed time: 35.165s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (303 packages loaded, 4347 targets configured)
FAILED: Build did NOT complete successfully (303 packages loaded, 4347 targets configured)
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Build failed, check /var/lib/aurbuild/x86_64/aur/build
TheCoolerPlayer commented 3 years ago

faced the same error a few days ago, only solution (after trying out various stuff for about a week) was to switch to an officially supported distro and kernel (Ubuntu with 5.10)

CyberShadow commented 3 years ago

The Docker images do work fine for me on Arch Linux. I commend the effort to package everything natively, though.

astrowave commented 3 years ago

Solvable by installing the gcc10 package via pacman

acxz commented 2 years ago

Closing this issue, since with tf 2.6.0, gcc-11 is used. Please comment if this issue persists.