-
Notifications
You must be signed in to change notification settings - Fork 42
Trouble with building using Bazel #54
Comments
What version of Bazel is Yu Lin using? |
I cloned it from github bazel's master branch. I found if I cp 'jar' into /usr/bin, I can compile. |
Is |
It is on my path and I can execute it. But bazel still reports "jar: command not found". |
What is your JAVA_HOME? I just ran into my own problems using Bazel with a not-quite-right JAVA_HOME value: bazelbuild/bazel#268 |
My original JAVA_HOME was /usr/lib/jvm/java-7-openjdk-amd64. But I renamed java-7-openjdk-amd64 to openjdk-7 and set JAVA_HOME to /usr/lib/jvm/openjdk-7 (because I couldn't build the master branch of bazel when using name java-7-openjdk-amd64). Probably this action broke the symlink usr/bin/jar -> /etc/alternatives/jar -> /usr/lib/jvm/java-7-openjdk-amd64/bin/jar, thus raised the above error. Now that I checkout bazel version |
I got the following email from Yu Lin.
I can't build shipshape anymore (my plugin works fine before this upgrade), it gives the following error:
____Loading...
____Loading complete. Analyzing...
____Found 171 targets...
blaze: Entering directory
/home/yulin/.cache/bazel/_bazel_yulin/5f4d978cf0eb54a79459fe5f5f58e11b/s2/' ____[0 / 38] BazelWorkspaceStatusAction stable-status.txt ____From ProtocJava shipshape/proto/shipshape_config_proto_java_src.srcjar: /bin/bash: line 4: jar: command not found ERROR: /home/yulin/Downloads/s2/tools/build_rules/genproto.bzl:127:5: error executing shell command: 'set -e rm -rf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs mkdir bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_pr...' failed: bash failed: error executing com\ mand (cd /home/yulin/.cache/bazel/_bazel_yulin/5f4d978cf0eb54a79459fe5f5f58e11b/s2 && \ exec env - \ /bin/bash -c 'set -e rm -rf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs mkdir bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs bazel-out/local_linux-fastbuild/bin/third_party/proto/protoc --java_out=bazel-out/local_linux-fastbuild/genfiles/shipshape/prot\ o/shipshape_config_proto_java_src.srcjar.srcs shipshape/proto/shipshape_config.proto jar cMf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar -C bazel-out/local_linu\ x-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs . rm -rf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs'): com.google.devto\ ols.build.lib.shell.BadExitStatusException: Process exited with status 127: bash failed: error executing command (cd /home/yulin/.cache/bazel/_bazel_yulin/5f4d978cf0eb54a79459fe5f5f58e11b/s2 && \ exec env - \ /bin/bash -c 'set -e rm -rf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs mkdir bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs bazel-out/local_linux-fastbuild/bin/third_party/proto/protoc --java_out=bazel-out/local_linux-fastbuild/genfiles/shipshape/prot\ o/shipshape_config_proto_java_src.srcjar.srcs shipshape/proto/shipshape_config.proto jar cMf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar -C bazel-out/local_linu\ x-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs . rm -rf bazel-out/local_linux-fastbuild/genfiles/shipshape/proto/shipshape_config_proto_java_src.srcjar.srcs'): com.google.devto\ ols.build.lib.shell.BadExitStatusException: Process exited with status 127. blaze: Leaving directory
/home/yulin/.cache/bazel/_bazel_yulin/5f4d978cf0eb54a79459fe5f5f58e11b/s2/'____Building complete.
____Elapsed time: 1.021s, Critical Path: 0.55s
It says "jar: command not found", but jar can be executed actually. Do you know why?
The text was updated successfully, but these errors were encountered: