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

Error using v0.8.0: libsignal-client #517

Closed
alexsstyle opened this issue Feb 14, 2021 · 18 comments
Closed

Error using v0.8.0: libsignal-client #517

alexsstyle opened this issue Feb 14, 2021 · 18 comments

Comments

@alexsstyle
Copy link

Hello together,

if I try to use the new version of signal-cli I get the following error:
ERROR App - Missing required native library dependency: libsignal-client

How can I fix this?

Thanks and best regards,
Alex

@bublath
Copy link
Contributor

bublath commented Feb 14, 2021

Are you on a non x86 system (e.g. Raspberry Pi)? Then you need the new native library.
Build instructions can be found in the Wiki https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal

You can also use the binaries I created for my project here: https://github.com/bublath/FHEM-Signalbot in the armv7l directory (without warranty!). You will still need to follow the instructions above to replace the x86 libraries in the jar files.

@alexsstyle
Copy link
Author

I'm on a x86 system. I'm looking for a "ready to use" release, also for the new group version. At the moment my system is not setup to compile projects by myself. But I think I have to do this, to get rid of this two problems.

@bublath
Copy link
Contributor

bublath commented Feb 15, 2021

I just upgraded my x86 system to 0.8.0 and its working without issues.
Make sure you have no old ilbraries somewhere and that permissions are correct.
If you want to try a Dbus installation, you can use the "signal_install.sh" script from my repository mentioned above (adjust the config in the beginning and run with sudo). It will additionally install some Perl stuff, but basically it will automatically do a system-wide Dbus installation and even guide through the registration process if required.

@alexsstyle
Copy link
Author

alexsstyle commented Feb 15, 2021

Thanks for your help. My operating system is Windows (10, Java 15.0.2). Maybe this is the problem.

I just dropped everything from signal-cli, unzipped it new, checked my path-definitions, did a reboot and still the same error when trying to execute the receive command, also as admin.

If I use the old version, 0.7.4, I can execute the receive command without problems.

@bublath
Copy link
Contributor

bublath commented Feb 15, 2021

Ok, sorry then I'm out. I'm not even sure if there is a way to create the native libraries under Windows. Use Linux :)

@alexsstyle
Copy link
Author

I've depencies to other Windows based software, not available for Linux :-( I've built 0.8.0 by myself, but still the same problem. Will now try to build libsignal-client by myself.

@alexsstyle
Copy link
Author

Did a build of libsignal-client-java and placed the signal_jni.dll in the java.library.path. Also the zkgroup.dll. Works fine now. Issue closed.

@bublath
Copy link
Contributor

bublath commented Feb 15, 2021

Can you place the .dll's somewhere and post the path? I guess other Windows users would appreciate that.

@alexsstyle
Copy link
Author

I think I did the dirty way. I created a new folder called dll in the lib folder of signal-cli and placed there the two dll files. The files must be namend signal_jni.dll and zkgroup.dll.

The two files can be found in this download:
native_libraries.zip

Than I modified the signal-cli.bat file. As written in the wiki, there are different ways to tell Java where to find this libraries.

new variable definition for the path:
set LIBPATH=%APP_HOME%\lib\dll

add argument to the exec string:
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %SIGNAL_CLI_OPTS% -Djava.library.path=%LIBPATH% -classpath "%CLASSPATH%" org.asamk.signal.Main %*

@TheRec
Copy link

TheRec commented Feb 24, 2021

@alexsstyle Thanks for the information!

I just would like to add that I also had to go in both lib/zkgroup-java-*.jar and lib/signal-client-java-*.jar to delete the ".so" files at the root of each file (I used 7Zip to edit the JAR files). These are the default libraries and until I deleted those I still got the error message your initial issue is about.

@Crypto-Bee
Copy link

Crypto-Bee commented Mar 3, 2021

Thank you very much, @alexsstyle and @TheRec!!! You rescue me!!! Without your signal_jni.dll and the instruction i would never manage this.

