{"action":"created","issue":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/4842","repository_url":"https://api.github.com/repos/RobotLocomotion/drake","labels_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/4842/labels{/name}","comments_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/4842/comments","events_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/4842/events","html_url":"https://github.com/RobotLocomotion/drake/issues/4842","id":202219552,"number":4842,"title":"Bazel Error: Linking of rule '@yaml_cpp//:lib' failed - clang: error: unsupported option '-pass-exit-codes'","user":{"login":"liangfok","id":1388098,"avatar_url":"https://avatars.githubusercontent.com/u/1388098?v=3","gravatar_id":"","url":"https://api.github.com/users/liangfok","html_url":"https://github.com/liangfok","followers_url":"https://api.github.com/users/liangfok/followers","following_url":"https://api.github.com/users/liangfok/following{/other_user}","gists_url":"https://api.github.com/users/liangfok/gists{/gist_id}","starred_url":"https://api.github.com/users/liangfok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangfok/subscriptions","organizations_url":"https://api.github.com/users/liangfok/orgs","repos_url":"https://api.github.com/users/liangfok/repos","events_url":"https://api.github.com/users/liangfok/events{/privacy}","received_events_url":"https://api.github.com/users/liangfok/received_events","type":"User","site_admin":false},"labels":[{"id":499298907,"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/configuration:%20bazel","name":"configuration: bazel","color":"fbca04","default":false},{"id":366761608,"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/team:%20software%20core","name":"team: software core","color":"0052cc","default":false},{"id":77074782,"url":"https://api.github.com/repos/RobotLocomotion/drake/labels/type:%20bug","name":"type: bug","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false},"assignees":[{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2017-01-20T19:16:47Z","updated_at":"2017-01-20T19:28:55Z","closed_at":null,"body":"# The Error\r\nWhen building Drake using the following commands:\r\n\r\n```\r\ncd drake-distro\r\nbazel build //... \r\n```\r\n\r\nThe build aborts with the following error:\r\n\r\n```\r\nERROR: /home/liang/.cache/bazel/_bazel_liang/5441fd7edcd109c7894c36c2b6d5233a/external/yaml_cpp/BUILD:3:1: Linking of rule '@yaml_cpp//:lib' failed: linux-sandbox failed: error executing command /home/liang/.cache/bazel/_bazel_liang/5441fd7edcd109c7894c36c2b6d5233a/execroot/drake-distro-2/_bin/linux-sandbox ... (remaining 18 argument(s) skipped).\r\nclang: error: unsupported option '-pass-exit-codes'\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/RobotLocomotion/drake/issues/comments/274158253","html_url":"https://github.com/RobotLocomotion/drake/issues/4842#issuecomment-274158253","issue_url":"https://api.github.com/repos/RobotLocomotion/drake/issues/4842","id":274158253,"user":{"login":"david-german-tri","id":17437069,"avatar_url":"https://avatars.githubusercontent.com/u/17437069?v=3","gravatar_id":"","url":"https://api.github.com/users/david-german-tri","html_url":"https://github.com/david-german-tri","followers_url":"https://api.github.com/users/david-german-tri/followers","following_url":"https://api.github.com/users/david-german-tri/following{/other_user}","gists_url":"https://api.github.com/users/david-german-tri/gists{/gist_id}","starred_url":"https://api.github.com/users/david-german-tri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-german-tri/subscriptions","organizations_url":"https://api.github.com/users/david-german-tri/orgs","repos_url":"https://api.github.com/users/david-german-tri/repos","events_url":"https://api.github.com/users/david-german-tri/events{/privacy}","received_events_url":"https://api.github.com/users/david-german-tri/received_events","type":"User","site_admin":false},"created_at":"2017-01-20T19:28:55Z","updated_at":"2017-01-20T19:28:55Z","body":"Conclusion from Slack:\r\n\r\nWe believe that the first time @liangfok ran a Bazel command in this workspace, the `CC` or `CXX` environment variable was set to Clang.  As a result, Bazel autodetection selected the Clang compiler, and cached that choice.  However, the default `bazel.rc` was still setting GCC-specific flags, leading to the following error.  The fix is to `bazel clean`, sanity check your environment variables, and then proceed with `bazel build`.\r\n\r\nThis class of problem will be eliminated by #4772, which disables autodetection."}}
{"actor":{"display_login":"david-german-tri"}}