/bitcoinvault-builder

A Bitcoinvault package builder (by Docker)

Primary LanguageDockerfile

Docker

General Usage

The dockerfiles in this directory can be used to run depends builds for various HOSTs. The images will contain all the dependencies required for cross compiling.

For example, to build the Debian image and use it for a build targeting the Linux amd64 host:

# Build container
docker build --pull --no-cache -t bvault-builder .

# Run with a Bash shell
docker run -it --name bvault-builder --workdir /bitcoinvault bvault-builder /bin/bash

# Inside the container: build depends for RISCV-64 bit, skipping Qt packages
make HOST=x86_64-pc-linux-gnu NO_QT=1 -C depends/ -j5
./autogen.sh
./configure --prefix=/bitcoinvault/depends/x86_64-pc-linux-gnu
make -j5
mkdir dist
make DESTDIR=/bitcoinvault/dist install

# Compress to tarball package
cd dist/bitcoinvault/depends/
mv x86_64-pc-linux-gnu bitcoinvault-0.18.0.0
tar -cvzf bitcoinvault-0.18.0.0-x86_64-linux-gnu.tar.gz bitcoinvault-0.18.0.0

# exit container and copy to host
docker cp bvault-builder:/bitcoinvault/dist/bitcoinvault/depends/bitcoinvault-0.18.0.0-x86_64-linux-gnu.tar.gz ~/bvault-builder

macOS SDK

Cross compiling for macOS requires the macOSX10.14 SDK. There are notes in the bitcoinvault/bitcoinvault repo about how to create it.

You can copy it into a container with:

docker cp path/to/MacOSX10.14.sdk.tar.gz bvault-builder:bitcoinvault/depends/SDKs

Platform Triplets

Common host-platform-triplets for cross compilation are:

  • x86_64-w64-mingw32 for Win64
  • x86_64-apple-darwin16 for macOS
  • i686-pc-linux-gnu for Linux 32 bit
  • x86_64-pc-linux-gnu for Linux 64 bit
  • arm-linux-gnueabihf for Linux ARM 32 bit
  • aarch64-linux-gnu for Linux ARM 64 bit
  • riscv32-linux-gnu for Linux RISC-V 32 bit
  • riscv64-linux-gnu for Linux RISC-V 64 bit

You can read more about host target triplets in autoconf here.