Git Product home page Git Product logo

signal-libs-build's Introduction

Automatic compilation of native libraries for the Signal messenger.

What it is

A CI/CD workflow to automatically compile libsignal, which is used by signal-cli and other projects. This rust library needs to be built for each operating system and processor architecture where it is used. This repo provides pre-compiled binaries for some of the popular platforms.

How to use it

With signal-cli

The compiled library files (.so / .dylib / .dll) can be incorporated into signal-cli according to the instructions on its wiki. For Linux, this amounts to swapping the .so files inside the .jar archives.

For example, for signal-cli v0.11.6 on ARM64, download signal-cli-0.11.6-Linux.tar.gz from signal-cli's releases and libsignal_jni.so-v0.21.1-aarch64-unknown-linux-gnu.tar.gz from this repo's releases. Unpack downloaded files with tar -xzf ā€¦.tar.gz. Then replace the bundled .so object:

zip -uj signal-cli-0.11.6/lib/libsignal-client-0.21.1.jar libsignal_jni.so

How it works

The workflow automatically checks for new releases in https://github.com/signalapp/libsignal repo. If one is available, it downloads and builds the native library objects.

Security

The files published in this repo's releases are compiled and uploaded by GitHub's CI infrastructure, following the steps in the workflow files. The github-actions bot authors every release. Additionally, a SHA checksum of every compiled file is printed out to the logs during the workflow run.

This means that the resulting binaries can be used with confidence that they were built by GitHub Actions by executing instructions in the open-source workflow files.

Available platforms

  • x86_64-linux-gnu Most desktop linuxes. Supports glibc versions less recent than that required for the upstream releases, which are built on the latest Ubuntu (see signal-cli#643).
  • aarch64-apple-darwin MacOS, ARM64.
  • x86_64-pc-windows Windows, 64 bit.
  • aarch64-linux-gnu Raspberry Pi 3,4; Pine A64; many SoC.
  • armv7-linux-gnueabihf Raspberry Pi 2; many SoC.
  • i686-linux-gnu 32 bit Linux.
  • x86_64-linux-musl Alpine Linux, OpenWRT; see note.

Tip: on *nix, use uname -m to get your device's architecture.

Historical notes

  • As of signal-cli v0.10.3, the macOS and Windows builds are bundled into the official releases.

  • As of libsignal-client v0.10.0, builds for x86_64 macOS and Windows are available in the upstream releases, along with the usual Linux builds.

  • As of libsignal-client v0.10.0, the zkgroup library is now incorporated into the libsignal-client.

Similar projects

Manual builds for Raspberry Pi:

signal-libs-build's People

Contributors

exquo avatar orazioedoardo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

signal-libs-build's Issues

Build configuration for Linux/AMD64/musl, i.e. OpenWRT, Alpine Linux

I would like to use a plugin which pulls in libsignal_jni.so distributed here.
Unfortunately the dynamic linking fails as your build is for AMD64/glibc (the most common variant), whereas my platform OpenWRT uses AMD64/musl. A more prominent example would be Alpine Linux.

Would it be possible to add AMD64/musl to the list of targets you provide builds for?
The rust target triple is: x86_64-unknown-linux-musl

Signed builds?

signal-cli is currently signed, which is useful to avoid trusting HTTPS on every download, however libsignal releases are not. Since using a release means replacing a shared library, the security is reduced to that of libsignal. So Iā€™m asking whether you could also sign libsignal release, automatically in the workflow files. If you agree, I recommend using signify or just ssh keys. No GPG please as it requires a stateful keyring.

How to run on a RPI4

I try to run signal-cli on a RPI4 with "arm_64bit=0" set in config.txt. I have to set that because other sqlite lib problems.

If I use aarch64-linux-gnu I get wrong ELF class: ELFCLASS64 (Possible cause: can't load AARCH64 .so on a ARM platform)

If I use the arm7 lib I get org.signal.libsignal.zkgroup.InvalidInputException: Deserialization failure in zkgroup (AssertionError)

What can I do?

Doesn't work on my Linux (i686)

I used https://github.com/exquo/signal-libs-build/releases/download/v0.8.4.1/signal-cli-v0.8.4.1-x86_64-Linux.tar.gz and I got

OpenJDK Server VM warning: You have loaded library /tmp/resource17548792288693908275.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 <libfile>', 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

uname -m says i686

no files for 0.20.0?

Looks like compiling 0.20.0 failed for some reason. There are no compiled files in assets.

Support older glibc versions

this updated requirement kills support for EL8 which itself has EOSL 2029-05 - was this intended?

ldd libsignal_jni.so
./libsignal_jni.so: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./libsignal_jni.so)
	linux-vdso.so.1 (0x00007ffff3990000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007ffac97e6000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffac95c6000)
	libm.so.6 => /lib64/libm.so.6 (0x00007ffac9244000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007ffac9040000)
	libc.so.6 => /lib64/libc.so.6 (0x00007ffac8c6a000)
	/lib64/ld-linux-x86-64.so.2 (0x00007ffaca3ec000)

Last "known-good": 0.52.0

Can this be circumvented and GLIBC 2.28 support can be kept over the next years?

This is related to AsamK/signal-cli#1560

Still getting glibc version error with signal-cli v0.11.5.1 and libsignal-client v0.21.1

I may just be over my head here but maybe others are also struggling? I did the following:

  1. Downloaded signal-cli .tar.gz archive for v0.11.5.1 from AsamK/signal-cli, followed instructions on README there to extract and create link
  2. Downloaded appropriate tar.gz archive for v0.21.1 from this repo and folled instructions on README here to swap out the .so file in the libsignal-client .jar archive set up in step 1

But still get "ServiceConfig - Failed to call libsignal-client: [filename].so: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by [filename].so)
Missing required native library dependency: libsignal-client"

Using Ubuntu 18.

full-fledged builds?

hello there, thanks for your awesome repo.

do you think it would make sense to go the extra mile and publish full releases with such libraries included?

for example, for ARM64 one has to download your libraries, download the latest signal version, upgrade the libs in the tarfile and then install.
would it be easy for you to publish the whole updated archives?
that would speed up the process for any user to install.

fatal runtime error: failed to initiate panic, error 5

I am trying to run the latest signal-cli v0.13.0 which requires libsignal-client version 0.39.2. I am running on x86_64 with Ubuntu 20.04.

So I downloaded libsignal_jni.so-v0.40.1-x86_64-unknown-linux-gnu.tar.gz and replaced:

zip -uj signal-cli-0.13.0/lib/libsignal-client-0.39.2.jar libsignal_jni.so

When I run signal-cli, I get the following error:

fatal runtime error: failed to initiate panic, error 5
Aborted (core dumped)

libzkgroup / libsignal-client missing under cygwin

I'm trying to get your prepacked 'signal-cli-v0.8.5-x86_64-Linux.tar.tz' up and running in Cygwin BASH under Windows10. And I'm stuck getting the error message that libzkgroup and libsignal-client are missing. Is there something I overlooked? I assumed that the pre-compiled Linux variants would also work 'out-of-the-box' also on the cygwin.

java -version: java version "14.0.2" 2020-07-14
uname -m : x86_64

Thanks, no2spc

cargo error: "feature `resolver` is required"

Moin,
getting the following error at build_jni.sh:

# ./build_jni.sh desktop'
cargo build -p libsignal-jni --release
error: failed to parse manifest at `/data-crypt/share/home/signal/libsignal-client/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest

What can I do? Sorry, I have not much knowledge about rust and manifests.
I'm using newest Debian 11.2.

# cargo --version
cargo 1.46.0
# uname -m
armv7l

Thanks for your work!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.