Document repeatable wallet builds

This commit is contained in:
root
2026-04-29 14:11:52 +00:00
parent 44f1fb0435
commit 47495ff4cf
11 changed files with 413 additions and 45 deletions
+40 -5
View File
@@ -1,10 +1,10 @@
Copyright (c) 2026 Agrarian Developers
Ubuntu 24.04 Daemon Build Notes
================================
Ubuntu 24.04 Build Notes
========================
These notes describe the native daemon build path tested against current Ubuntu
24.04 system packages.
These notes describe the native daemon and desktop wallet build paths tested
against current Ubuntu 24.04 system packages.
Recommended host size
---------------------
@@ -16,7 +16,7 @@ building large translation units.
Packages
--------
Install the native build dependencies:
Install the native daemon build dependencies:
sudo apt-get update
sudo apt-get install -y \
@@ -24,6 +24,12 @@ Install the native build dependencies:
libboost-all-dev libevent-dev libgmp-dev libssl-dev \
libdb5.3-dev libdb5.3++-dev
For the desktop wallet, also install Qt and protobuf tools:
sudo apt-get install -y \
qtbase5-dev qttools5-dev-tools qtchooser \
libqrencode-dev libprotobuf-dev protobuf-compiler
Daemon-only build
-----------------
@@ -40,6 +46,35 @@ For the pool daemon, the GUI, tests, bench, ZMQ, and UPnP can be disabled:
CXXFLAGS="-O0 -g0 --param ggc-min-expand=1 --param ggc-min-heapsize=32768"
make -j1
The daemon helper runs the same path:
JOBS=1 ./contrib/build-linux.sh
Qt wallet build
---------------
For the desktop wallet, use:
JOBS=1 ./contrib/build-linux-wallet.sh
The wallet helper builds/restores the native depends prefix first, then creates
a temporary config.site that keeps the depends libraries while allowing system
Qt 5 tools and pkg-config files to be used.
Defaults:
HOST=x86_64-pc-linux-gnu
QT_BINDIR=/usr/lib/qt5/bin
PROTOC_BINDIR=/usr/bin
CONFIG_SITE_FILE=/tmp/agrarian-linux-wallet-config.site
Warnings
--------
Qt 5.15 and protobuf 3.x emit compatibility/deprecation warnings in a few Qt
translation units. Those warnings are expected while the Windows build remains
pinned to Qt 5.9.7 and protobuf 2.6.1.
OpenSSL 3
---------
+90
View File
@@ -0,0 +1,90 @@
Copyright (c) 2026 Agrarian Developers
Desktop Wallet Build Quick Start
================================
This page records the repeatable desktop wallet build flow for the modernized
Agrarian tree.
Supported targets
-----------------
The currently tested desktop wallet targets are:
* Ubuntu 24.04 native x86_64: `src/qt/agrarian-qt`
* Windows x86_64 cross build from Ubuntu: `src/qt/agrarian-qt.exe`
Use one job on small servers:
JOBS=1 ./contrib/build-linux-wallet.sh
JOBS=1 ./contrib/build-win64-wallet.sh
Use more jobs only when the host has enough memory.
Ubuntu package baseline
-----------------------
sudo apt-get update
sudo apt-get install -y \
build-essential pkg-config autoconf automake libtool bsdmainutils \
curl git make tar patch
For the native Ubuntu wallet:
sudo apt-get install -y \
qtbase5-dev qttools5-dev-tools qtchooser \
libqrencode-dev libprotobuf-dev protobuf-compiler
For the Windows wallet:
sudo apt-get install -y \
mingw-w64 g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix \
qttools5-dev-tools
Then select POSIX Mingw-w64 threading:
sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
Why the helpers exist
---------------------
The wallet build is sensitive to tool version mismatches:
* Native Ubuntu uses current system Qt tools and protobuf while keeping the
deterministic depends libraries.
* Windows uses the Qt 5.9.7 and protobuf 2.6.1 libraries from depends. Its host
tools must match those libraries closely enough for generated C++ output to
compile.
The helper scripts keep those rules in one place so the build is repeatable on a
fresh server.
Expected artifacts
------------------
After the Ubuntu wallet build:
src/qt/agrarian-qt
src/agrariand
src/agrarian-cli
src/agrarian-tx
After the Windows wallet build:
src/qt/agrarian-qt.exe
src/agrariand.exe
src/agrarian-cli.exe
src/agrarian-tx.exe
Version checks
--------------
On Ubuntu:
QT_QPA_PLATFORM=offscreen src/qt/agrarian-qt --version
src/agrariand --version
For Windows binaries from the Linux build host:
file src/qt/agrarian-qt.exe src/agrariand.exe src/agrarian-cli.exe src/agrarian-tx.exe
+43 -13
View File
@@ -12,9 +12,8 @@ SUPPORTED BUILD METHODS
The following methods are known to work:
1. Linux (Ubuntu 18.04 Bionic recommended)
1. Linux (Ubuntu 24.04 tested)
Using the Mingw-w64 cross-compilation toolchain.
This is the method used to produce official Windows release binaries.
2. Windows 10+
Using Windows Subsystem for Linux (WSL) with Mingw-w64.
@@ -40,7 +39,7 @@ WSL allows running a Linux environment directly on Windows without a VM.
Requirements:
• Windows 10 (64-bit only)
• Not supported on Windows Server
• Ubuntu recommended (tested on Ubuntu 18.04)
• Ubuntu recommended
------------------------------------------------------------
INSTALLING WSL
@@ -53,7 +52,7 @@ INSTALLING WSL
2. Install Ubuntu
- Open Microsoft Store
- Install "Ubuntu 18.04"
- Install "Ubuntu"
3. Complete Setup
- Open command prompt
@@ -76,9 +75,9 @@ GENERAL DEPENDENCIES
------------------------------------------------------------
sudo apt update
sudo apt upgrade
sudo apt install build-essential libtool autotools-dev \
automake pkg-config bsdmainutils curl git
sudo apt install -y build-essential libtool autotools-dev \
automake pkg-config bsdmainutils curl git make tar patch \
qttools5-dev-tools
A host toolchain (build-essential) is required because some dependencies
(e.g., protobuf) build host utilities during the process.
@@ -100,13 +99,16 @@ BUILDING FOR 64-BIT WINDOWS
Install Mingw-w64 toolchain:
sudo apt install g++-mingw-w64-x86-64
sudo apt install -y \
mingw-w64 g++-mingw-w64-x86-64 g++-mingw-w64-x86-64-posix
Ubuntu 18.04:
Select the POSIX thread model (required):
sudo update-alternatives --config x86_64-w64-mingw32-g++
sudo update-alternatives --set x86_64-w64-mingw32-gcc \
/usr/bin/x86_64-w64-mingw32-gcc-posix
sudo update-alternatives --set x86_64-w64-mingw32-g++ \
/usr/bin/x86_64-w64-mingw32-g++-posix
Select the POSIX thread model (required).
------------------------------------------------------------
IMPORTANT (WSL USERS)
@@ -122,13 +124,33 @@ Autoconf scripts will fail.
BUILD COMMANDS
------------------------------------------------------------
Recommended portable helper:
JOBS=1 ./contrib/build-win64-wallet.sh
The helper:
• Verifies the POSIX Mingw-w64 thread model.
• Builds the Win64 depends tree with Qt enabled.
• Stages matching Qt host tools (`moc`, `uic`, `rcc`) into the depends prefix.
• Builds/stages protobuf 2.6.1 `protoc` when system `protoc` is newer.
• Configures the wallet against the generated depends prefix.
Manual equivalent:
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g')
cd depends
make HOST=x86_64-w64-mingw32
make HOST=x86_64-w64-mingw32 NO_QT=0
cd ..
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site \
./configure --prefix=/
./configure --prefix=/ \
--disable-maintainer-mode \
--disable-tests \
--disable-bench \
--with-gui=qt5 \
--with-qt-incdir=$PWD/depends/x86_64-w64-mingw32/include \
--with-qt-libdir=$PWD/depends/x86_64-w64-mingw32/lib
make
============================================================
@@ -193,6 +215,14 @@ The win32 model conflicts with certain C++11 headers
You MUST select the POSIX thread model when prompted by
update-alternatives.
============================================================
PROTOBUF NOTE
============================================================
The Windows depends build uses protobuf 2.6.1 headers and libraries. Do not use
a newer system `protoc` to regenerate wallet sources for this target. The helper
builds and stages a matching native `protoc` when needed.
============================================================
END OF DOCUMENT
============================================================