luben / zstd-jni

JNI binding for Zstd
Other
854 stars 168 forks source link

Support Windows Aarch64 #238

Closed VladRassokhin closed 10 months ago

VladRassokhin commented 1 year ago

/win/aarch64/libzstd-jni-1.5.2-5.dll or load zstd-jni-1.5.2-5 from system libraries

I've tried to build it myself, without Windows ARM64 host using msvc crosscompiling (I don't have W11 ARM64 hosts with MSVC). Unfortunately failed to do that with sbt (I don't understand that tool at all). Ended up with cmd + CMake here: https://github.com/VladRassokhin/zstd-jni/tree/windows-aarch64.
Not going to submit PR as it's obviously incompatible with current project structure.

Here's artifact is someone needs it (built against 1.5.2-5 as you guess form version): https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/org/jetbrains/intellij/deps/zstd-jni-windows-aarch64/1.5.2-5-25/zstd-jni-windows-aarch64-1.5.2-5-25.jar

Later, I've tested that it works on Windows ARM64 machines (our build agents).

luben commented 1 year ago

That's interesting approach. I am relying on the github CI runners to build the Windows binaries. I may try your approach - just cross-compiling the native library there. I will most probably not reuse the same CMake as this one is used for the android build.

rubin55 commented 1 year ago

Would be great if this can get done, I was just doing some work on Kafka on a Surface Pro X and noted that many tests depend on zstd-jni, which fail, I suspect, because zstd-jni can't load on this platform (using Microsoft JDK 17, aarch64).

luben commented 11 months ago

One complication is that for our build we don't use the MSVC but the MSYS2 (gcc). Looks like GitHub won't also provide Win/aarch64 workers as there is not aarch64 Windows server build:

https://github.com/actions/runner-images/issues/768

luben commented 11 months ago

@VladRassokhin , @rubin55 , I have just published zstd-jni-1.5.5-7. I have added win/aarch64 artifact (cross-compiled with clang). I am not sure if it works or not as I cannot test it. Can you please check if it's working or not?

luben commented 11 months ago

released v1.5.5-8 as there was an issue with the OSGI version, please test that

luben commented 10 months ago

@Bixilon, can you test the latest versions - I added support for win-aarch64 through cross compilation. I am not sure if it works through

Bixilon commented 10 months ago

Hi @luben, actually I do not own such a device myself, I was asked by someone to port one of my applications to aarch64 and zstd is sadly just the half that blocks it. I still need one other native library to be ported. But headless mode should work now. I can redirect this issue.

But thanks for implementing it!

luben commented 10 months ago

Great, thanks for the confirmation. Closing it as success. If there are any issues I will follow up.