xerial / snappy-java

Snappy compressor/decompressor for Java
Apache License 2.0
1.02k stars 233 forks source link

sparcv9 shared object is missing (64 bit) #99

Open zolyfarkas opened 9 years ago

RickPoleshuck commented 9 years ago

It is 2015, we should be supporting 64bit on all environments

xerial commented 9 years ago

I'll welcome your contribution. If you have a Solaris platform, please build native library and send a PR!

zolyfarkas commented 9 years ago

Hi, I have built a so that even works, can you let me know where do you want it?

xerial commented 9 years ago

After make (or gmake in Solaris), the following folder contains newly built native libraries. https://github.com/xerial/snappy-java/tree/develop/src/main/resources/org/xerial/snappy/native

I guess there exists SunOS/sparcv9 folder. Please send its contents as a pull request.

Thanks in advance.

vharseko commented 9 years ago

https://github.com/xerial/snappy-java/pull/112

xerial commented 9 years ago

This will be available in the next release.

xerial commented 9 years ago

Reopened since #112 doesn't work.

jaycehong commented 5 years ago

hello, i tried to download https://github.com/xerial/snappy-java/tree/14a82e8dacf935c29b51d036ac46e1b020b1f41c/src/main/resources/org/xerial/snappy/native/SunOS/sparcv9 than relly created .so file, but it seemed still doesn't work on my 64bit sparcv9 server. any other way out, THX?@xerial @vharseko

kjchernov commented 1 year ago

Managed to compile on Solaris 11.4 with headers from Java 11

Tested with kafka. Not sure that all the features works well.

Steps to reproduce:

chernov@helix:~/pub$ git clone https://github.com/xerial/snappy-java.git                                                                                                       Cloning into 'snappy-java'...
remote: Enumerating objects: 7897, done.
remote: Counting objects: 100% (196/196), done.
remote: Compressing objects: 100% (103/103), done.
remote: Total 7897 (delta 74), reused 172 (delta 63), pack-reused 7701
Receiving objects: 100% (7897/7897), 33.26 MiB | 9.73 MiB/s, done.
Resolving deltas: 100% (2913/2913), done.
chernov@helix:~/pub$ cd snappy-java/
chernov@helix:~/pub/snappy-java$ curl 'https://codeload.github.com/google/snappy/tar.gz/refs/tags/1.1.9' -o snappy-1.1.9.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1076k  100 1076k    0     0  1084k      0 --:--:-- --:--:-- --:--:-- 1085k
chernov@helix:~/pub/snappy-java$ curl 'https://codeload.github.com/kiyo-masui/bitshuffle/tar.gz/refs/tags/0.4.2' -o bitshuffle-0.4.2.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  183k    0  183k    0     0   220k      0 --:--:-- --:--:-- --:--:--  221k
chernov@helix:~/pub/snappy-java$ tar -xf snappy-1.1.9.tar.gz 
chernov@helix:~/pub/snappy-java$ tar -xf bitshuffle-0.4.2.tar.gz 
chernov@helix:~/pub/snappy-java$ g++ -m64 -include lib/inc_linux/jni_md.h -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris -Ibitshuffle-0.4.2/src -olibsnappyjava.so src/main/java/org/xerial/snappy/{SnappyNative.cpp,BitShuffleNative.cpp} bitshuffle-0.4.2/src/{bitshuffle_core.c,iochain.c} snappy-1.1.9/{snappy-sinksource.cc,snappy-stubs-internal.cc,snappy-c.cc,snappy.cc} -fPIC -O2 -shared -o libsnappyjava.so
chernov@helix:~/pub/snappy-java$ ldd libsnappyjava.so 
        libstdc++.so.6 =>        /usr/lib/64/libstdc++.so.6
        libm.so.2 =>     /lib/64/libm.so.2
        libgcc_s.so.1 =>         /usr/lib/64/libgcc_s.so.1
        libc.so.1 =>     /lib/64/libc.so.1
chernov@helix:~/pub/snappy-java$ file libsnappyjava.so 
libsnappyjava.so:       ELF 64-bit MSB dynamic lib SPARCV9 Version 1, dynamically linked, not stripped, no debugging information available
chernov@helix:~/pub/snappy-java$ uname -a
SunOS helix 5.11 11.4.41.107.2 sun4v sparc sun4v logical-domain

ZIP with libsnappyjava.so: libsnappyjava.zip