For future releases i can download the official libzkgroup.dll and rename it in zkgroup.dll. But the releases from libsignal-client include only the Source code. Is there a way to publish the signal_jni.dll always suitable to the latest release from signal-cli?

Perhaps the introduction "Provide native lib for libsignal" in the Wiki can somebody complete with your steps for Windows-User? Like that everybody quickly can find it. Perhaps it is the same solution for macOS-User??? Seems they have the same problems...

I did the other way with the java.library.path. I put the downloaded signal-cli-0.8.0 on the desktop and rename it in signal-cli. In Windows i add C:\Users\ ...\Desktop\signal-cli\lib\dll in path for the java.library.path. In future i have always only to rename the folder from signal-cli. Perhaps this will help somebody, too.

In this way i want to say @AsamK: this project is great! Many thanks for it!!!
Crypto-Bee

@kook90
Copy link

kook90 commented Apr 21, 2021

Thank you everyone. Really nice work!
I did everything described by @alexsstyle and @TheRec. However, I still get the following error message when running the script:
"Error: Could not find or load main class Files\signal-cli-0.8.1\bin..\lib\dll
Caused by: java.lang.ClassNotFoundException: Files\signal-cli-0/8/1\bin//\lib\dll"
Any idea why this still happens? To be honest, I am quite a starter in programming.

thanks already in advance

signal-cli-0.8.1_kook.zip

@DevD1st
Copy link

DevD1st commented Jun 15, 2021

Much thanks to @TheRec and @alexsstyle, i followed @alexsstyle soution of creating dll file in the lib folder then modified the .bat file, after doing everything worked correctly but suprisingly i tried running it again today and i got this error: "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".
I tried removing the signal_jni.dll and zkgroup.dll, recompile it, i also used the native_libries.zip file compiled by @alexsstyle and still nothing, i also deleted everything, redownload them, recompile them and add them back but the error persist.

Anyone with a solution??
Thanks in advance...

@GuyoST
Copy link

GuyoST commented Jul 2, 2021

Hello everyone, I read this post and thank you so much it is working for version 0.8.0.
Does someone has the dll files for windows for the latest version 0.8.4.1 ? Or is there a place to download them ?

Thank you so much :)

@exquo
Copy link
Contributor

exquo commented Jul 18, 2021

I've started a GitHub CI/CD that compiles the native libraries automatically when new signal-cli versions are released.
The windows version also patches the signal-cli.bat file to add the dir with the compiled .dlls to the java path. Everything should just work, download and run.

@GabyPCgeeK
Copy link

In Windows if you rename signal_jni.dll to libsignal_jni.so and zkgroup.dll to libzkgroup.so and replace the ones in the jars it works fine without having to add the java.library.path.

@numericOverflow
Copy link

I tried a bunch of the things listed above, but couldn't get it working. I think the main issue is getting all the latest versions of signal-client and libzkgroup. I'm guessing the native_libraries.zip that @alexsstyle posted above are simply out of date at this point?

Someone (@exquo ) setup a pre-build process that worked perfectly for me to fix this issue on Windows:

https://github.com/exquo/signal-libs-build

I just went to the "releases" section and downloaded the "signal-cli-v0.8.5-x86_64-Windows.tar.gz" and extracted. It's got everything pre-built, so I didn't have to do any messing around with dlls, or anything. It worked out of the box!

Basically, from what I can tell, @exquo 's repo packages everything up nicely and adjusts things so you don't have to go digging around to compile and/or organize things together yourself. Read the directions on the README.md of that repo if you want more details.

@fabbra
Copy link

fabbra commented Apr 21, 2022

In Windows if you rename signal_jni.dll to libsignal_jni.so and zkgroup.dll to libzkgroup.so and replace the ones in the jars it works fine without having to add the java.library.path.

Renaming signal_jni.dll to libsignal_jni.so in the JAR worked fine for me as well. Thx!

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