Error to build Bazel

Hello there,

I want to build bazel on my Xavier followed the link as https://docs.nvidia.com/isaac/isaac/doc/setup.html#bazel. However it always encounters the same problem! Anyone has the solution?

[code]bash compile.sh

What is the problem / error you encounter?

Sorry, the code block has been truncated! Below is error.

I installed openjdk 8 for ubuntu 18.04 however Xavier tries to use jdk 8?

bash compile.sh 
Building Bazel from scratch......
Building Bazel with Bazel.
.WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil (file:/tmp/bazel_eOvn2ErA/archive/libblaze.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
INFO: Analysed target //src:bazel_nojdk (233 packages loaded, 10268 targets configured).
INFO: Found 1 target...
INFO: From SkylarkAction tools/jdk/platformclasspath.jar [for host]:
warning: could not find a JDK 8 bootclasspath in external/embedded_jdk, falling back to --release
INFO: From SkylarkAction tools/jdk/platformclasspath.jar:
warning: could not find a JDK 8 bootclasspath in external/local_jdk, falling back to --release
INFO: From Generating Java (Immutable) proto_library @googleapis//:google_bytestream_bytestream_proto:
google/bytestream/bytestream.proto: warning: Import google/protobuf/wrappers.proto but not used.
INFO: From Generating Java (Immutable) proto_library @googleapis//:google_devtools_build_v1_build_events_proto:
google/devtools/build/v1/build_events.proto: warning: Import google/rpc/status.proto but not used.
INFO: From SkylarkAction external/googleapis/google_bytestream_bytestream_java_grpc_srcs.jar:
google/bytestream/bytestream.proto: warning: Import google/protobuf/wrappers.proto but not used.
INFO: From JavacBootstrap src/main/java/com/google/devtools/build/lib/shell/libshell-skylark.jar [for host]:
warning: Implicitly compiled files were not subject to annotation processing.
  Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation.
1 warning
INFO: From JavacBootstrap src/java_tools/singlejar/java/com/google/devtools/build/singlejar/libbootstrap.jar [for host]:
warning: Implicitly compiled files were not subject to annotation processing.
  Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation.
1 warning
INFO: From JavacBootstrap src/java_tools/buildjar/java/com/google/devtools/build/buildjar/libskylark-deps.jar [for host]:
warning: Implicitly compiled files were not subject to annotation processing.
  Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
INFO: From JavacBootstrap src/java_tools/buildjar/java/com/google/devtools/build/buildjar/libbootstrap_VanillaJavaBuilder.jar [for host]:
warning: Implicitly compiled files were not subject to annotation processing.
  Use -proc:none to disable annotation processing or -implicit to specify a policy for implicit compilation.
Note: src/java_tools/buildjar/java/com/google/devtools/build/buildjar/VanillaJavaBuilder.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 warning
INFO: From Generating Java (Immutable) proto_library //src/main/protobuf:desugar_deps_proto:
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/compiler/java/java_file.cc:228] The optimize_for = LITE_RUNTIME option is no longer supported by protobuf Java code generator and may generate broken code. It will be ignored by protoc in the future and protoc will always generate full runtime code for Java. To use Java Lite runtime, users should use the Java Lite plugin instead. See:
  https://github.com/google/protobuf/blob/master/java/lite.md
ERROR: /home/nvidia/bazel-0.19.2-dist/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/BUILD:15:1: Building src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/libdependency.jar (3 source files) and running annotation processors (AutoAnnotationProcessor, AutoValueProcessor) failed (Exit 1): java failed: error executing command 
  (cd /tmp/bazel_eOvn2ErA/out/execroot/io_bazel && \
  exec env - \
    LC_CTYPE=en_US.UTF-8 \
  external/embedded_jdk/bin/java -Xmx512m -XX:+TieredCompilation '-XX:TieredStopAtLevel=1' -jar bazel-out/host/bin/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/bootstrap_VanillaJavaBuilder_deploy.jar @bazel-out/aarch64-opt/bin/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/libdependency.jar-0.params)
src/java_tools/buildjar/java/com/google/devtools/build/buildjar/javac/plugins/dependency/StrictJavaDepsPlugin.java:180: error: incompatible types: int cannot be converted to com.sun.tools.javac.code.Lint.LintCategory
note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
Target //src:bazel_nojdk failed to build
INFO: Elapsed time: 1370.193s, Critical Path: 310.46s, Remote (0.00% of the time): [queue: 0.00%, setup: 0.00%, process: 0.00%]
INFO: 1077 processes: 884 local, 193 worker.
FAILED: Build did NOT complete successfully

ERROR: Could not build Bazel

I could not use

sudo apt-get install bazel

to install.

You won’t be able to use bazel directly on the Xavier, you need to use an x64 base station with ubuntu 18.04 to build and deploy your applications to the Xavier.