{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/4603","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4603/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4603/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4603/events","html_url":"https://github.com/bazelbuild/bazel/issues/4603","id":295339890,"number":4603,"title":"`bazel test` fails on MacOs","user":{"login":"vicb","id":248818,"avatar_url":"https://avatars0.githubusercontent.com/u/248818?v=4","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"labels":[{"id":762705960,"url":"https://api.github.com/repos/bazelbuild/bazel/labels/category:%20multi-platform%20%3E%20macOS","name":"category: multi-platform > macOS","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-02-08T00:10:08Z","updated_at":"2018-02-08T16:00:50Z","closed_at":null,"author_association":"NONE","body":"### Description of the problem / feature request:\r\n\r\nI got an error when trying to build angular (I'm on the Angular team berchet@)\r\n\r\nThe error is:\r\n\r\n```\r\n$ bazel test packages/core/test/render3\r\nERROR: /private/var/tmp/_bazel_berchet/136114fe9f12514cf56a27652da0b4c4/external/local_config_cc/BUILD:50:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL\r\nERROR: Analysis of target '//packages/core/test/render3:render3' failed; build aborted: Analysis of target '@local_config_cc//:cc-compiler-darwin_x86_64' failed; build aborted\r\nINFO: Elapsed time: 2.277s\r\nFAILED: Build did NOT complete successfully (34 packages loaded)\r\nERROR: Couldn't start the build. Unable to run tests\r\n```\r\n\r\nNote: I had this working in the past few weeks (& using multiple times a day).\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\nOn a gMac:\r\n1. clone the angular repo at https://github.com/angular/angular\r\n2. execute `yarn` into the root folder to install deps\r\n3. execute `bazel test packages/core/test/render3` at the root\r\n\r\n`yarn` and `bazel` must be installed via `brew`\r\n\r\n### What operating system are you running Bazel on?\r\n\r\nThis seems to be the issue, 4 of us ran into this bug after an High Sierra 10.13.3 update\r\n\r\n### What's the output of `bazel info release`?\r\n\r\n```\r\n bazel version\r\nBuild label: 0.9.0-homebrew\r\nBuild target: bazel-out/darwin-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar\r\nBuild time: Sun Jul 12 12:24:01 +49936 (1513677414241)\r\nBuild timestamp: 1513677414241\r\nBuild timestamp as int: 1513677414241\r\n```\r\n\r\n###  Have you found anything relevant by searching the web?\r\n\r\nI have searched the web and my team-mates, misc info\r\n\r\n- rebooting help,\r\n- `xcode-select -s /Applications/Xcode.app/Contents/Developer` before rebooting seems to help,\r\n- when you are in a working state, never ever `bazel clean` you could get into the broken state\r\n\r\nThe error seems to originate in this BUILD file:\r\n```\r\n# /private/var/tmp/_bazel_berchet/136114fe9f12514cf56a27652da0b4c4/external/local_config_xcode/BUILD\r\n\r\npackage(default_visibility = ['//visibility:public'])\r\n\r\nxcode_config(name = 'host_xcodes')\r\n# Error: Invoking xcode-locator failed, return code 256, stderr: java.io.IOException: Cannot run program \"/private/var/tmp/_bazel_berchet/136114fe9f12514cf56a27652da0b4c4/external/local_config_xcode/./xcode-locator-bin\" (in directory \"/private/var/tmp/_bazel_berchet/136114fe9f12514cf56a27652da0b4c4/external/local_config_xcode\"): error=1, Operation not permitted, stdout: \r\n```\r\n\r\nexecuting  `/private/var/tmp/_bazel_berchet/136114fe9f12514cf56a27652da0b4c4/external/local_config_xcode/./xcode-locator-bin` fromthe CLI returns\r\n```\r\n{\r\n\t\"9.2.0\": \"/Applications/Xcode.app/Contents/Developer\",\r\n\t\"9.2\": \"/Applications/Xcode.app/Contents/Developer\",\r\n\t\"9\": \"/Applications/Xcode.app/Contents/Developer\",\r\n}\r\n```\r\npermissions are `-rwxr-xr-x`\r\n"},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/364157803","html_url":"https://github.com/bazelbuild/bazel/issues/4603#issuecomment-364157803","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/4603","id":364157803,"user":{"login":"sergiocampama","id":689198,"avatar_url":"https://avatars2.githubusercontent.com/u/689198?v=4","gravatar_id":"","url":"https://api.github.com/users/sergiocampama","html_url":"https://github.com/sergiocampama","followers_url":"https://api.github.com/users/sergiocampama/followers","following_url":"https://api.github.com/users/sergiocampama/following{/other_user}","gists_url":"https://api.github.com/users/sergiocampama/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiocampama/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiocampama/subscriptions","organizations_url":"https://api.github.com/users/sergiocampama/orgs","repos_url":"https://api.github.com/users/sergiocampama/repos","events_url":"https://api.github.com/users/sergiocampama/events{/privacy}","received_events_url":"https://api.github.com/users/sergiocampama/received_events","type":"User","site_admin":false},"created_at":"2018-02-08T16:00:50Z","updated_at":"2018-02-08T16:00:50Z","author_association":"MEMBER","body":"I looked into that, but `repository_ctx.execute` does not use any strategy, it just runs the commands passed through JavaSubprocess, so not sure if a sandbox is used at all for repository execute actions"}}
{"actor":{"display_login":"sergiocampama"}}