mirror of
https://github.com/google/brotli.git
synced 2026-07-08 17:56:58 +00:00
Would it be possbile to include the .dlls in the binary download? #196
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @buletti on GitHub (Sep 29, 2017).
Hi,
would it be possible to include the .dll files in the binary downloads for Windows?
The .dlls are kind of needed to make the JNI wrappers work. This is especially a problem for the encoder as there is no Java implementation (which is a huge adoption problem IMHO).
I already tried to build the .dlls myself with CMake and MinGW, but I was not able to make the JNI encoder wrapper work with them. I always got an UnsatisfiedLinkError on instantiation with libbrotlicommon.dll and libbrotlienc.dll loaded.
I suspect it has to do with gcc using symbols incompatible with JNI and me not able to make CMake to do the right thing.
Anyways, it would be nice if we could have the Windows libs along with the executable similar to the other platforms.
@eustas commented on GitHub (Sep 29, 2017):
Going to investigate and extend binary downloads soon.
Yes, JNI is always a pain.
Bazel was a big hope, as it, at least, works both on OSX and linux (still not on windows)... but even on those platforms, JNI requires hacks: https://github.com/bazelbuild/bazel/issues/3079
@eustas commented on GitHub (Oct 9, 2017):
Working on this.
In the meanwhile, just to be sure: have you built jni library, or just brotli common/dec/enc libraries? Currently only Bazel builds it, so CMake/premake/make is not enough...
@buletti commented on GitHub (Oct 9, 2017):
I was not using Bazel. I was basically just following the build instructions of the readme.md for CMake.
I got the following .dlls as a result:
However, when the JNI calls to those .dlls failed with the above
UnsatisfiedLinkErrorI tried to addCMAKE_CXX_FLAGS=-D_JNI_IMPLEMENTATION_ -Wl,--kill-atand to include the JAVA headers
CMAKE_CXX_STANDARD_LIBRARIES=-I %JAVA_HOME%\include -I %JAVA_HOME%\include\win32Anyways the result was the same.
Thank you very much for looking into the matter.
@eustas commented on GitHub (Oct 10, 2017):
Those libraries are not enough. Going to add "all-in-one" statically linked
brotli_jni.dllas soon as convince bazel to run tests properly on Appveyor.@eustas commented on GitHub (Oct 11, 2017):
PR #612 adds brotli_jni.dll publishing.
@eustas commented on GitHub (Oct 12, 2017):
Could you try if this precompiled brotli_jni.dll works for you, please. Thanks.
@buletti commented on GitHub (Oct 13, 2017):
Yep, seems to work fine. Thanks!
@buletti commented on GitHub (Oct 13, 2017):
Another quick question: I don't see JNI builds for platforms other than Windows at bintray:
Do other platforms not need separate JNI libraries? E.g. can I use
libbrotlicommon.so+libbrotlienc.soon Linux for JNI calls to the encoder?