{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/1322","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/1322/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/1322/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/1322/events","html_url":"https://github.com/bazelbuild/bazel/issues/1322","id":157547696,"number":1322,"title":"error building bazel and tensorflow with ccache","user":{"login":"chemelnucfin","id":3982092,"avatar_url":"https://avatars.githubusercontent.com/u/3982092?v=3","gravatar_id":"","url":"https://api.github.com/users/chemelnucfin","html_url":"https://github.com/chemelnucfin","followers_url":"https://api.github.com/users/chemelnucfin/followers","following_url":"https://api.github.com/users/chemelnucfin/following{/other_user}","gists_url":"https://api.github.com/users/chemelnucfin/gists{/gist_id}","starred_url":"https://api.github.com/users/chemelnucfin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chemelnucfin/subscriptions","organizations_url":"https://api.github.com/users/chemelnucfin/orgs","repos_url":"https://api.github.com/users/chemelnucfin/repos","events_url":"https://api.github.com/users/chemelnucfin/events{/privacy}","received_events_url":"https://api.github.com/users/chemelnucfin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bazelbuild/bazel/labels/category:%20sandboxing","name":"category: sandboxing","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-30T19:27:29Z","updated_at":"2016-06-15T13:30:19Z","closed_at":null,"body":"Current System: Fedora 23\r\n\r\nI had tensorflow building a couple of weeks ago, but once I upgraded to the latest commits, I get these errors (more info after logs):\r\n\r\n**Bazel**\r\n**./compile.sh**\r\nERROR: /projects/bazel/src/main/tools/BUILD:26:1: Linking of rule '//src/main/tools:build-runfiles' failed: gcc failed: error executing command \r\n  (cd /tmp/bazel.RygeKR2a/out/bazel && \\\r\n  exec env - \\\r\n  /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.\r\nccache: error: Could not find compiler \"gcc\" in PATH\r\nTarget //src:bazel failed to build\r\n\r\n**Tensorflow**\r\n**bazel --output_base=/mnt/raid/projects/.cache test --config=cuda //tensorflow/... --verbose_failures**\r\nblaze: Entering directory `/projects/.cache/tensorflow/'\r\n____[0 / 223] Executing genrule @farmhash_archive//:configure\r\n____[1 / 477] Linking external/gmock_archive/libgtest.so\r\nERROR: /projects/.cache/external/gmock_archive/BUILD:1:1: Linking of rule '@gmock_archive//:gtest' failed: namespace-sandbox failed: error executing command \r\n  (cd /projects/.cache/tensorflow && \\\r\n  exec env - \\\r\n  /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).\r\nccache: error: Could not find compiler \"gcc\" in PATH\r\nblaze: Leaving directory `/projects/.cache/tensorflow/'\r\n\r\n------------\r\n**which gcc** \r\n/usr/lib64/ccache/gcc\r\n\r\n**ls -al /usr/lib64/ccache/gcc**\r\nlrwxrwxrwx. 1 root root 16 May 21 10:03 /usr/lib64/ccache/gcc -> ../../bin/ccache\r\n\r\n**/usr/bin/ccache gcc --version**\r\ngcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)\r\nCopyright (C) 2015 Free Software Foundation, Inc.\r\nThis is free software; see the source for copying conditions.  There is NO\r\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n**/usr/bin/ccache --version**\r\nccache version 3.2.4\r\n\r\nCopyright (C) 2002-2007 Andrew Tridgell\r\nCopyright (C) 2009-2015 Joel Rosdahl\r\n\r\nThis program is free software; you can redistribute it and/or modify it under\r\nthe terms of the GNU General Public License as published by the Free Software\r\nFoundation; either version 3 of the License, or (at your option) any later\r\nversion."},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/226187281","html_url":"https://github.com/bazelbuild/bazel/issues/1322#issuecomment-226187281","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/1322","id":226187281,"user":{"login":"philwo","id":504652,"avatar_url":"https://avatars.githubusercontent.com/u/504652?v=3","gravatar_id":"","url":"https://api.github.com/users/philwo","html_url":"https://github.com/philwo","followers_url":"https://api.github.com/users/philwo/followers","following_url":"https://api.github.com/users/philwo/following{/other_user}","gists_url":"https://api.github.com/users/philwo/gists{/gist_id}","starred_url":"https://api.github.com/users/philwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philwo/subscriptions","organizations_url":"https://api.github.com/users/philwo/orgs","repos_url":"https://api.github.com/users/philwo/repos","events_url":"https://api.github.com/users/philwo/events{/privacy}","received_events_url":"https://api.github.com/users/philwo/received_events","type":"User","site_admin":false},"created_at":"2016-06-15T13:30:19Z","updated_at":"2016-06-15T13:30:19Z","body":"The key here is: \"ccache: error: Could not find compiler \"gcc\" in PATH\".\r\ngcc is in /usr/lib64/ccache, which is on @chemelnucfin's PATH.\r\n\r\nHowever, Bazel resets the PATH to a hard-coded list that is wrong for your system (it does not include /usr/lib64/ccache).\r\n\r\n@damienmg Should Bazel detect this automatically via C++ toolchain autoconfiguration? Or do we have a different mechanism for how this should work?\r\n\r\nI'm pretty sure that this is not a sandboxing issue. I think the same error will happen with --spawn_strategy=standalone."}}
{"actor":{"display_login":"philwo"}}