{"action":"created","issue":{"url":"https://api.github.com/repos/google/bazel/issues/113","labels_url":"https://api.github.com/repos/google/bazel/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/google/bazel/issues/113/comments","events_url":"https://api.github.com/repos/google/bazel/issues/113/events","html_url":"https://github.com/google/bazel/issues/113","id":68135690,"number":113,"title":"Bash completion build error","user":{"login":"kchodorow","id":17042,"avatar_url":"https://avatars.githubusercontent.com/u/17042?v=3","gravatar_id":"","url":"https://api.github.com/users/kchodorow","html_url":"https://github.com/kchodorow","followers_url":"https://api.github.com/users/kchodorow/followers","following_url":"https://api.github.com/users/kchodorow/following{/other_user}","gists_url":"https://api.github.com/users/kchodorow/gists{/gist_id}","starred_url":"https://api.github.com/users/kchodorow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kchodorow/subscriptions","organizations_url":"https://api.github.com/users/kchodorow/orgs","repos_url":"https://api.github.com/users/kchodorow/repos","events_url":"https://api.github.com/users/kchodorow/events{/privacy}","received_events_url":"https://api.github.com/users/kchodorow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"damienmg","id":3721087,"avatar_url":"https://avatars.githubusercontent.com/u/3721087?v=3","gravatar_id":"","url":"https://api.github.com/users/damienmg","html_url":"https://github.com/damienmg","followers_url":"https://api.github.com/users/damienmg/followers","following_url":"https://api.github.com/users/damienmg/following{/other_user}","gists_url":"https://api.github.com/users/damienmg/gists{/gist_id}","starred_url":"https://api.github.com/users/damienmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damienmg/subscriptions","organizations_url":"https://api.github.com/users/damienmg/orgs","repos_url":"https://api.github.com/users/damienmg/repos","events_url":"https://api.github.com/users/damienmg/events{/privacy}","received_events_url":"https://api.github.com/users/damienmg/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-04-13T16:15:53Z","updated_at":"2015-04-13T17:19:56Z","closed_at":null,"body":"I'm getting (with --verbose_failures):\r\n\r\n```\r\nExtracting Bazel installation...\r\nSending SIGTERM to previous Bazel server (pid=10682)... done.\r\n......\r\nINFO: Found 1 target...\r\nINFO: From Building src/main/java/libbazel-core.jar (1192 files) [for host]:\r\nNote: Some input files use or override a deprecated API.\r\nNote: Recompile with -Xlint:deprecation for details.\r\nNote: Some input files use unchecked or unsafe operations.\r\nNote: Recompile with -Xlint:unchecked for details.\r\nINFO: From Executing genrule //scripts:bash_completion:\r\nterminate called after throwing an instance of 'std::logic_error'\r\n  what():  basic_string::_S_construct null not valid\r\n/bin/bash: line 3: 13421 Aborted                 (core dumped) bazel-out/host/bin/src/bazel help completion 2> err.log >> bazel-out/local_linux-fastbuild/bin/scripts/bazel-complete.bash\r\nERROR: /home/kchodorow/gitroot/bazel/scripts/BUILD:7:1: Executing genrule //scripts:bash_completion failed: bash failed: error executing command \r\n  (cd /home/kchodorow/.cache/bazel/_bazel_kchodorow/732c1e8a78acec61831f6448799afba1/bazel && \\\r\n  exec env - \\\r\n  /bin/bash -c 'source tools/genrule/genrule-setup.sh; set +x; cat scripts/bazel-complete-template.bash > bazel-out/local_linux-fastbuild/bin/scripts/bazel-complete.bash\r\ntouch WORKSPACE err.log\r\ntrap \"rm WORKSPACE err.log\" EXIT\r\nbazel-out/host/bin/src/bazel help completion 2>err.log >>bazel-out/local_linux-fastbuild/bin/scripts/bazel-complete.bash || { cat err.log; exit 1; }'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1: bash failed: error executing command \r\n  (cd /home/kchodorow/.cache/bazel/_bazel_kchodorow/732c1e8a78acec61831f6448799afba1/bazel && \\\r\n  exec env - \\\r\n  /bin/bash -c 'source tools/genrule/genrule-setup.sh; set +x; cat scripts/bazel-complete-template.bash > bazel-out/local_linux-fastbuild/bin/scripts/bazel-complete.bash\r\ntouch WORKSPACE err.log\r\ntrap \"rm WORKSPACE err.log\" EXIT\r\nbazel-out/host/bin/src/bazel help completion 2>err.log >>bazel-out/local_linux-fastbuild/bin/scripts/bazel-complete.bash || { cat err.log; exit 1; }'): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.\r\nTarget //scripts:bash_completion failed to build\r\nINFO: Elapsed time: 22.022s, Critical Path: 18.78s\r\n```"},"comment":{"url":"https://api.github.com/repos/google/bazel/issues/comments/92432657","html_url":"https://github.com/google/bazel/issues/113#issuecomment-92432657","issue_url":"https://api.github.com/repos/google/bazel/issues/113","id":92432657,"user":{"login":"damienmg","id":3721087,"avatar_url":"https://avatars.githubusercontent.com/u/3721087?v=3","gravatar_id":"","url":"https://api.github.com/users/damienmg","html_url":"https://github.com/damienmg","followers_url":"https://api.github.com/users/damienmg/followers","following_url":"https://api.github.com/users/damienmg/following{/other_user}","gists_url":"https://api.github.com/users/damienmg/gists{/gist_id}","starred_url":"https://api.github.com/users/damienmg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damienmg/subscriptions","organizations_url":"https://api.github.com/users/damienmg/orgs","repos_url":"https://api.github.com/users/damienmg/repos","events_url":"https://api.github.com/users/damienmg/events{/privacy}","received_events_url":"https://api.github.com/users/damienmg/received_events","type":"User","site_admin":false},"created_at":"2015-04-13T17:19:56Z","updated_at":"2015-04-13T17:19:56Z","body":"Ok I traced back this problem to:\r\n#9  0x000000000041c480 in blaze_util::Which(std::string const&) ()\r\n#10 0x000000000041d376 in blaze::GetDefaultHostJavabase() ()\r\n\r\nThe thing is JAVA_HOME is undefined inside the spawn process so it is trying to find the JDK using the path leading to an exception because the path is empty. I'll send out a fix for both problems."}}