Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing native libsignal-client in v0.8.4 #643

Closed
exquo opened this issue Jun 13, 2021 · 20 comments
Closed

Missing native libsignal-client in v0.8.4 #643

exquo opened this issue Jun 13, 2021 · 20 comments

Comments

@exquo
Copy link
Contributor

exquo commented Jun 13, 2021

Just installed the latest signal-cli release v0.8.4 and got

$ signal-cli receive
Missing required native library dependency: libsignal-client

This is on linux, and the previous signal-cli versions have worked fine without needing any manual steps from https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal.

I've checked, and the libsignal_jni.so is bundled in the jar file:

$ unzip -l signal-cli-0.8.4/lib/signal-client-java-0.8.1.jar | grep libsignal_jni.so 
	2432368  2021-06-02 18:55   libsignal_jni.so

So, not sure what's missing.

@AsamK
Copy link
Owner

AsamK commented Jun 13, 2021

That's strange, which distribution and cpu architecture do you have?

@zxyrepf
Copy link

zxyrepf commented Jun 13, 2021

I get the same error on Debian 10 (x86_64).

@exquo
Copy link
Contributor Author

exquo commented Jun 13, 2021

Debian 10 (x86_64)

ditto :)

I've tried to compile libsignal-client on my system. I've got an older version of rust, so I've encountered some errors. Will try again once I have a bit more time.

@exquo
Copy link
Contributor Author

exquo commented Jun 14, 2021

I have compiled the libsignal-client java library (turned out it requires the latest nightly release of the rust compiler), and replaced the original with it:

cd <...>/librust-client/target/releases
zip -u <...>/signal-cli-0.8.4/lib/signal-client-java-0.8.1.jar libsignal_jni.so

Now it works fine with signal-cli v0.8.4.

For the reference, here's the compiled binary file.
(I guess folks shouldn't use it in their production environments, since it's some unverified binary file coming from someone on the internet; but it might be useful for troubleshooting, in e.g. a virtual machine)

Let me know if I can do anything else to troubleshoot this on my system.

@AsamK
Copy link
Owner

AsamK commented Jun 14, 2021

Maybe upstream now compiles on a newer distribution, with a more recent libc version than debian 10 has ...
I can check it later.

@jgillum
Copy link

jgillum commented Jun 14, 2021

I get the same error on Debian 10 (x86_64).

Same here.

@AsamK
Copy link
Owner

AsamK commented Jun 15, 2021

yep, upstream libsignal-client builds the library with ubuntu latest, which has a newer glibc version.
The provided binaries now require at least glibc 2.29 and Debian 10 has glibc 2.28 ...

$ objdump -T libsignal_jni.so | grep GLIBC
0000000000000000      DF *UND*  0000000000000000  GLIBC_2.29  log

@exquo
Copy link
Contributor Author

exquo commented Jun 17, 2021

Another case of this (CentOS 7): #606 (comment), #413 (comment)

@DutchForeigner
Copy link

I've got a similar error when sending a message using signal-cli v0.8.4.1:
signal-cli -u +1234567890 send -m "This is a test message" +1234567890
OpenJDK Server VM warning: You have loaded library /tmp/resource2972181199637573165.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c ', or link it with '-z noexecstack'.
WARN App - WARNING: Support for new group V2 is disabled, because the required native library dependency is missing: libzkgroup
Missing required native library dependency: libsignal-client

This is on a Raspberry Pi (Debian 10 -buster based), with libsignal-client and libzkgroup updated with local builds.
I did get signal-cli v0.8.3 compiled and working, but cannot get v0.8.4.1 to work

@exquo
Copy link
Contributor Author

exquo commented Jun 23, 2021

@DutchForeigner

This is probably a different issue (i.e. not caused by an older version of glibc). If you are compiling the libs yourself, the resulting .so files will use whichever version of glibc that is on your system.

Are you using the newer versions of the native libraries? (Updated since signal-cli 0.8.3). The current libsignal-client version is v0.8.1 (not to be confused with signal-cli's own version, which is numerically not far off currently).

@bublath
Copy link
Contributor

bublath commented Jun 24, 2021

Make sure to remove the libraries and add the new ones without path.
In case somebody is interested, I uploaded a current set (tested with signal-cli 0.8.4) for Raspberry Pi (Buster) here:
https://github.com/bublath/FHEM-Signalbot/tree/main/armv7l-0.8.4

@DutchForeigner
Copy link

@exquo Hi, Thank you for that answer. That makes now sense to me.
And yes I did recompile both of the libraries with the new version(s) (libzkgroup & libsignal-client).

Now I think about it, and reading the 'remove' bit., it might be that I did not remove the previous version correctly

I'll try the ones posted by @bublath and post an update when I got that tested on my side.

@exquo
Copy link
Contributor Author

exquo commented Jul 18, 2021

FYI: I've started a GitHub CI/CD that compiles the native libraries automatically when new signal-cli versions are released. The linux version is compiled on Ubuntu 18, so should work on "older" glibc linuxes, including Debian 10.

@Wikinaut
Copy link

debian 10

WARN  ServiceConfig - Failed to call libsignal-client: /tmp/resource10147335520034765112.so: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /tmp/resource10147335520034765112.so)
Missing required native library dependency: libsignal-client

What's the suggested solution for it?

@bublath
Copy link
Contributor

bublath commented Mar 17, 2022

I have a precompiled library that should work with debian 10 here:
https://github.com/bublath/FHEM-Signalbot/tree/main/amd64-glibc2.27-0.10.4
Replace it with
zip -u signal-client-java-*.jar libsignal_jni.so
and it should work. Note that this is for 0.10.4 - I cannot guarantee it will also work with 0.10.4.1 as libsignal probably got updated.

@Wikinaut
Copy link

In the meantime I decided to upgrade my server from debian10 to 11 (bullseye), which solved that "problem".

@octopode-us
Copy link

Hello guys, I have the same problem on windows 10 x64 here :

WARN ServiceConfig - Failed to call libsignal-client: D:\Users\arthu\AppData\Local\resource14946054837028231560.so: Can't load this .dll (machine code=0x0) on a AMD 64-bit platform

To be clear I am a absolute rookie on those stuff, and I'm already very surprised I got that far, if someone has an idea, it would be awesome.

thanks a lot

@cuu508
Copy link
Contributor

cuu508 commented Aug 14, 2023

Looks like starting from signal-cli 0.12.0 and libsignal-client 0.30.0 Ubuntu 20.04 is now too old also:

WARN  Manager - Failed to call libsignal-client: /tmp/12585162856697034629libsignal_jni.so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /tmp/12585162856697034629libsignal_jni.so)
Missing required native library dependency: libsignal-client

@bublath
Copy link
Contributor

bublath commented Aug 14, 2023

You can replace the library with the automated builds that are available here: https://github.com/exquo/signal-libs-build
I checked, the libsignal_jni.so distributed in the libsignal-client-0.30.0.jar of the 0.12.0 release references up to glibc 2.34 while the corresponding one from exquo only goes up to 2.28 which should be fine for Ubuntu 20.04

@mitar
Copy link

mitar commented Feb 21, 2024

I approached this differently. I used Docker to run local Ubuntu container with the latest glibc and mount my home directory into the container. Then I installed apt-get install openjdk-21-jre and adduser mitar with same uid 1000 as I have on the host. Then I made su mitar to get in there with same uid as on the host. And I was able to run signal-cli.

docker run --rm -t -i -v /home/mitar:/home/mitar ubuntu:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants