-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error building bazel and tensorflow with ccache #1322
Comments
The key here is: "ccache: error: Could not find compiler "gcc" in PATH". However, Bazel resets the PATH to a hard-coded list that is wrong for your system (it does not include /usr/lib64/ccache). @damienmg Should Bazel detect this automatically via C++ toolchain autoconfiguration? Or do we have a different mechanism for how this should work? I'm pretty sure that this is not a sandboxing issue. I think the same error will happen with --spawn_strategy=standalone. |
With the following, it works on my Fedora 23:
|
Worked great. Now let me see how to get it working in tensorflow..... On Fri, Jun 17, 2016, 8:40 PM Samuel Audet notifications@github.com wrote:
|
Sorry yes we need to get the actual C++ compiler not the ccache. |
Current System: Fedora 23
I had tensorflow building a couple of weeks ago, but once I upgraded to the latest commits, I get these errors (more info after logs):
Bazel
./compile.sh
ERROR: /projects/bazel/src/main/tools/BUILD:26:1: Linking of rule '//src/main/tools:build-runfiles' failed: gcc failed: error executing command
(cd /tmp/bazel.RygeKR2a/out/bazel &&
exec env -
/usr/lib64/ccache/gcc -o bazel-out/local-fastbuild/bin/src/main/tools/build-runfiles -no-canonical-prefixes -B/usr/lib64/ccache -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,-rpath,/usr/local/cuda/lib64 -L/usr/local/cuda/lib64 -Wl,-rpath,/usr/local/cuda/lib -L/usr/local/cuda/lib -Wl,-rpath,/usr/lib/nvidia -L/usr/lib/nvidia -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/src/main/tools/build-runfiles-2.params): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
ccache: error: Could not find compiler "gcc" in PATH
Target //src:bazel failed to build
Tensorflow
bazel --output_base=/mnt/raid/projects/.cache test --config=cuda //tensorflow/... --verbose_failures
blaze: Entering directory
/projects/.cache/tensorflow/' ____[0 / 223] Executing genrule @farmhash_archive//:configure ____[1 / 477] Linking external/gmock_archive/libgtest.so ERROR: /projects/.cache/external/gmock_archive/BUILD:1:1: Linking of rule '@gmock_archive//:gtest' failed: namespace-sandbox failed: error executing command (cd /projects/.cache/tensorflow && \ exec env - \ /projects/.cache/tensorflow/_bin/namespace-sandbox @/projects/.cache/tensorflow/bazel-sandbox/0c0146b5-bdd1-42fd-8e0b-1b813285236d-1.params -- /usr/lib64/ccache/gcc -shared -o bazel-out/local-fastbuild/bin/external/gmock_archive/libgtest.so -pthread -no-canonical-prefixes -Wl,-no-as-needed -B/usr/lib64/ccache -B/usr/bin -pass-exit-codes '-Wl,--build-id=md5' '-Wl,--hash-style=gnu' -Wl,-rpath,/usr/local/cuda/lib64 -L/usr/local/cuda/lib64 -Wl,-rpath,/usr/local/cuda/lib -L/usr/local/cuda/lib -Wl,-rpath,/usr/lib/nvidia -L/usr/lib/nvidia -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/external/gmock_archive/libgtest.so-2.params). ccache: error: Could not find compiler "gcc" in PATH blaze: Leaving directory
/projects/.cache/tensorflow/'which gcc
/usr/lib64/ccache/gcc
ls -al /usr/lib64/ccache/gcc
lrwxrwxrwx. 1 root root 16 May 21 10:03 /usr/lib64/ccache/gcc -> ../../bin/ccache
/usr/bin/ccache gcc --version
gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/usr/bin/ccache --version
ccache version 3.2.4
Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2015 Joel Rosdahl
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
The text was updated successfully, but these errors were encountered: