#library "libgcc_s.so.1" not found in a java program

25 messages · Page 1 of 1 (latest)

proven ridge
#

I am trying to use Piped-Backend here
I cloned the repo, ran ./gradlew shadowJar , CD into build/libs, ran java -server -jar piped-1.0-all.jar Then this error came ~/.../build/libs $ java -server -jar piped-1.0-all.jarException in thread "main" java.lang.UnsatisfiedLinkError: /data/data/com.termux/files/usr/tmp/libreqwest16875000718432824555.so: dlopen failed: library "libgcc_s.so.1" not found at java.base/jdk.internal.loader.NativeLibraries.load(Native Method) at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:384) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:228) at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:170) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2389) at java.base/java.lang.Runtime.load0(Runtime.java:751) at java.base/java.lang.System.load(System.java:1912) at rocks.kavin.reqwest4j.ReqwestUtils.<clinit>(ReqwestUtils.java:35) at me.kavin.piped.utils.RequestUtils.sendGet(RequestUtils.java:22) at me.kavin.piped.consts.Constants.<clinit>(Constants.java:195) at me.kavin.piped.Main.main(Main.java:39)
I found some similar issues about this library with java. Please help

rocky flame
#

reading from the error, you need GCC, and Termux doesn't support glibc including GCC. although you can install GCC via tur repo

rancid junco
#

libgcc isn't included in any gcc packages, and this is a library found in standard Linux distributions for runtime which doesn't exist for Termux

rocky flame
#

ah, thanks for correcting

rancid junco
#

Atleast for gcc-12 package, it didn't have such libraries

rocky flame
#

what about gcc-13?

rancid junco
#

I doubt that

#

It's a runtime library so it's not packaged for Termux

proven ridge
#

I installed clang but it didn't work, installed gcc-12 with tur, it didn't work

proven ridge
rancid junco
#

More like your program issue

#

The java program loads libreqwest but not compatible with termux because it's not compiled against Android with linked libraries that are non-existent

#

The best way to run that is using proot-ed distributions

proven ridge
#

Oh can you give rough instructions how to do it

#

Prooted

rancid junco
#

Ok edit: I would have suggested proot-ed distributions, but that native library might also be compiled to another architecture, so even running it under debian/Ubuntu would need a x86_64 one

proven ridge
rancid junco
#

you can try running it on proot-distro if it's supports arm native

proven ridge
#

Yes it supports arm64 Ok I will try

proven ridge
#

Thanks it worked. Can you tell me is there difference/performance difference between proot-distro & docker. I am asking because they offer official docker image and I have phone with 2gb ram

rancid junco
#

proot itself has very reasonable performance but there is a performance penalty when doing file operations later on

proven ridge
#

So docker is more performant than proot

#

?