Build signal-cli
#1
Hello! I have been trying to get signal on my pinephone without using anbox. I am really happy about postmarketos, it is incredibly snappy and the phone functionality works very well.

I have tried to build signal-cli on the pinephone with the latest stable postmarketos 21.06. Glibc is required within the rust modules to build, so I tried to install: sgerrand/alpine-pkg-glibc and changing the target of rust from musl to gnu.
I managed to get the libsignal-client and libzkgroup compiled and I followed the instructions to bundle the .so files back in signal-cli.

Unfortunately when I then tried to run the signal-cli I get:

Missing required native library dependency: libsignal-client.

I had a look through the signal-cli issues and saw that this can happen when compiled with an older version of glibc. Not sure how this happened has the glibc version installed with sgerrand/alpine-pkg-glibc seems recent, but clearly I am missing something here...

I now just tried to do the same build on the pinebook pro with Manjaro. Everything compiled fine, it has and uses glibc rather than musl. I tried the signal-cli and it worked.

I then, maybe ignorantly thought I could copy and paste my build signal-cli from my pinebook pro ( with manjaro ) to my pinephone with postmarketos. They are both aarch64 after all.
I tried to run the signal-cli and again I got: Missing required native library dependency: libsignal-client.

It makes me very sad, in my ignorance I tried what I could but I am a bit lost now.

Is there someone that could help me understand what I am doing wrong and help me?

Thanks in advance Smile
  Reply
#2
(07-09-2021, 06:06 AM)uby89 Wrote: I managed to get the libsignal-client and libzkgroup compiled and I followed the instructions to bundle the .so files back in signal-cli.

Unfortunately when I then tried to run the signal-cli I get:

Missing required native library dependency: libsignal-client.

edit: Unless I misunderstood you, you don't "bundle the .so files back in signal-cli". Instead you are removing the bundled libsignal_jni.so (and libzkgroup). Then it will look in your java library path for the ones you compiled/installed. Make sure they are in your java.library.path (run java -XshowSettings:properties to see)

Look here:
https://github.com/AsamK/signal-cli/wiki...-libsignal

specifically:
Quote:The linux x86_64 version is bundled by default. For other systems, you need to remove the bundled lib from the jar file

zip -d build/install/signal-cli/lib/signal-client-java-*.jar libsignal_jni.so

and please let me know if it works for you. I'm currently using an old version of signal-cli that was previously in Alpine edge (v 0.7.1)
  Reply
#3
Hi saba,

Thanks for your suggestion I tried it and unfortunately it didn't work. I am getting the same: Missing required native library dependency: libsignal-client.

I checked the java library path:

Code:
java.library.path = /usr/lib/jvm/java-11-openjdk/lib/server
        /usr/lib/jvm/java-11-openjdk/lib
        /usr/lib/jvm/java-11-openjdk/../lib
        /usr/java/packages/lib
        /lib
        /usr/lib

I put libsignal_jni.so and libzkgroup.so in /usr/java/packages/lib .
I had to create that folder and changed the group and owner to the phone user recursively for /usr/java.
I deleted those libs from the respective bundles.

Then I tried to link with the following command:

./build/install/signal-cli/bin/signal-cli link -n "pinephone"

But I got the missing required library error.

I will try again when a new version of signal-cli comes out. If you manage yourself please let me know Smile
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  axolotl signal client on postmarket os? nieral 2 2,923 10-29-2021, 07:41 AM
Last Post: nieral
  Latest build no firefox, text editor? cosmicschock 2 2,233 10-03-2021, 12:19 PM
Last Post: cosmicschock
Wink Extremely fast pmOS build for the pinephone lucasanss 0 2,846 02-03-2021, 04:05 PM
Last Post: lucasanss
  Build state today firefox-58 3 4,722 10-24-2020, 08:48 AM
Last Post: jmorris
  Signal on PostmarketOS GloriousCoffee 8 11,663 09-01-2020, 07:37 AM
Last Post: nieral
  pmbootstrap build large keyboard not usable u20200719 5 6,863 07-25-2020, 02:31 PM
Last Post: u20200719

Forum Jump:


Users browsing this thread: 1 Guest(s)