mirror of
https://github.com/AsamK/signal-cli.git
synced 2026-06-30 20:20:33 +00:00
Updated FAQ (markdown)
parent
a51ebdbe33
commit
2247016ca7
49
FAQ.md
49
FAQ.md
@ -85,4 +85,51 @@ IndexError: UTF-16 index breaks surrogate pair
|
||||
|
||||
>>> utf16_to_unicode("0💩1💩2💩3", 3)
|
||||
2
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
## Build performance
|
||||
|
||||
On AARCH64 systems you might need to use GraalVM to generate a system-native binary of signal-cli.
|
||||
Doing this is a quite ressource-heavy process, on a Raspberry Pi CM4l (8GB) it took around 40 minutes using SD card.
|
||||
Some optimizations will need to be done to manage a sucessful build, especially regarding free memory.
|
||||
Without them, the system might get ressource deadlocked and not be able to finish the build in many hours.
|
||||
|
||||
The following steps worked
|
||||
|
||||
|
||||
**for other**s on raspi and similar platforms with 8GB or less:
|
||||
|
||||
i would recommend to set up zswap and disabling other very large services for the moment so you'll have more ram for compiling and a faster swap handling. i gave 2GB to zwap (pri 100 per default) plus added a 2GB swapfile (pri -2) just in case.
|
||||
without those steps even 4 hours weren't enough, with the steps it took 38 min. building on a slow sd card.
|
||||
|
||||
### Prep
|
||||
|
||||
- Stop other heavy daemons like EDR or similar for the time of the build. Every free GB counts in that moment.
|
||||
- If you rather keep them running, it's best to switch to a `deadline` IO scheduler.
|
||||
- If you can, add a swap space on eMMC or an USB/NVMe SSD.
|
||||
- Enable zSwap in the fast mode, and make a small pseudoswap SSD (I used 2GB, rule of thumb is 25% RAM). leave it at the highest priority (100, it's the default on debian etc.)
|
||||
- make sure to start it and see if it's activated (`swapon -s` or the `Swap` column in `top`.
|
||||
- Add a swapfile of the same size just to be safe in case the swap overflows. If you have multiple swap partitions / -files, use the same (low) priority for them, i.e. `-5` Even SD cards will usually scale better for multiple IOs.
|
||||
- Make sure that is also active
|
||||
|
||||
|
||||
### Build
|
||||
|
||||
1. download Oracle [GraalVM](https://www.graalvm.org/downloads/), look for: `graalvm-jdk-25_linux-aarch64_bin.tar.gz`
|
||||
2. extract to /opt/graalvm-jdk-25.0.3+9.1 symlink to /opt/graalvm-jdk-25
|
||||
3. `export GRAALVM_HOME=/opt/graalvm-jdk-25 ; export JAVA_HOME=/opt/graalvm-jdk-25`
|
||||
4. head to the `signal-cli` source tree and check out the latest release `git checkout <commit id>`
|
||||
5. start the build using `./gradlew nativeCompile`
|
||||
[wait 20-90 mins]
|
||||
|
||||
then copy the resulting binary to `/usr/local/bin`:
|
||||
```
|
||||
$ sudo cp ./build/native/nativeCompile/signal-cli /usr/local/bin/ &&
|
||||
sudo chmod 755 /usr/local/bin/signal-cli
|
||||
```
|
||||
|
||||
**Warning**
|
||||
I noticed dropping the library in /usr/local/lib did **not** work to have it picked up.
|
||||
This is just a deployment detail, the library is fine. The missing steps for this are not clear yet.
|
||||
Please add them if you know what's missing.
|
||||
Loading…
x
Reference in New Issue
Block a user