HOWTO BUILD
cross is used for cross compiling libsignal-client.
-
download new release from
https://github.com/signalapp/libsignal-client/releases -
unzip + change into directory
-
cd into
javadirectory -
run
cross build --target x86_64-unknown-linux-gnu --release -p libsignal-jnirun
cross build --target armv7-unknown-linux-gnueabihf --release -p libsignal-jnirun
cross build --target aarch64-unknown-linux-gnu --release -p libsignal-jnito build the library forx86-64,armv7andarm64 -
the built library will be in the
target/<architecture>/releasefolder
Why?
Building libsignal-client every time a new docker image gets released takes really long (especially for cross platform builds with docker/buildx and QEMU). Furthermore, due to this bug here (https://github.com/docker/buildx/issues/395) we would need to use an ugly workaround for that right now. As libsignal-client isn't released very often I guess it's okay to manually build a new version once in a while.
Pitfalls
crossrequires a Rust installation viarustup, otherwise you might receive a toolchain is not fully qualified-Error.- Your user must have permission to directly talk to the Docker daemon using the
dockercommand. To avoid running as root, you can add your user to the docker group and reboot.