GooBox / goobox-sync-storj

Sync app for Storj
GNU General Public License v3.0
3 stars 1 forks source link

Missing a library file in Linux package #127

Closed jkawamoto closed 5 years ago

jkawamoto commented 6 years ago

Related to this issue https://github.com/GooBox/goobox-community-gui/issues/138, the GUI reported this error:

[03:33:42.331] [verbose] [main] DEBUG net.harawata.appdirs.AppDirsFactory - os.name linux is resolved to *nix
[03:33:42.332] [verbose] SLF4J: A number (1) of logging calls during the initialization phase have been intercepted and are
[03:33:42.333] [verbose] SLF4J: now being replayed. These are subject to the filtering rules of the underlying logging system.
[03:33:42.334] [verbose] SLF4J: See also http://www.slf4j.org/codes.html#replay
[03:33:42.363] [verbose] Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/.mount_Goobox7MTPMb/resources/app/goobox-sync-storj/libstorj-java.so: libgcrypt.so.11: cannot open shared object file: No such file or directory
[03:33:42.365] [verbose]    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
[03:33:42.366] [verbose]    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
[03:33:42.367] [verbose]    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
[03:33:42.368] [verbose]    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
[03:33:42.368] [verbose]    at java.lang.System.loadLibrary(System.java:1122)
[03:33:42.369] [verbose]    at io.storj.libstorj.Storj.loadLibrary(Storj.java:425)
[03:33:42.370] [verbose]    at io.storj.libstorj.Storj.<clinit>(Storj.java:409)
[03:33:42.371] [verbose]    at io.goobox.sync.storj.App.init(App.java:150)
[03:33:42.372] [verbose]    at io.goobox.sync.storj.App.main(App.java:106)

It seems like libgcrypt.so.11 is missing.

AlexeyALeonov commented 6 years ago

I have the same issue

jkawamoto commented 6 years ago

Actually, https://github.com/storj/java-libstorj seems to miss the shared library because sync-storj just imports those libraries from their archive file. I opened an issue https://github.com/storj/java-libstorj/issues/24.

jasonwee commented 6 years ago

During initially investigate this project, I have placed built libstorj-java.so into my eclipse project at the following path and if you run the command ldd

user@localhost:~$ ldd ./target/classes/linux/libstorj-java.so
    linux-vdso.so.1 (0x00007ffe97f89000)
    libstorj.so.2 => /usr/local/lib/libstorj.so.2 (0x00007f2d2ff9c000)
    libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007f2d2fd16000)
    libjson-c.so.3 => /lib/x86_64-linux-gnu/libjson-c.so.3 (0x00007f2d2fb0b000)
    libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f2d2f8d4000)
    libuv.so.1 => /usr/lib/x86_64-linux-gnu/libuv.so.1 (0x00007f2d2f8a7000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f2d2f724000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f2d2f58e000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f2d2f574000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f2d2f3b7000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2d2f396000)
    libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f2d2f170000)
    libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f2d2ef53000)
    librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f2d2ed34000)
    libssh2.so.1 => /usr/lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f2d2ed06000)
    libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f2d2eaf5000)
    libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f2d2e988000)
    libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f2d2e73c000)
    libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f2d2e461000)
    libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f2d2e22d000)
    libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f2d2e227000)
    libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f2d2dfd5000)
    liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f2d2ddc6000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f2d2dba8000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f2d2db9e000)
    libnsl.so.1 => /lib/x86_64-linux-gnu/libnsl.so.1 (0x00007f2d2db83000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2d2db7e000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f2d30425000)
    libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f2d2d9fa000)
    libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f2d2d7c4000)
    libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f2d2d540000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f2d2d222000)
    libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f2d2cef5000)
    libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f2d2cce2000)
    libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f2d2cad6000)
    libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f2d2cad0000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f2d2cab7000)
    libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f2d2c89a000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f2d2c878000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f2d2c66f000)
user@localhost:~$ ldd ./target/classes/linux/libstorj-java.so | grep libgcrypt.so
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fd0605f3000)
user@localhost:~$ dpkg -S /lib/x86_64-linux-gnu/libgcrypt.so.20
libgcrypt20:amd64: /lib/x86_64-linux-gnu/libgcrypt.so.20
user@localhost:~$ apt-cache show libgcrypt20
Package: libgcrypt20
Version: 1.8.3-1
Installed-Size: 1333
Maintainer: Debian GnuTLS Maintainers <pkg-gnutls-maint@lists.alioth.debian.org>
Architecture: amd64
Depends: libc6 (>= 2.15), libgpg-error0 (>= 1.25)
Suggests: rng-tools
Description-en: LGPL Crypto library - runtime library
 libgcrypt contains cryptographic functions.  Many important free
 ciphers, hash algorithms and public key signing algorithms have been
 implemented:
 .
 Arcfour, Blowfish, CAST5, DES, AES, Twofish, Serpent, rfc2268 (rc2), SEED,
 Poly1305, Camellia, ChaCha20, IDEA, Salsa, Blake-2, CRC, MD2, MD4, MD5,
 RIPE-MD160, SHA-1, SHA-256, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512,
 SHAKE128, SHAKE256, Tiger, Whirlpool, DSA, DSA2, ElGamal, RSA, ECC
 (Curve25519, sec256k1, GOST R 34.10-2001 and GOST R 34.10-2012, etc.)
Description-md5: e8ab63c6be1944ea9efde5248663f053
Multi-Arch: same
Homepage: https://directory.fsf.org/project/libgcrypt/
Tag: role::shared-lib
Section: libs
Priority: optional
Filename: pool/main/libg/libgcrypt20/libgcrypt20_1.8.3-1_amd64.deb
Size: 554212
MD5sum: b09c687de14729fd6db33d6da9dcace6
SHA256: 462dc46da76c2ae25bae40cfdf15f3e9c9ed91de3f7ed9a36bb36c02dd9dc4df

this means the library libstorj-java.so require another library libgcrypt.so.20, which can be install as a dependency package. In debian, it is libgcrypt20

jkawamoto commented 5 years ago

I'll close this issue although it's not fixed because java-libstorj was archived and storj/java-libstorj#24 won't be fixed.