Closed perezd closed 6 years ago
Sounds like an issue with sandboxing. Try the build with --sandbox_debug
and see if external/local_jdk/bin/java
shows up in the list of mounted paths. If that is the problem, I think adding @local_jdk//:java
to your deps is the right solution.
OK, but this is actually a bug, right? genrule variables say $(JAVA) should be available.
I'm currently blocked by: #965 so I can't diagnose this further at this time.
You probably need to declare a java_binary rule with the classes you want to run and use that in the genrule with $(location).
If the genrule docs say $(JAVA) works, then they are mistaken.
I did as you recommended and now I get this error: external/local_jdk/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
That looks like #631, which means you need to add @local_jdk//:jdk
to the deps too.
Is this still an issue. There seems to be a few other related items that have been resolved over time.
If I use
$(JAVA)
in thecmd
of agenrule
, I get the following error:However, if I copy/paste the command generated by
--verbose_failures
, the command actually does work and finds that properly.I am in Ubuntu linux, with Bazel 0.1.5. Current lame workaround is to use /usr/bin/java, which does work. Thoughts?