Repository navigation
Closed
Description
Description of the problem / feature request:
Bazel fails to compile @com_google_protobuf//:protobuf_java_util with both --javacopt='--release 8' and --java_header_compilation.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
$ git clone https://github.com/google/protobuf.git
$ cd protobuf
$ bazel build --javacopt='--release 8' //:protobuf_java_util
INFO: Analysed target //:protobuf_java_util (0 packages loaded).
INFO: Found 1 target...
ERROR: /usr/local/google/home/schroederc/protobuf/BUILD:609:1: Compiling Java headers libprotobuf_java-hjar.jar (79 files) failed (Exit 1)
An exception has occurred in turbine.
com.google.turbine.diag.TurbineError: java/core/src/main/java/com/google/protobuf/UnsafeUtil.java:407: error: could not resolve sun.misc.Unsafe
MemoryAccessor(sun.misc.Unsafe unsafe) {
^
at com.google.turbine.diag.TurbineError.format(TurbineError.java:99)
at com.google.turbine.binder.TypeBinder.error(TypeBinder.java:698)
at com.google.turbine.binder.TypeBinder.bindClassTy(TypeBinder.java:636)
at com.google.turbine.binder.TypeBinder.bindTy(TypeBinder.java:606)
at com.google.turbine.binder.TypeBinder.bindMethod(TypeBinder.java:456)
at com.google.turbine.binder.TypeBinder.bindMethods(TypeBinder.java:408)
at com.google.turbine.binder.TypeBinder.bind(TypeBinder.java:218)
at com.google.turbine.binder.TypeBinder.bind(TypeBinder.java:134)
at com.google.turbine.binder.Binder.bindTypes(Binder.java:232)
at com.google.turbine.binder.Binder.bind(Binder.java:103)
at com.google.turbine.main.Main.compile(Main.java:96)
at com.google.devtools.build.java.turbine.Turbine.compile(Turbine.java:75)
at com.google.devtools.build.java.turbine.Turbine.compile(Turbine.java:67)
at com.google.devtools.build.java.turbine.Turbine.main(Turbine.java:46)
Target //:protobuf_java_util failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 5.598s, Critical Path: 5.43s
INFO: 0 processes.
FAILED: Build did NOT complete successfully
$ bazel build --javacopt='--release 8' --nojava_header_compilation //:protobuf_java_util
INFO: Build options have changed, discarding analysis cache.
INFO: Analysed target //:protobuf_java_util (0 packages loaded).
INFO: Found 1 target...
Target //:protobuf_java_util up-to-date:
bazel-bin/libprotobuf_java_util.jar
INFO: Elapsed time: 1.000s, Critical Path: 0.60s
INFO: 2 processes: 1 linux-sandbox, 1 worker.
INFO: Build completed successfully, 4 total actions
What operating system are you running Bazel on?
x86_64 GNU/Linux
What's the output of bazel info release?
release 0.16.0
What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?
https://github.com/google/protobuf.git
3d62db3ecd5377025a458bca827ab4ca12d5c1f0
3d62db3ecd5377025a458bca827ab4ca12d5c1f0
Metadata
Metadata
Assignees
Labels
No labels
Activity
cushon commentedon Aug 3, 2018
The stack trace is not very friendly, but this is not an issue with Bazel or turbine. The
--releaseflag only provides access to the public documented APIs for JDK 8, see: JDK-8206937