docker run -it --name libbitcoin debian:bookworm
apt update && apt install -y dh-autoreconf build-essential git pkg-config wget
git clone https://github.com/libbitcoin/libbitcoin-node.git /root/
cd /root/libbitcoin-node/
grep -Eo "avx2|avx5|sha|sse" /proc/cpuinfo | sort -u
Depending on the output, you'll add build flags as follows:
Output | Build flag |
---|---|
avx2 | --enable-avx2 |
avx5 | --enable-avx512 |
sse | --enable-sse41 |
sha | --enable-shani |
Note: after build is done, you can run ./bn -d
for a more robust flag detection.
./install.sh --prefix=$HOME/libbitcoin/ --verbose --build-boost --build-secp256k1 --disable-shared [CPU build flags]
exit (or Ctrl + D)
docker cp libbitcoin:/root/libbitcoin/bin/bn .
The binary will be copied to the current directory. Run ./bn
to start syncing or ./bn -h
for help.