-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run bazel command failed with bazel-0.5.0-jdk7 or bazel-0.5.1-jdk7 #3198
Comments
@ulfjack Do you know how jdk7 Bazel works or someone who knows? |
It suspect someone updated our protobuf libraries to a version that requires Jdk 8. |
Last upgrade was 0acead4. |
$ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java.jar com.google.protobuf.MessageOrBuilder | grep "major" |
Good catch! Protobuf java only requires Java 6. S it seems like the .jar artifacts where built with a Java 8's javac compiler without |
…ixes bazelbuild#3198 I recompiled the protobuf jars to be binary compatible with Java 6 by specifying -target 1.6 to javac. Verified: $ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java.jar com.google.protobuf.MessageOrBuilder | grep "major" major version: 50 $ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java_util.jar com.google.protobuf.util.Durations | grep "major" major version: 50 Change-Id: Ib40f8af8393de79dd431d08eb766c269bab2e608
@GinFungYJF hey! please try again with a bazel built from latest master! |
…ixes #3198 I recompiled the protobuf jars to be binary compatible with Java 6 by specifying -target 1.6 to javac. Verified: $ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java.jar com.google.protobuf.MessageOrBuilder | grep "major" major version: 50 $ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java_util.jar com.google.protobuf.util.Durations | grep "major" major version: 50 Change-Id: Ib40f8af8393de79dd431d08eb766c269bab2e608
…ixes #3198 I recompiled the protobuf jars to be binary compatible with Java 6 by specifying -target 1.6 to javac. Verified: $ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java.jar com.google.protobuf.MessageOrBuilder | grep "major" major version: 50 $ javap -v -cp third_party/protobuf/3.2.0/libprotobuf_java_util.jar com.google.protobuf.util.Durations | grep "major" major version: 50 Change-Id: Ib40f8af8393de79dd431d08eb766c269bab2e608
Baseline: e78ad83 Cherry picks: + 6802831: experimental UI: move stopUpdateThread() out of synchronized, again + 019935d: Fix bug in URI computation in RemoteModule + e9424cf: Automated rollback of commit 7dec005. + 9eea05d: Switching to Watcher API instead of wait_for_completion, in preparation for deprecating the wait_for_completion field. + 8965981: Set correct execroot for info + 716b527: Only create a single per-build instance of the remote cache / executor + 1d82d19: protobuf: Update protobuf jars to be binary compatible with Java 6. Fixes #3198 + 524b90d: Change CAS URI to use the "bytestream" scheme instead of being scheme-less + 4929ad7: Automated g4 rollback of commit 923d7df. + 68b9a7e: Automated g4 rollback of commit da56606. + 2ba693f: Automated rollback of commit ce7c4de. Incompatible changes: - Blaze no longer generates xcode projects. Use tulsi.bazel.build instead. Important changes: - Keyword-only syntax in a function definition is deprecated (e.g. `def foo(a, *, b)` or `def foo(a, *b, c)`) and will be removed in the future. - Attempting to build an Android target without setting up android_sdk_repository will now produce a helpful error message. - Adds a sha256 attribute to git_repository and new_git_repository. This can only be used if the remote is a public GitHub repository. It forces Bazel to download the repository as a tarball, which will often be faster and more robust than cloning it. - Sandboxing is now enabled by default on FreeBSD (via processwrapper-sandbox). - android_test may use manifest placeholders with 'manifest_merger = "android"'. - load() statements should be called at the top of .bzl files, before any other statement. This convention will be enforced in the future. - Effectively remove sysroot from CppConfiguration and allow it to use select statements. - proto_library.strict_proto_deps no longer exists. - Flag --explicit_jre_deps is now a noop. - The 'legacy' Android manifest merger is deprecated. Please upgrade to the 'android' manifest merger, which is the same merger used by Gradle. https://developer.android.com/studio/build/manifest-merge.html - Using $(CC_FLAGS) in a GenRule adds a dependency to the c++ toolchain - add one-version enforcement to android_local_test - Skylark support (apple_common.dotted_version(string)) for building DottedVersion objects to interface with native apple rules - CC_FLAGS can be defined using 'cc-flags-make-variable' action_config in CROSSTOOL - ios_framework native rule has been removed. This rule had been essentially broken for several months now; users should be using the skylark ios framework rule. https:/bazelbuild/rules_apple has details. - Clean command no longer uses boolean values for --async, --expunge, and --expunge_async options. - Partially fixes external J2ObjC support. - '--aspects' can occur more than once on the command line. - --no_ prefix no longer recognized. - Use action_config in crosstool for static library archiving, remove ar_flag. - Added a new flag --sandbox_writable_path, which asks the sandbox to make an existing directory writable when running actions. - bazel test now also computes a default instrumentation filter if --collect_code_coverage is enabled - n/na - In .bzl files, top-level `if` statements are deprecated and will be forbidden in the future. Move them in a function body instead (or use a conditional expression instead: `x if condition else y`). - ios_device and ios_test are deprecated. Please use the new testing rules in https:/bazelbuild/rules_apple instead. - bazel query --output package now displays packages from external repository with the format "@reponame//package". Packages in the main repository continue to have the format "package". - ctx.expand_make_variables is deprecated. - Bazel posts links to the CAS to the BEP if remote caching / execution is enabled - `bazel info execution_root` returns the corrrect directory name for the execution root.
@buchgr But how to build a bazel-jdk7 form the latest master instead of the distribution? |
I think this issue should be reopened as the bazel-0.5.2-jdk7 has another error after I installed it with the bazel-0.5.2-jdk7-installer-linux-x86_64.sh.
|
@ulfjack What shall I do with this bug? @GinFungYJF Could you use the Bazel version that comes with a bundled OpenJDK8 instead? You can download it from our releases page: bazel-0.5.2-installer-linux-x86_64.sh. |
We had only 1 bug report for that and the problem has been there for 1 month now. As announced before 0.5.0 we were going to remove support for JDK-7 build, please use the installer with OpenJDK8 bundled instead. Next release won't have JDK-7 builds anymore, see https://www.bazel.build/blog/2017/04/21/JDK7-deprecation.html |
Baseline: e78ad83 Cherry picks: + 6802831: experimental UI: move stopUpdateThread() out of synchronized, again + 019935d: Fix bug in URI computation in RemoteModule + e9424cf: Automated rollback of commit 7dec005. + 9eea05d: Switching to Watcher API instead of wait_for_completion, in preparation for deprecating the wait_for_completion field. + 8965981: Set correct execroot for info + 716b527: Only create a single per-build instance of the remote cache / executor + 1d82d19: protobuf: Update protobuf jars to be binary compatible with Java 6. Fixes bazelbuild#3198 + 524b90d: Change CAS URI to use the "bytestream" scheme instead of being scheme-less + 4929ad7: Automated g4 rollback of commit 923d7df. + 68b9a7e: Automated g4 rollback of commit da56606. + 2ba693f: Automated rollback of commit ce7c4de. Incompatible changes: - Blaze no longer generates xcode projects. Use tulsi.bazel.build instead. Important changes: - Keyword-only syntax in a function definition is deprecated (e.g. `def foo(a, *, b)` or `def foo(a, *b, c)`) and will be removed in the future. - Attempting to build an Android target without setting up android_sdk_repository will now produce a helpful error message. - Adds a sha256 attribute to git_repository and new_git_repository. This can only be used if the remote is a public GitHub repository. It forces Bazel to download the repository as a tarball, which will often be faster and more robust than cloning it. - Sandboxing is now enabled by default on FreeBSD (via processwrapper-sandbox). - android_test may use manifest placeholders with 'manifest_merger = "android"'. - load() statements should be called at the top of .bzl files, before any other statement. This convention will be enforced in the future. - Effectively remove sysroot from CppConfiguration and allow it to use select statements. - proto_library.strict_proto_deps no longer exists. - Flag --explicit_jre_deps is now a noop. - The 'legacy' Android manifest merger is deprecated. Please upgrade to the 'android' manifest merger, which is the same merger used by Gradle. https://developer.android.com/studio/build/manifest-merge.html - Using $(CC_FLAGS) in a GenRule adds a dependency to the c++ toolchain - add one-version enforcement to android_local_test - Skylark support (apple_common.dotted_version(string)) for building DottedVersion objects to interface with native apple rules - CC_FLAGS can be defined using 'cc-flags-make-variable' action_config in CROSSTOOL - ios_framework native rule has been removed. This rule had been essentially broken for several months now; users should be using the skylark ios framework rule. https:/bazelbuild/rules_apple has details. - Clean command no longer uses boolean values for --async, --expunge, and --expunge_async options. - Partially fixes external J2ObjC support. - '--aspects' can occur more than once on the command line. - --no_ prefix no longer recognized. - Use action_config in crosstool for static library archiving, remove ar_flag. - Added a new flag --sandbox_writable_path, which asks the sandbox to make an existing directory writable when running actions. - bazel test now also computes a default instrumentation filter if --collect_code_coverage is enabled - n/na - In .bzl files, top-level `if` statements are deprecated and will be forbidden in the future. Move them in a function body instead (or use a conditional expression instead: `x if condition else y`). - ios_device and ios_test are deprecated. Please use the new testing rules in https:/bazelbuild/rules_apple instead. - bazel query --output package now displays packages from external repository with the format "@reponame//package". Packages in the main repository continue to have the format "package". - ctx.expand_make_variables is deprecated. - Bazel posts links to the CAS to the BEP if remote caching / execution is enabled - `bazel info execution_root` returns the corrrect directory name for the execution root.
Closing because it's obsolete with Bazel 0.5.2 being released and a version with bundled OpenJDK 8 being available. @GinFungYJF Please let us know if the version with bundled OpenJDK 8 is not usable for you. We would really like to get Bazel to work for you. |
Description of the problem / feature request / question:
After I installed bazel successfullu by using binary installer(bazel-0.5.0-jdk7-installer-linux-x86_64.sh), I have an error when I run any bazel command. And the 0.5.1-jdk7 has the same error.
If possible, provide a minimal example to reproduce the problem:
Environment info
Operating System:
ubuntu14.04
Bazel version (output of
bazel info release
):0.5.0 or 0.5.1
If
bazel info release
returns "development version" or "(@non-git)", please tell us what source tree you compiled Bazel from; git commit hash is appreciated (git rev-parse HEAD
):Running
bazel info release
shows the same error.Have you found anything relevant by searching the web?
(e.g. StackOverflow answers,
GitHub issues,
email threads on the
bazel-discuss
Google group)No.
The text was updated successfully, but these errors were encountered: