Skip to content
This repository has been archived by the owner on May 3, 2022. It is now read-only.

Cannot build greeter tensorboard #37

Closed
ArthurJrn opened this issue Dec 3, 2018 · 2 comments
Closed

Cannot build greeter tensorboard #37

ArthurJrn opened this issue Dec 3, 2018 · 2 comments

Comments

@ArthurJrn
Copy link
Contributor

ArthurJrn commented Dec 3, 2018

Hi,

I have an issue with the building of the plugin example you explain in your README file.
I have installed Bazel. Bazel version is 0.20.0, java -version 1.8.0_191.

When I try to run 'bazel run //greeter_plugin:greeter_demo', I get the output
INFO: Invocation ID: 8601dacc-fed6-44e0-9a7b-60a128cc9f39 ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement. Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule. ERROR: error loading package '': Encountered error while reading extension file 'closure/defs.bzl': no such package '@io_bazel_rules_closure//closure': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement. Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule. INFO: Elapsed time: 3.291s INFO: 0 processes. FAILED: Build did NOT complete successfully (0 packages loaded) FAILED: Build did NOT complete successfully (0 packages loaded) Fetching @io_bazel_rules_closure; fetching

So i tried to run with '--incompatible_remove_native_http_archive=false' as suggested, but then the secon command 'bazel run //greeter_tensorboard -- --logdir=/tmp/greeter_demo' failed again. I used the ''--incompatible_remove_native_http_archive=false' as suggested again, but build failed once again with ouput :

ERROR: /home/arthur/.cache/bazel/_bazel_arthur/e30b614ea0e301590f4fb76ff97dfe1d/external/io_bazel_rules_closure/java/io/bazel/rules/closure/webfiles/compiler/BUILD:17:1: Building external/io_bazel_rules_closure/java/io/bazel/rules/closure/webfiles/compiler/libcompiler.jar (1 source file) and running annotation processors (ComponentProcessor) failed (Exit 1) java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/annotation/Generated at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:158) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90) at com.google.devtools.build.buildjar.javac.BlazeJavacMain.compile(BlazeJavacMain.java:114) at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder$1.invokeJavac(SimpleJavaLibraryBuilder.java:106) at com.google.devtools.build.buildjar.ReducedClasspathJavaLibraryBuilder.compileSources(ReducedClasspathJavaLibraryBuilder.java:54) at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder.compileJavaLibrary(SimpleJavaLibraryBuilder.java:109) at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder.run(SimpleJavaLibraryBuilder.java:117) at com.google.devtools.build.buildjar.BazelJavaBuilder.processRequest(BazelJavaBuilder.java:105) at com.google.devtools.build.buildjar.BazelJavaBuilder.runPersistentWorker(BazelJavaBuilder.java:67) at com.google.devtools.build.buildjar.BazelJavaBuilder.main(BazelJavaBuilder.java:45) Caused by: java.lang.NoClassDefFoundError: javax/annotation/Generated at dagger.internal.codegen.SourceFileGenerator.<clinit>(SourceFileGenerator.java:43) at dagger.internal.codegen.ComponentProcessor.initSteps(ComponentProcessor.java:119) at dagger.shaded.auto.common.BasicAnnotationProcessor.init(BasicAnnotationProcessor.java:119) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:675) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:774) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:869) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:108) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1206) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1315) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1246) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:922) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142) ... 10 more Caused by: java.lang.ClassNotFoundException: javax.annotation.Generated at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 23 more Target //greeter_tensorboard:greeter_tensorboard failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 147.674s, Critical Path: 54.61s INFO: 275 processes: 268 linux-sandbox, 7 worker. FAILED: Build did NOT complete successfully FAILED: Build did NOT complete successfully

This error seems to be related to #31 however the fix proposed didn't work for me. I am not familiar with Bazel, I would appreciate some help if someone has an idea!

Sincerely,
Arthur Journe

'

@stephanwlee
Copy link
Contributor

