Compillation error in AndroidResourceProcessor.java
Trying to build rev. effa572. Is there actually a way to turn Android part off?
INFO: From Building src/tools/android/java/com/google/devtools/build/android/libandroid_builder_lib.jar (18 files):
src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java:323: error: incompatible types: StringBuilder cannot be converted to StringBuffer
idMatcher.appendReplacement(resourceIds, String.format("public static int %s=0x%08X;",
^
src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java:326: error: incompatible types: StringBuilder cannot be converted to StringBuffer
idMatcher.appendTail(resourceIds);
^
src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java:327: error: incompatible types: StringBuilder cannot be converted to StringBuffer
innerClassMatcher.appendReplacement(out,
^
src/tools/android/java/com/google/devtools/build/android/AndroidResourceProcessor.java:330: error: incompatible types: StringBuilder cannot be converted to StringBuffer
innerClassMatcher.appendTail(out);
^
Note: src/tools/android/java/com/google/devtools/build/android/ResourceShrinker.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
4 errors
BazelJavaBuilder threw exception: java compilation returned status ERROR
ERROR: /usr/ports/devel/bazel/work/bazel-effa572/src/tools/android/java/com/google/devtools/build/android/BUILD:35:1: Java compilation in rule '//src/tools/android/java/com/google/devtools/build/android:android_builder_lib' failed: java failed: error executing command external/local-jdk/bin/java -Xbootclasspath/p:external/bazel_tools/third_party/java/jdk/langtools/javac.jar -client -jar bazel-out/host/bin/src/java_tools/buildjar/bootstrap_deploy.jar ... (remaining 1 argument(s) skipped): Worker process sent response with exit code: 1.
Does 0e72b69d0df6924537e8c4dd996c10c53586902c fix this?
The previous error is gone, but another one surfaced:
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release
import sun.misc.Signal;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release
import sun.misc.SignalHandler;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release
import sun.misc.Signal;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release
import sun.misc.SignalHandler;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release
import sun.misc.Signal;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release
import sun.misc.SignalHandler;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:19: warning: Signal is internal proprietary API and may be removed in a future release
import sun.misc.Signal;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:20: warning: SignalHandler is internal proprietary API and may be removed in a future release
import sun.misc.SignalHandler;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:32: warning: Signal is internal proprietary API and may be removed in a future release
private static final Signal SIGINT = new Signal("INT");
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:32: warning: Signal is internal proprietary API and may be removed in a future release
private static final Signal SIGINT = new Signal("INT");
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:34: warning: SignalHandler is internal proprietary API and may be removed in a future release
private SignalHandler oldHandler;
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:42: warning: SignalHandler is internal proprietary API and may be removed in a future release
this.oldHandler = Signal.handle(SIGINT, new SignalHandler() {
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:44: warning: Signal is internal proprietary API and may be removed in a future release
public void handle(Signal signal) {
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:42: warning: Signal is internal proprietary API and may be removed in a future release
this.oldHandler = Signal.handle(SIGINT, new SignalHandler() {
^
src/main/java/com/google/devtools/build/lib/server/signal/InterruptSignalHandler.java:55: warning: Signal is internal proprietary API and may be removed in a future release
Signal.handle(SIGINT, oldHandler);
^
src/main/java/com/google/devtools/build/lib/rules/objc/PlMergeControlBytes.java:67: error: cannot find symbol
control.putAllVariableSubstitutionMap(bundling.variableSubstitutions());
^
symbol: method putAllVariableSubstitutionMap(Map<String,String>)
location: variable control of type Builder
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
15 warnings
*** Error code 1
Stop.
make[1]: stopped in /usr/ports/devel/bazel
*** Error code 1
Stop.
make: stopped in /usr/ports/devel/bazel
I had 0.1.1 building fine. But 0.1.2 and any revision after this that I tries always failes in one way or another for some reason.
The missing putAllVariableSubstitutionMap method is auto-generated code from a protobuf. I'm not sure what's going on here.
@calpeyser just updated our protobuf compilers, perhaps that changed this?
I got rid of the problem by updating to the latest beta of the protobuf.
I think @calpeyser didn't update to a new enough version of protobuf before relying on a new feature in 4bd593aa.
Why don't you make it the git submodule with an explicit revision there? Instead, your directory is full of .exe files. -) .exe files in repositories aren't generally a good thing.
@bsilver8192 that makes a lot of sense. The "putAll" method for maps wasn't in the protobuf implementation we had checked in until https://github.com/bazelbuild/bazel/commit/4731d5a41c0d376c2f43cfbd1437598815f77ed0
However, with that commit, the call should work.
This breakage is a bit surprising to me.
I had to run compile.sh in order to build. Building Bazel with an older version of Bazel fails in this case. Does that mean that bazel is packaged with protobuf compiler?
Yes, we bundle statically compiled binaries of protoc with Bazel:
https://github.com/bazelbuild/bazel/tree/master/third_party/protobuf
Yes, that was the problem. I forgot about the embedded @bazel_tools repository and was assuming it must be using the version from the repository.