--
You received this message because you are subscribed to the Google Groups "Bazel/JVM Special Interest Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-sig-jv...@googlegroups.com.
To post to this group, send email to bazel-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOu%2B0LUNFHgb%2BpX2WV5F-sTpx0V7tSVzZsDLUeMp2m0zL9uG6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Bazel's java_binary rule arranges for the java.library.path Java system
property to include all directories containing native libraries that a binary
depends on. This allows Java libraries to load native library dependencies
using System.loadLibrary(). At Two Sigma we have very widely used Java
libraries that dynamically load C shared libraries to implement authentication,
RPC, etc.
If the above described functionality went away, I think we would have to run
all of our applications using some sort of wrapper script. Although we may be
able to use an aspect to discover what native libraries a binary depends on in
order to set java.library.path ourselves, we also need the functionality in the
pull request I submitted. That change sets LD_LIBRARY_PATH to the same set of
directories as java.library.path, so that native libraries with dependencies on
other native shared libraries can be loaded by Java.
I'd prefer Bazel to have good built-in support for Java binaries that depend on
native shared libraries. It would seem to be a fairly common need. Also, I
would expect to see a similar need with Python binaries that depend on native
shared libraries. This kind of Bazel feature is more important outside of
Google, where it's much more common to use native libraries compiled by others,
instead of building all artifacts from source code.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/c68655e07c874317a02a94f201b4bbb2%40EXMBNJE6.ad.twosigma.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-sig-jvm/CAOu%2B0LWkRLWj2WJvW3_xZGTsDPPat%3DSmfV%2Bj66k2Deb08aNGKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.