diff --git a/contrib/build-linux.sh b/contrib/build-linux.sh index 108e7058..53b6e6b3 100755 --- a/contrib/build-linux.sh +++ b/contrib/build-linux.sh @@ -4,22 +4,36 @@ set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" JOBS="${JOBS:-1}" MODE="${MODE:-daemon}" +HOST="${HOST:-$("$ROOT/depends/config.guess")}" +PREFIX="$ROOT/depends/$HOST" +BASE_CONFIG="$PREFIX/share/config.site" + +require_path() { + if [[ ! -e "$1" ]]; then + echo "Missing required path: $1" >&2 + exit 1 + fi +} cd "$ROOT" -if [[ ! -f configure ]]; then - ./autogen.sh -fi - case "$MODE" in daemon) - ./configure \ + echo "Building native daemon depends for $HOST..." + make -C depends HOST="$HOST" NO_QT=1 -j"$JOBS" + require_path "$BASE_CONFIG" + + if [[ ! -f configure ]]; then + ./autogen.sh + fi + + echo "Configuring Linux daemon build..." + CONFIG_SITE="$BASE_CONFIG" ./configure \ --without-gui \ --disable-tests \ --disable-bench \ --disable-zmq \ --with-miniupnpc=no \ - --with-incompatible-bdb \ CXXFLAGS="${CXXFLAGS:--O0 -g0 --param ggc-min-expand=1 --param ggc-min-heapsize=32768}" ;; wallet) diff --git a/doc/build-menu.md b/doc/build-menu.md index 1f67ac0a..bddb0162 100644 --- a/doc/build-menu.md +++ b/doc/build-menu.md @@ -38,6 +38,10 @@ packages. If they are missing, it asks before adding a standard `/etc/apt/sources.list.d/agrarian-ubuntu.sources` file for the host architecture. +The Linux daemon option uses the deterministic native `depends/` build with Qt +disabled, so Berkeley DB and other core libraries are built inside the checkout +instead of being required as Ubuntu system development packages. + Defaults -------- diff --git a/doc/build-ubuntu-24.md b/doc/build-ubuntu-24.md index d0249eb3..c9f8982b 100644 --- a/doc/build-ubuntu-24.md +++ b/doc/build-ubuntu-24.md @@ -30,26 +30,17 @@ For a headless Qt wallet smoke test, also install: sudo apt-get install -y \ xvfb -Daemon-only build ------------------ +Daemon build +------------ -For the pool daemon, the GUI, tests, bench, ZMQ, and UPnP can be disabled: - - ./autogen.sh - ./configure \ - --without-gui \ - --disable-tests \ - --disable-bench \ - --disable-zmq \ - --with-miniupnpc=no \ - --with-incompatible-bdb \ - CXXFLAGS="-O0 -g0 --param ggc-min-expand=1 --param ggc-min-heapsize=32768" - make -j1 - -The daemon helper runs the same path: +For the daemon and CLI tools, use: JOBS=1 ./contrib/build-linux.sh +The daemon helper builds/restores the native deterministic depends prefix first +with Qt disabled. Berkeley DB, OpenSSL, Boost, libevent, GMP, and supporting +libraries come from `depends/`, not from Ubuntu system headers. + Qt wallet build ---------------