Skip to content
Snippets Groups Projects
  • Benjamin Gallois's avatar
    eb590e1c
    Fix #200 (!267) · eb590e1c
    Benjamin Gallois authored and Hugo Trentesaux's avatar Hugo Trentesaux committed
    * remove /ws from listen address
    
    * fix error when user already exist
    
    * change binary to duniter2
    
    * add rpc-cors
    
    * add config documentation
    
    * add reference in service files
    
    * use embedded distance oracle
    
    * optimize ci
    
    * use docker cache
    
    * add systemd timer
    
    * add documentation
    
    * fix base_path default
    
    * add duniter user
    
    * add services
    
    * update docs
    
    * add deb package to ci
    
    * add deb docker building
    eb590e1c
    History
    Fix #200 (!267)
    Benjamin Gallois authored and Hugo Trentesaux's avatar Hugo Trentesaux committed
    * remove /ws from listen address
    
    * fix error when user already exist
    
    * change binary to duniter2
    
    * add rpc-cors
    
    * add config documentation
    
    * add reference in service files
    
    * use embedded distance oracle
    
    * optimize ci
    
    * use docker cache
    
    * add systemd timer
    
    * add documentation
    
    * fix base_path default
    
    * add duniter user
    
    * add services
    
    * update docs
    
    * add deb package to ci
    
    * add deb docker building

How to build duniter-v2s for arm

Cross-compile Duniter to arm (e.g. Raspberry Pi).

With Docker

  1. Create a docker image that contains the build environment
docker build -t duniter-v2s-arm-builder -f docker/cross-arm.Dockerfile .
  1. Use this docker image to cross-compile duniter-v2s for armv7
./scripts/cross-build-arm.sh

then, get the final binary at target/armv7-unknown-linux-gnueabihf/release/duniter.

Without Docker

Warning: armv7 (default for Raspberry Pi) is not supported. Linux on RPi can be easily switched to aarch64, please search how to do so on the Internet.

This produces a musl build: the resulting executable is static, hence more portable than a dynamic one. It will be compatible with systems older than the compilation host.

# Install the tools
rustup target add aarch64-unknown-linux-musl --toolchain nightly-2023-08-23-x86_64-unknown-linux-musl
sudo dpkg --add-architecture arm64
sudo apt update
sudo apt install musl-dev:arm64 musl-tools g++-aarch64-linux-gnu gcc-aarch64-linux-gnu

# Cross-compile
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc cargo build --target=aarch64-unknown-linux-musl --release