Update build documentation

This commit is contained in:
root
2026-04-30 06:48:22 +00:00
parent 49ac41045b
commit 099316b662
17 changed files with 145 additions and 55 deletions
+15 -5
View File
@@ -1,13 +1,23 @@
Building Agrarian Building Agrarian
Use the autogen script to prepare the build environment. The preferred current build path uses the deterministic depends system.
./autogen.sh ./autogen.sh
./configure JOBS=1 ./contrib/build-linux.sh
For the Ubuntu desktop wallet:
JOBS=1 ./contrib/build-linux-wallet.sh
For a manual build, build depends first and configure against its config.site:
make -C depends HOST=x86_64-pc-linux-gnu NO_QT=0
./autogen.sh
CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure
make make
Always verify the signatures and checksums. Always verify source checksums and release signatures when building a release.
See doc/build-*.md for instructions on building agrariand, See doc/build-*.md for instructions on building agrariand,
the intended-for-services, no-graphical-interface, reference the intended-for-services, no-graphical-interface implementation of Agrarian,
implementation of Agrarian. and agrarian-qt, the desktop wallet.
+34 -6
View File
@@ -15,13 +15,13 @@ Agrarian is a C++ cryptocurrency-style codebase with a deterministic `depends/`
## System Requirements (Ubuntu) ## System Requirements (Ubuntu)
Install required build tools: Install the baseline build tools:
```bash ```bash
sudo apt update sudo apt update
sudo apt install -y \ sudo apt install -y \
build-essential pkg-config autoconf automake libtool \ build-essential pkg-config autoconf automake libtool \
bsdmainutils python3 curl git bsdmainutils cmake ninja-build python3 curl git
``` ```
For Windows cross-compilation support: For Windows cross-compilation support:
@@ -34,7 +34,13 @@ sudo apt install -y mingw-w64
## Building Dependencies (Deterministic Depends System) ## Building Dependencies (Deterministic Depends System)
All dependency builds are executed from within the `depends/` directory. The preferred build path uses the deterministic `depends/` system instead of
mixing system libraries. The current native Ubuntu wallet path builds Qt 6.8.3,
OpenSSL 3.5.6, Boost 1.91.0, protobuf, Berkeley DB, and supporting libraries
inside `depends/<host-triplet>/`.
All dependency builds are executed from within the `depends/` directory or via
the helper scripts in `contrib/`.
### Native Linux ### Native Linux
@@ -76,11 +82,27 @@ These directories should not be committed to version control.
## Building Agrarian ## Building Agrarian
Standard autotools workflow: Recommended native Ubuntu daemon build:
```bash ```bash
./autogen.sh ./autogen.sh
./configure JOBS=1 ./contrib/build-linux.sh
```
Recommended native Ubuntu desktop wallet build:
```bash
JOBS=1 ./contrib/build-linux-wallet.sh
```
Use a larger `JOBS` value only when the host has enough RAM. On an 8-core,
16 GB host, `JOBS=8` is reasonable.
Manual autotools workflow:
```bash
./autogen.sh
CONFIG_SITE="$PWD/depends/x86_64-pc-linux-gnu/share/config.site" ./configure
make -j"$(nproc)" make -j"$(nproc)"
``` ```
@@ -106,7 +128,13 @@ If enabled:
make check make check
``` ```
Refer to scripts under `contrib/` for additional CI or functional test flows. Current smoke tests:
```bash
./contrib/smoke-test-daemon.sh
./contrib/smoke-test-wallet.sh
./contrib/smoke-test-qt.sh
```
--- ---
+14 -5
View File
@@ -2,7 +2,7 @@ Wallet Tools
--------------------- ---------------------
### [BitRPC](/contrib/bitrpc) ### ### [BitRPC](/contrib/bitrpc) ###
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args. Allows for sending standard Agrarian RPC commands via RPC rather than as command line args.
### [SpendFrom](/contrib/spendfrom) ### ### [SpendFrom](/contrib/spendfrom) ###
@@ -21,7 +21,7 @@ Construct a linear, no-fork, best version of the blockchain.
### [Qos](/contrib/qos) ### ### [Qos](/contrib/qos) ###
A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Bitcoin network. This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it. A Linux bash script that will set up traffic control (tc) to limit the outgoing bandwidth for connections to the Agrarian network. This means one can have an always-on agrariand instance running, and another local agrariand/agrarian-qt instance which connects to this node and receives blocks from it.
### [Seeds](/contrib/seeds) ### ### [Seeds](/contrib/seeds) ###
Utility to generate the pnSeed[] array that is compiled into the client. Utility to generate the pnSeed[] array that is compiled into the client.
@@ -30,8 +30,8 @@ Build Tools and Keys
--------------------- ---------------------
### [Debian](/contrib/debian) ### ### [Debian](/contrib/debian) ###
Contains files used to package bitcoind/bitcoin-qt Contains files used to package agrariand/agrarian-qt
for Debian-based Linux systems. If you compile bitcoind/bitcoin-qt yourself, there are some useful files here. for Debian-based Linux systems. If you compile agrariand/agrarian-qt yourself, there are some useful files here.
### [Gitian-descriptors](/contrib/gitian-descriptors) ### ### [Gitian-descriptors](/contrib/gitian-descriptors) ###
Gavin's notes on getting gitian builds up and running using KVM. Gavin's notes on getting gitian builds up and running using KVM.
@@ -46,7 +46,16 @@ Test and Verify Tools
--------------------- ---------------------
### [TestGen](/contrib/testgen) ### ### [TestGen](/contrib/testgen) ###
Utilities to generate test vectors for the data-driven Bitcoin tests. Utilities to generate test vectors for the data-driven Agrarian tests.
### Smoke Tests ###
Current native build smoke tests:
```
./contrib/smoke-test-daemon.sh
./contrib/smoke-test-wallet.sh
./contrib/smoke-test-qt.sh
```
### [Test Patches](/contrib/test-patches) ### ### [Test Patches](/contrib/test-patches) ###
These patches are applied when the automated pull-tester These patches are applied when the automated pull-tester
+2 -2
View File
@@ -1,8 +1,8 @@
### BitRPC ### BitRPC
Allows for sending of all standard Bitcoin commands via RPC rather than as command line args. Allows for sending standard Agrarian RPC commands via RPC rather than as command line args.
### Looking for Wallet Tools? ### Looking for Wallet Tools?
BitRPC.py is able to do the exact same thing as `walletchangepass.py` and `walletunlock.py`. Their respective commands in BitRPC.py are: BitRPC.py is able to do the exact same thing as `walletchangepass.py` and `walletunlock.py`. Their respective commands in BitRPC.py are:
bitrpc.py walletpassphrasechange bitrpc.py walletpassphrasechange
bitrpc.py walletpassphrase bitrpc.py walletpassphrase
+8 -8
View File
@@ -25,7 +25,7 @@ git diff -U0 HEAD~1.. | ./contrib/devtools/clang-format-diff.py -p1 -i -v
copyright\_header.py copyright\_header.py
==================== ====================
Provides utilities for managing copyright headers of `The PIVX Provides utilities for managing copyright headers of `The Agrarian
developers` in repository source files. It has three subcommands: developers` in repository source files. It has three subcommands:
``` ```
@@ -44,31 +44,31 @@ Specifying `verbose` will list the full filenames of files of each category.
copyright\_header.py update \<base\_directory\> [verbose] copyright\_header.py update \<base\_directory\> [verbose]
--------------------------------------------------------- ---------------------------------------------------------
Updates all the copyright headers of `The PIVX developers` which were Updates all the copyright headers of `The Agrarian developers` which were
changed in a year more recent than is listed. For example: changed in a year more recent than is listed. For example:
``` ```
// Copyright (c) <firstYear>-<lastYear> The PIVX developers // Copyright (c) <firstYear>-<lastYear> The Agrarian developers
``` ```
will be updated to: will be updated to:
``` ```
// Copyright (c) <firstYear>-<lastModifiedYear> The PIVX developers // Copyright (c) <firstYear>-<lastModifiedYear> The Agrarian developers
``` ```
where `<lastModifiedYear>` is obtained from the `git log` history. where `<lastModifiedYear>` is obtained from the `git log` history.
This subcommand also handles copyright headers that have only a single year. In This subcommand also handles copyright headers that have only a single year. In
those cases: those cases:
``` ```
// Copyright (c) <year> The PIVX developers // Copyright (c) <year> The Agrarian developers
``` ```
will be updated to: will be updated to:
``` ```
// Copyright (c) <year>-<lastModifiedYear> The PIVX developers // Copyright (c) <year>-<lastModifiedYear> The Agrarian developers
``` ```
where the update is appropriate. where the update is appropriate.
copyright\_header.py insert \<file\> copyright\_header.py insert \<file\>
------------------------------------ ------------------------------------
Inserts a copyright header for `The PIVX developers` at the top of the Inserts a copyright header for `The Agrarian developers` at the top of the
file in either Python or C++ style as determined by the file extension. If the file in either Python or C++ style as determined by the file extension. If the
file is a Python file and it has `#!` starting the first line, the header is file is a Python file and it has `#!` starting the first line, the header is
inserted in the line below it. inserted in the line below it.
@@ -78,7 +78,7 @@ The copyright dates will be set to be `<year_introduced>-<current_year>` where
`<year_introduced>` is equal to `<current_year>`, it will be set as a single `<year_introduced>` is equal to `<current_year>`, it will be set as a single
year rather than two hyphenated years. year rather than two hyphenated years.
If the file already has a copyright for `The PIVX developers`, the If the file already has a copyright for `The Agrarian developers`, the
script will exit. script will exit.
gen-manpages.sh gen-manpages.sh
+1 -1
View File
@@ -1,5 +1,5 @@
### Qos ### ### Qos ###
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 51336, but not if the destination IP is within a LAN (defined as 192.168.x.x). This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Agrarian network. It limits outbound TCP traffic with a source or destination port of 51336, but not if the destination IP is within a LAN (defined as 192.168.x.x).
This means one can have an always-on agrariand instance running, and another local agrariand/agrarian-qt instance which connects to this node and receives blocks from it. This means one can have an always-on agrariand instance running, and another local agrariand/agrarian-qt instance which connects to this node and receives blocks from it.
+2 -2
View File
@@ -1,8 +1,8 @@
### TestGen ### ### TestGen ###
Utilities to generate test vectors for the data-driven Bitcoin tests. Utilities to generate test vectors for the data-driven Agrarian tests.
Usage: Usage:
gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
+4 -5
View File
@@ -12,11 +12,11 @@ For example:
make HOST=x86_64-w64-mingw32 -j4 make HOST=x86_64-w64-mingw32 -j4
A prefix will be generated that's suitable for plugging into Bitcoin's A prefix will be generated that's suitable for plugging into Agrarian's
configure. In the above example, a dir named x86_64-w64-mingw32 will be configure. In the above example, a dir named x86_64-w64-mingw32 will be
created. To use it for Bitcoin: created. To use it for Agrarian:
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32 CONFIG_SITE=`pwd`/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
Common `host-platform-triplets` for cross compilation are: Common `host-platform-triplets` for cross compilation are:
@@ -77,7 +77,7 @@ The following can be set when running make: make FOO=bar
BUILD_ID_SALT: Optional salt to use when generating build package ids BUILD_ID_SALT: Optional salt to use when generating build package ids
If some packages are not built, for example `make NO_WALLET=1`, the appropriate If some packages are not built, for example `make NO_WALLET=1`, the appropriate
options will be passed to bitcoin's configure. In this case, `--disable-wallet`. options will be passed to Agrarian's configure. In this case, `--disable-wallet`.
### Additional targets ### Additional targets
@@ -90,4 +90,3 @@ options will be passed to bitcoin's configure. In this case, `--disable-wallet`.
- [description.md](description.md): General description of the depends system - [description.md](description.md): General description of the depends system
- [packages.md](packages.md): Steps for adding packages - [packages.md](packages.md): Steps for adding packages
+1 -1
View File
@@ -1,4 +1,4 @@
This is a system of building and caching dependencies necessary for building Bitcoin. This is a system of building and caching dependencies necessary for building Agrarian.
There are several features that make it different from most similar systems: There are several features that make it different from most similar systems:
### It is designed to be builder and host agnostic ### It is designed to be builder and host agnostic
+2 -1
View File
@@ -36,6 +36,8 @@ Building
The following are developer notes on how to build Agrarian Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc. The following are developer notes on how to build Agrarian Core on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.
- [Dependencies](dependencies.md) - [Dependencies](dependencies.md)
- [Ubuntu 24.04 Build Notes](build-ubuntu-24.md)
- [Desktop Wallet Build Quick Start](build-wallets.md)
- [macOS Build Notes](build-osx.md) - [macOS Build Notes](build-osx.md)
- [Unix Build Notes](build-unix.md) - [Unix Build Notes](build-unix.md)
- [Windows Build Notes](build-windows.md) - [Windows Build Notes](build-windows.md)
@@ -46,7 +48,6 @@ Development
The Agrarian repo's [root README](/README.md) contains relevant information on the development process and automated testing. The Agrarian repo's [root README](/README.md) contains relevant information on the development process and automated testing.
- [Developer Notes](developer-notes.md) - [Developer Notes](developer-notes.md)
- [Multiwallet Qt Development](multiwallet-qt.md)
- [Release Notes](release-notes.md) - [Release Notes](release-notes.md)
- [Release Process](release-process.md) - [Release Process](release-process.md)
- [Source Code Documentation (External Link)](https://www.fuzzbawls.pw/agrarian/doxygen/) - [Source Code Documentation (External Link)](https://www.fuzzbawls.pw/agrarian/doxygen/)
+4 -1
View File
@@ -20,6 +20,10 @@ Dependencies
See [dependencies.md](dependencies.md) for a complete overview. See [dependencies.md](dependencies.md) for a complete overview.
Status note: this macOS system-library path is legacy and has not been part of
the current Qt6/OpenSSL3/Boost modernization smoke-test pass. The verified
modern desktop wallet path is native Ubuntu via `contrib/build-linux-wallet.sh`.
If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG: If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG:
brew install librsvg brew install librsvg
@@ -207,4 +211,3 @@ build process to remain somewhat deterministic. Here's how it works:
using the script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs). using the script that is also included there. Detached signatures are available from this [repository](https://github.com/bitcoin-core/bitcoin-detached-sigs).
- Builders feed the unsigned app + detached signature back into Gitian. It - Builders feed the unsigned app + detached signature back into Gitian. It
uses the pre-built tools to recombine the pieces into a deterministic dmg. uses the pre-built tools to recombine the pieces into a deterministic dmg.
+2
View File
@@ -13,6 +13,8 @@ Use at least 2 GB RAM for a reliable build. A 512 MB host with 2 GB swap can
configure successfully, but compilation is extremely slow and may time out while configure successfully, but compilation is extremely slow and may time out while
building large translation units. building large translation units.
Use `JOBS=1` on small hosts. On an 8-core, 16 GB host, `JOBS=8` is reasonable.
Packages Packages
-------- --------
+34 -11
View File
@@ -3,6 +3,8 @@ Copyright (c) 2026 Agrarian Developers
UNIX Build Notes UNIX Build Notes
These notes describe how to build Agrarian Core on Unix-based systems. These notes describe how to build Agrarian Core on Unix-based systems.
For Ubuntu 24.04, prefer the shorter and tested path in
`doc/build-ubuntu-24.md`.
IMPORTANT IMPORTANT
@@ -16,14 +18,24 @@ Example:
$BDB_PREFIX must be an absolute path. Using $(pwd) ensures an absolute $BDB_PREFIX must be an absolute path. Using $(pwd) ensures an absolute
path is used. path is used.
STANDARD BUILD STANDARD BUILD WITH DEPENDS
make -C depends HOST=x86_64-pc-linux-gnu NO_QT=0 -j$(nproc)
./autogen.sh ./autogen.sh
./configure CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure
make make -j$(nproc)
make install (optional) make install (optional)
If dependencies are satisfied, this will build agrarian-qt as well. The native depends wallet path currently builds Qt 6.8.3, OpenSSL 3.5.6,
Boost 1.91.0, protobuf, Berkeley DB, and supporting libraries.
For a daemon-only build:
JOBS=1 ./contrib/build-linux.sh
For a native Ubuntu desktop wallet build:
JOBS=1 ./contrib/build-linux-wallet.sh
DEPENDENCIES DEPENDENCIES
@@ -50,15 +62,15 @@ UBUNTU / DEBIAN
Build tools: Build tools:
sudo apt-get install build-essential libtool bsdmainutils autotools-dev autoconf pkg-config automake python3 sudo apt-get install build-essential libtool bsdmainutils autotools-dev autoconf pkg-config automake cmake ninja-build python3 curl git
Libraries: System libraries are needed only for non-depends builds. The deterministic
depends build should be preferred for reproducibility.
Libraries for a system-library build:
sudo apt-get install libssl-dev libgmp-dev libevent-dev libboost-all-dev sudo apt-get install libssl-dev libgmp-dev libevent-dev libboost-all-dev
OpenSSL Note: For Ubuntu >= 18.04 or Debian >= Stretch use
libssl1.0-dev. OpenSSL 1.1 is not officially supported.
Berkeley DB 4.8 (wallet support): Berkeley DB 4.8 (wallet support):
sudo apt-get install software-properties-common sudo apt-get install software-properties-common
@@ -73,7 +85,9 @@ Optional:
Qt GUI: Qt GUI:
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5 qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler Use the native depends wallet helper for Qt6:
JOBS=1 ./contrib/build-linux-wallet.sh
Disable GUI: Disable GUI:
@@ -91,7 +105,8 @@ Optional:
Qt: Qt:
sudo dnf install qt5-qttools-devel qt5-qtbase-devel protobuf-devel Native Qt6 builds are currently tested through the Ubuntu depends path.
Fedora system-Qt builds are not part of the current verified path.
HARDENING HARDENING
@@ -121,3 +136,11 @@ ARM CROSS COMPILATION
./autogen.sh ./autogen.sh
./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++ ./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++
make make
SMOKE TESTS
After a native build, run:
./contrib/smoke-test-daemon.sh
./contrib/smoke-test-wallet.sh
./contrib/smoke-test-qt.sh
+4 -2
View File
@@ -19,7 +19,8 @@ Use one job on small servers:
JOBS=1 ./contrib/build-linux-wallet.sh JOBS=1 ./contrib/build-linux-wallet.sh
JOBS=1 ./contrib/build-win64-wallet.sh JOBS=1 ./contrib/build-win64-wallet.sh
Use more jobs only when the host has enough memory. Use more jobs only when the host has enough memory. On an 8-core, 16 GB host,
`JOBS=8` is reasonable. On very small VPS instances, prefer `JOBS=1` and swap.
Ubuntu package baseline Ubuntu package baseline
----------------------- -----------------------
@@ -52,7 +53,8 @@ The wallet build is sensitive to tool version mismatches:
* Native Ubuntu uses the deterministic depends Qt6, OpenSSL, Boost, protobuf, * Native Ubuntu uses the deterministic depends Qt6, OpenSSL, Boost, protobuf,
and supporting libraries. and supporting libraries.
* Cross-target wallets must use the matching Qt host tools staged by depends. * Windows cross-target wallets currently use the existing Qt5 cross path and
matching Qt host tools staged by depends.
The helper scripts keep those rules in one place so the build is repeatable on a The helper scripts keep those rules in one place so the build is repeatable on a
fresh server. fresh server.
+9 -1
View File
@@ -56,7 +56,7 @@ INSTALLING WSL
3. Complete Setup 3. Complete Setup
- Open command prompt - Open command prompt
- Run: Ubuntu1804 - Launch the installed Ubuntu distribution
- Create a UNIX user account - Create a UNIX user account
Once WSL is active, continue with cross-compilation instructions below. Once WSL is active, continue with cross-compilation instructions below.
@@ -223,6 +223,14 @@ 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 a newer system `protoc` to regenerate wallet sources for this target. The helper
builds and stages a matching native `protoc` when needed. builds and stages a matching native `protoc` when needed.
============================================================
QT NOTE
============================================================
The current Windows cross-build helper still targets the existing Qt5 cross
path. The native Ubuntu wallet path has moved to Qt6. Keep those paths separate
until the Windows Qt6 cross-build is explicitly modernized and smoke-tested.
============================================================ ============================================================
END OF DOCUMENT END OF DOCUMENT
============================================================ ============================================================
+4 -4
View File
@@ -128,10 +128,10 @@ Qt pkg-config files missing in the depends prefix
The installer requires these `.pc` files in `depends/<host>/(lib|share)/pkgconfig`: The installer requires these `.pc` files in `depends/<host>/(lib|share)/pkgconfig`:
- `Qt5Core.pc` - Native Ubuntu Qt6 path: `Qt6Core.pc`, `Qt6Gui.pc`, `Qt6Network.pc`,
- `Qt5Gui.pc` `Qt6Widgets.pc`
- `Qt5Network.pc` - Windows cross-build Qt5 path: `Qt5Core.pc`, `Qt5Gui.pc`, `Qt5Network.pc`,
- `Qt5Widgets.pc` `Qt5Widgets.pc`
Fix by rebuilding depends with Qt enabled: Fix by rebuilding depends with Qt enabled:
+5
View File
@@ -32,6 +32,11 @@ If wallet is enabled (default), installer preflight checks require:
- `depends/<host>/lib/libboost_thread*.a` - `depends/<host>/lib/libboost_thread*.a`
- `depends/<host>/lib/libboost_system*.a` - `depends/<host>/lib/libboost_system*.a`
For the current native Ubuntu Qt wallet path, depends should also provide Qt6
pkg-config files such as `Qt6Core.pc`, `Qt6Gui.pc`, `Qt6Network.pc`, and
`Qt6Widgets.pc`. The Windows cross-build path still uses the existing Qt5
depends target.
When missing, the installer exits early and prints the exact missing path(s) plus the `make -C depends ...` command to fix them. When missing, the installer exits early and prints the exact missing path(s) plus the `make -C depends ...` command to fix them.
## Tests ## Tests