From 1243e37f13061ca7990688f66b139efbb5fcc301 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Wed, 23 Mar 2022 16:26:26 +0100 Subject: [PATCH] qa: Use packaged bdb5 install script for macos native CI - Self-compile bdb5.3 using contrib/install_db5.sh - Enable posixthreads flag on bdb5 macos native compilation - Install db5 files into an absolute path - Add the BDB_LIBS and BDB_CLFAGS env vars to ./configure Co-authored-by: Ross Nicoll --- .cirrus.yml | 2 +- ci/test/00_setup_env_mac_host.sh | 3 ++- ci/test/05_before_script.sh | 5 +++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 93f94af73..750c3e863 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -138,7 +138,7 @@ task: name: 'macOS 10.14 native [GOAL: install] [GUI] [no depends]' brew_install_script: - brew update - - brew install boost libevent berkeley-db4 qt@5 miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt + - brew install boost libevent qt@5 miniupnpc ccache zeromq qrencode sqlite libtool automake pkg-config gnu-getopt << : *GLOBAL_TASK_TEMPLATE osx_instance: # Use latest image, but hardcode version to avoid silent upgrades (and breaks) diff --git a/ci/test/00_setup_env_mac_host.sh b/ci/test/00_setup_env_mac_host.sh index a710d983e..1ca92535c 100644 --- a/ci/test/00_setup_env_mac_host.sh +++ b/ci/test/00_setup_env_mac_host.sh @@ -9,7 +9,8 @@ export LC_ALL=C.UTF-8 export HOST=x86_64-apple-darwin16 export PIP_PACKAGES="zmq" export GOAL="install" -export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --with-boost-process" +export BDB_PREFIX="${BASE_ROOT_DIR}/db5" +export BITCOIN_CONFIG="--with-gui --enable-reduce-exports --with-boost-process BDB_LIBS='-L${BDB_PREFIX}/lib -ldb_cxx-5.3' BDB_CFLAGS='-I${BDB_PREFIX}/include'" export CI_OS_NAME="macos" export NO_DEPENDS=1 export OSX_SDK="" diff --git a/ci/test/05_before_script.sh b/ci/test/05_before_script.sh index 5d0034be1..89ecb4ac7 100755 --- a/ci/test/05_before_script.sh +++ b/ci/test/05_before_script.sh @@ -31,6 +31,11 @@ if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then DOCKER_EXEC "contrib/install_db5.sh \$(pwd) --enable-umrw CC=clang CXX=clang++ CFLAGS='${MSAN_FLAGS}' CXXFLAGS='${MSAN_AND_LIBCXX_FLAGS}'" fi +if [[ $HOST = *-apple-darwin16 ]]; then + # Use BDB compiled using install_db5.sh script as Brew does not supply BDB 5.3 + DOCKER_EXEC "contrib/install_db5.sh \$BASE_ROOT_DIR --enable-posixmutexes" +fi + if [ -n "$XCODE_VERSION" ] && [ -f "$OSX_SDK_PATH" ]; then DOCKER_EXEC tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH" fi