{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/5133","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5133/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5133/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5133/events","html_url":"https://github.com/bazelbuild/bazel/issues/5133","id":319391286,"number":5133,"title":"Bazel 0.13.0 adds a strict requirement to have a c compiler locally (even for RE)","user":{"login":"nlopezgi","id":4062751,"avatar_url":"https://avatars3.githubusercontent.com/u/4062751?v=4","gravatar_id":"","url":"https://api.github.com/users/nlopezgi","html_url":"https://github.com/nlopezgi","followers_url":"https://api.github.com/users/nlopezgi/followers","following_url":"https://api.github.com/users/nlopezgi/following{/other_user}","gists_url":"https://api.github.com/users/nlopezgi/gists{/gist_id}","starred_url":"https://api.github.com/users/nlopezgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlopezgi/subscriptions","organizations_url":"https://api.github.com/users/nlopezgi/orgs","repos_url":"https://api.github.com/users/nlopezgi/repos","events_url":"https://api.github.com/users/nlopezgi/events{/privacy}","received_events_url":"https://api.github.com/users/nlopezgi/received_events","type":"User","site_admin":false},"labels":[{"id":838575096,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/category:%20remote%20execution%20/%20caching","name":"category: remote execution / caching","color":"c4215a","default":false},{"id":106503261,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/type:%20feature%20request","name":"type: feature request","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":{"login":"katre","id":326527,"avatar_url":"https://avatars1.githubusercontent.com/u/326527?v=4","gravatar_id":"","url":"https://api.github.com/users/katre","html_url":"https://github.com/katre","followers_url":"https://api.github.com/users/katre/followers","following_url":"https://api.github.com/users/katre/following{/other_user}","gists_url":"https://api.github.com/users/katre/gists{/gist_id}","starred_url":"https://api.github.com/users/katre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katre/subscriptions","organizations_url":"https://api.github.com/users/katre/orgs","repos_url":"https://api.github.com/users/katre/repos","events_url":"https://api.github.com/users/katre/events{/privacy}","received_events_url":"https://api.github.com/users/katre/received_events","type":"User","site_admin":false},"assignees":[{"login":"katre","id":326527,"avatar_url":"https://avatars1.githubusercontent.com/u/326527?v=4","gravatar_id":"","url":"https://api.github.com/users/katre","html_url":"https://github.com/katre","followers_url":"https://api.github.com/users/katre/followers","following_url":"https://api.github.com/users/katre/following{/other_user}","gists_url":"https://api.github.com/users/katre/gists{/gist_id}","starred_url":"https://api.github.com/users/katre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katre/subscriptions","organizations_url":"https://api.github.com/users/katre/orgs","repos_url":"https://api.github.com/users/katre/repos","events_url":"https://api.github.com/users/katre/events{/privacy}","received_events_url":"https://api.github.com/users/katre/received_events","type":"User","site_admin":false},{"login":"mhlopko","id":814566,"avatar_url":"https://avatars0.githubusercontent.com/u/814566?v=4","gravatar_id":"","url":"https://api.github.com/users/mhlopko","html_url":"https://github.com/mhlopko","followers_url":"https://api.github.com/users/mhlopko/followers","following_url":"https://api.github.com/users/mhlopko/following{/other_user}","gists_url":"https://api.github.com/users/mhlopko/gists{/gist_id}","starred_url":"https://api.github.com/users/mhlopko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhlopko/subscriptions","organizations_url":"https://api.github.com/users/mhlopko/orgs","repos_url":"https://api.github.com/users/mhlopko/repos","events_url":"https://api.github.com/users/mhlopko/events{/privacy}","received_events_url":"https://api.github.com/users/mhlopko/received_events","type":"User","site_admin":false}],"milestone":null,"comments":15,"created_at":"2018-05-02T02:36:52Z","updated_at":"2018-05-16T16:00:40Z","closed_at":"2018-05-16T09:17:08Z","author_association":"CONTRIBUTOR","body":"### Description of the problem / feature request:\r\n\r\nBazel 0.13.0 adds a strict requirement to have a c compiler installed, even for remote builds (which should not require a c compiler locally installed - and did not with bazel 0.12.0 or earlier)\r\n\r\n### Feature requests: what underlying problem are you trying to solve with this feature?\r\n\r\n<remote execution customer> started noticing issues with their remote execution builds since Bazel 0.13.0 was released. \r\nIf no c compiler is present locally, the following error is produced:\r\n\r\nERROR: Analysis of target 'xxx' failed; build aborted: no such package '@local_config_cc//': Traceback (most recent call last):\r\n        File \".../external/bazel_tools/tools/cpp/cc_configure.bzl\", line 41\r\n                configure_unix_toolchain(repository_ctx, cpu_value, overriden...)\r\n        File \".../external/bazel_tools/tools/cpp/unix_cc_configure.bzl\", line 413, in configure_unix_toolchain\r\n                find_cc(repository_ctx, overriden_tools)\r\n        File \".../external/bazel_tools/tools/cpp/unix_cc_configure.bzl\", line 404, in find_cc\r\n                fail((\"Cannot find gcc or CC%s, eithe...))\r\nCannot find gcc or CC, either correct your path or set the CC environment variable\r\n\r\n### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.\r\n\r\nRun bazel from a container that has no C compiler installed, using appropriate remote execution flags.\r\nExample repro steps (with RE instance specific details removed):\r\n\r\n1.  Prepare the debian9 container\r\n> gcloud docker -- pull gcr.io/cloud-marketplace/google/debian9@sha256:6b3aa04751aa2ac3b0c7be4ee71148b66d693ad212ce6d3244bd2a2a147f314a\r\n\r\n2. Run the container\r\n> docker run -v /temp:/temp -it gcr.io/cloud-marketplace/google/debian9@sha256:6b3aa04751aa2ac3b0c7be4ee71148b66d693ad212ce6d3244bd2a2a147f314a /bin/bash\r\n\r\n3. Install unzip, wget, git (inside the container)\r\n> apt-get update && apt-get install -y --no-install-recommends unzip wget git\r\n\r\n4. Install bazel 0.13.0 (w/o using apt-get)\r\n> wget --no-verbose https://github.com/bazelbuild/bazel/releases/download/0.13.0/bazel-0.13.0-installer-linux-x86_64.sh\r\n> chmod 777 bazel-0.13.0-installer-linux-x86_64.sh\r\n> ./bazel-0.13.0-installer-linux-x86_64.sh\r\n\r\n5. Pull a project from github (e.g., Abseil-cpp)\r\n> git clone https://github.com/abseil/abseil-cpp.git\r\n> cd abseil-cpp/\r\n\r\n6. Try to build it with Remote execution\r\n> bazel --host_jvm_args=-Dbazel.DigestFunction=SHA256 --nomaster_bazelrc test --verbose_failures --jobs=50 --spawn_strategy=remote --strategy=Javac=remote --strategy=Closure=remote --genrule_strategy=remote --experimental_strict_action_env=true --host_javabase=@bazel_toolchains//configs/debian8_clang/0.3.0:jdk8 --javabase=@bazel_toolchains//configs/debian8_clang/0.3.0:jdk8 --tls_enabled --auth_enabled --auth_scope=<scope> --auth_credentials=<credential> --remote_executor=<re-endpoint> --remote_cache=<re-endpoint> --remote_local_fallback=False --remote_accept_cached=True --experimental_remote_platform_override='properties:{name:\"container-image\" value:\"docker://gcr.io/cloud-marketplace/google/rbe-debian8@sha256:d84a7de5175a22505209f56b02f1da20ccec64880da09ee38eaef3670fbd2a56\" }'  --remote_timeout=3600 --remote_instance_name=<re-project> --crosstool_top=@bazel_toolchains//configs/debian8_clang/0.3.0/bazel_0.10.0:toolchain --bes_timeout=60s --bes_backend=<bes-endpoint> --project_id=<bes-project> --define EXECUTOR=remote  -- //absl/...\r\n\r\n7. Build should fail with error indicated above\r\n\r\n### What operating system are you running Bazel on?\r\n\r\ndebian9 (http://gcr.io/cloud-marketplace/google/debian9)\r\n\r\n### What's the output of `bazel info release`?\r\n\r\nrelease 0.13.0\r\n\r\n###  Have you found anything relevant by searching the web?\r\n\r\nconsulted with katre@ about the issue. From conversation:\r\nBefore 0.13.0, not having CC set caused an error only if you actually used CC compilation, which [does not happen with remote execution]. This is because Bazel never tries to load the @local_config_cc// package [with RE].\r\nAfter 0.13.0, the toolchains from cc autoconfiguration are always registered, so Bazel always tries to load @local_config_cc//."},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/389572951","html_url":"https://github.com/bazelbuild/bazel/issues/5133#issuecomment-389572951","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5133","id":389572951,"user":{"login":"nlopezgi","id":4062751,"avatar_url":"https://avatars3.githubusercontent.com/u/4062751?v=4","gravatar_id":"","url":"https://api.github.com/users/nlopezgi","html_url":"https://github.com/nlopezgi","followers_url":"https://api.github.com/users/nlopezgi/followers","following_url":"https://api.github.com/users/nlopezgi/following{/other_user}","gists_url":"https://api.github.com/users/nlopezgi/gists{/gist_id}","starred_url":"https://api.github.com/users/nlopezgi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nlopezgi/subscriptions","organizations_url":"https://api.github.com/users/nlopezgi/orgs","repos_url":"https://api.github.com/users/nlopezgi/repos","events_url":"https://api.github.com/users/nlopezgi/events{/privacy}","received_events_url":"https://api.github.com/users/nlopezgi/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T16:00:40Z","updated_at":"2018-05-16T16:00:40Z","author_association":"CONTRIBUTOR","body":"Commented on #5056 with a short summary. I think @mhlopko 's fix is almost in. Please let me know if this can be cherry-picked. Thanks"}}
{"actor":{"display_login":"nlopezgi"}}