AsamK / signal-cli

signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
GNU General Public License v3.0
3.24k stars 309 forks source link

Issue with sqlite Libraries #974

Closed joermke closed 2 years ago

joermke commented 2 years ago

Hi! I downloaded release 0.10.8 and changed the libsignal-client lib according to https://github.com/AsamK/signal-cli/wiki/Provide-native-lib-for-libsignal. Now I was able to register my number, but I cannot send messages due to an issue with lib comaptibility.

Failed to load native library:sqlite-3.36.0.3-a866483a-6df7-4631-ae4b-12de8290a7fb-libsqlitejdbc.so. osinfo: Linux/aarch64 java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.36.0.3-a866483a-6df7-4631-ae4b-12de8290a7fb-libsqlitejdbc.so: /tmp/sqlite-3.36.0.3-a866483a-6df7-4631-ae4b-12de8290a7fb-libsqlitejdbc.so: wrong ELF class: ELFCLASS64 (Possible cause: can't load AARCH64 .so on a ARM platform) ERROR HikariPool - HikariPool-1 - Exception during pool initialization. java.sql.SQLException: Error opening connection …

Is there a way to fix this? I‘m using raspbian bullseye:

5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux

AsamK commented 2 years ago

signal-cli uses the xerial sqlite-jdbc library. That supports raspberrypi, but apparently not the 64bit version: https://github.com/xerial/sqlite-jdbc#supported-operating-systems

joermke commented 2 years ago

Awesome, thanks for the information! With that I was able to solve the issue (maybe not the best way to do it though): I downloaded the sources for xerial/sqlite-jdbc: https://github.com/xerial/sqlite-jdbc/releases/tag/3.36.0.3 and installed libc6-dev as well as openjdk-17-jdk-headless on my Raspberry. With that I was able to invoke „make native“ to build the library suitable for my raspberry. Then, I replaced org/sqlite/native/Linux/aarch64/libsqlitejdbc.so in the jar file /lib/sqlite-jdbc-3.36.0.3.jar with the freshly compiled native lib under /target/sqlite-3.36.0-Linux-armhf/libsqlitejdbc.so.