Hi @ArthurJrn, please downgrade to Bazel 0.19 for now.

Bazel 0.20 made some backwards incompatible change and their rules are not updated accordingly yet. Bugs to follow:
bazelbuild/rules_closure#311
bazelbuild/rules_webtesting#316

@ArthurJrn ArthurJrn changed the title Cannot buil greeter tensorboard Cannot build greeter tensorboard Dec 4, 2018
@ArthurJrn
Copy link
Contributor Author

ArthurJrn commented Dec 4, 2018

Thanks for the quick answer. I downgraded to 0.19.2 and it fixed the '--incompatible_remove_native_http_archive=false' issue. However, my build still fails with output:

ERROR: /home/arthur/.cache/bazel/_bazel_arthur/e30b614ea0e301590f4fb76ff97dfe1d/external/io_bazel_rules_closure/java/io/bazel/rules/closure/webfiles/compiler/BUILD:17:1: Building external/io_bazel_rules_closure/java/io/bazel/rules/closure/webfiles/compiler/libcompiler.jar (1 source file) and running annotation processors (ComponentProcessor) failed (Exit 1): java failed: error executing command (cd /home/arthur/.cache/bazel/_bazel_arthur/e30b614ea0e301590f4fb76ff97dfe1d/execroot/io_github_tensorflow_tensorboard_plugin_example && \ exec env - \ LC_CTYPE=en_US.UTF-8 \ external/embedded_jdk/bin/java -XX:+UseParallelOldGC -XX:-CompactStrings '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED' '--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED' '--patch-module=java.compiler=external/bazel_tools/third_party/java/jdk/langtools/java_compiler.jar' '--patch-module=jdk.compiler=external/bazel_tools/third_party/java/jdk/langtools/jdk_compiler.jar' '--add-opens=java.base/java.nio=ALL-UNNAMED' '--add-opens=java.base/java.lang=ALL-UNNAMED' -jar external/bazel_tools/tools/jdk/JavaBuilder_deploy.jar @bazel-out/host/bin/external/io_bazel_rules_closure/java/io/bazel/rules/closure/webfiles/compiler/libcompiler.jar-0.params) java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/annotation/Generated at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:158) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90) at com.google.devtools.build.buildjar.javac.BlazeJavacMain.compile(BlazeJavacMain.java:111) at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder$1.invokeJavac(SimpleJavaLibraryBuilder.java:106) at com.google.devtools.build.buildjar.ReducedClasspathJavaLibraryBuilder.compileSources(ReducedClasspathJavaLibraryBuilder.java:54) at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder.compileJavaLibrary(SimpleJavaLibraryBuilder.java:109) at com.google.devtools.build.buildjar.SimpleJavaLibraryBuilder.run(SimpleJavaLibraryBuilder.java:117) at com.google.devtools.build.buildjar.BazelJavaBuilder.processRequest(BazelJavaBuilder.java:105) at com.google.devtools.build.buildjar.BazelJavaBuilder.runPersistentWorker(BazelJavaBuilder.java:67) at com.google.devtools.build.buildjar.BazelJavaBuilder.main(BazelJavaBuilder.java:45) Caused by: java.lang.NoClassDefFoundError: javax/annotation/Generated at dagger.internal.codegen.SourceFileGenerator.<clinit>(SourceFileGenerator.java:43) at dagger.internal.codegen.ComponentProcessor.initSteps(ComponentProcessor.java:119) at dagger.shaded.auto.common.BasicAnnotationProcessor.init(BasicAnnotationProcessor.java:119) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:675) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:774) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:869) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:108) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1206) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1315) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1246) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:922) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142) ... 10 more Caused by: java.lang.ClassNotFoundException: javax.annotation.Generated at java.base/java.net.URLClassLoader.findClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 23 more Target //greeter_tensorboard:greeter_tensorboard failed to build

I am digging into the issues you linked, hopefully I will find a fix!

EDIT: Found the right fix in #31 by updating the repositories.bzl file for Dagger.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants