Skip to content

Commit 7959ab2

Browse files
committed
Merge branch 'auxpow'
2 parents 34cf3d9 + 434edd3 commit 7959ab2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+674
-171
lines changed

ci/lint/04_install.sh renamed to ci/lint/01_install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
export LC_ALL=C
88

9+
set -o errexit -o pipefail -o xtrace
10+
911
export CI_RETRY_EXE="/ci_retry --"
1012

1113
pushd "/"

ci/lint_imagefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV LC_ALL=C.UTF-8
1212
COPY ./ci/retry/retry /ci_retry
1313
COPY ./.python-version /.python-version
1414
COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
15-
COPY ./ci/lint/04_install.sh /install.sh
15+
COPY ./ci/lint/01_install.sh /install.sh
1616

1717
RUN /install.sh && \
1818
echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \

ci/lint_run_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ cp "./ci/retry/retry" "/ci_retry"
1313
cp "./.python-version" "/.python-version"
1414
mkdir --parents "/test/lint"
1515
cp --recursive "./test/lint/test_runner" "/test/lint/"
16-
set -o errexit; source ./ci/lint/04_install.sh
16+
set -o errexit; source ./ci/lint/01_install.sh
1717
set -o errexit
1818
./ci/lint/06_script.sh

ci/test/01_base_install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
export LC_ALL=C.UTF-8
88

9-
set -ex
9+
set -o errexit -o pipefail -o xtrace
1010

11-
CFG_DONE="ci.base-install-done" # Use a global git setting to remember whether this script ran to avoid running it twice
11+
CFG_DONE="${BASE_ROOT_DIR}/ci.base-install-done" # Use a global setting to remember whether this script ran to avoid running it twice
1212

13-
if [ "$(git config --global ${CFG_DONE})" == "true" ]; then
13+
if [ "$( cat "${CFG_DONE}" || true )" == "done" ]; then
1414
echo "Skip base install"
1515
exit 0
1616
fi
@@ -105,4 +105,4 @@ if [ -n "$XCODE_VERSION" ] && [ ! -d "${DEPENDS_DIR}/SDKs/${OSX_SDK_BASENAME}" ]
105105
tar -C "${DEPENDS_DIR}/SDKs" -xf "$OSX_SDK_PATH"
106106
fi
107107

108-
git config --global ${CFG_DONE} "true"
108+
echo -n "done" > "${CFG_DONE}"

ci/test/02_run_container.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,13 +153,9 @@ CI_EXEC () {
153153
export -f CI_EXEC
154154

155155
# Normalize all folders to BASE_ROOT_DIR
156-
CI_EXEC rsync --archive --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/"
156+
CI_EXEC rsync --recursive --perms --stats --human-readable "${BASE_READ_ONLY_DIR}/" "${BASE_ROOT_DIR}" || echo "Nothing to copy from ${BASE_READ_ONLY_DIR}/"
157157
CI_EXEC "${BASE_ROOT_DIR}/ci/test/01_base_install.sh"
158158

159-
# Fixes permission issues when there is a container UID/GID mismatch with the owner
160-
# of the git source code directory.
161-
CI_EXEC git config --global --add safe.directory \"*\"
162-
163159
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
164160

165161
CI_EXEC "${BASE_ROOT_DIR}/ci/test/03_test_script.sh"

cmake/module/AddBoostIfNeeded.cmake

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ function(add_boost_if_needed)
1717
directory and other added INTERFACE properties.
1818
]=]
1919

20-
# We cannot rely on find_package(Boost ...) to work properly without
21-
# Boost_NO_BOOST_CMAKE set until we require a more recent Boost because
22-
# upstream did not ship proper CMake files until 1.82.0.
23-
# Until then, we rely on CMake's FindBoost module.
24-
# See: https://cmake.org/cmake/help/latest/policy/CMP0167.html
25-
if(POLICY CMP0167)
26-
cmake_policy(SET CMP0167 OLD)
20+
if(CMAKE_HOST_APPLE)
21+
find_program(HOMEBREW_EXECUTABLE brew)
22+
if(HOMEBREW_EXECUTABLE)
23+
execute_process(
24+
COMMAND ${HOMEBREW_EXECUTABLE} --prefix boost
25+
OUTPUT_VARIABLE Boost_ROOT
26+
ERROR_QUIET
27+
OUTPUT_STRIP_TRAILING_WHITESPACE
28+
)
29+
endif()
2730
endif()
28-
set(Boost_NO_BOOST_CMAKE ON)
29-
find_package(Boost 1.73.0 REQUIRED)
30-
mark_as_advanced(Boost_INCLUDE_DIR)
31+
32+
find_package(Boost 1.73.0 REQUIRED CONFIG)
33+
mark_as_advanced(Boost_INCLUDE_DIR boost_headers_DIR)
3134
set_target_properties(Boost::headers PROPERTIES IMPORTED_GLOBAL TRUE)
3235
target_compile_definitions(Boost::headers INTERFACE
3336
# We don't use multi_index serialization.
@@ -45,34 +48,24 @@ function(add_boost_if_needed)
4548
# older than 1.80.
4649
# See: https://github.com/boostorg/config/pull/430.
4750
set(CMAKE_REQUIRED_DEFINITIONS -DBOOST_NO_CXX98_FUNCTION_BASE)
48-
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR})
49-
include(CMakePushCheckState)
50-
cmake_push_check_state()
51-
include(TryAppendCXXFlags)
51+
get_target_property(CMAKE_REQUIRED_INCLUDES Boost::headers INTERFACE_INCLUDE_DIRECTORIES)
5252
set(CMAKE_REQUIRED_FLAGS ${working_compiler_werror_flag})
5353
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
54+
include(CheckCXXSourceCompiles)
5455
check_cxx_source_compiles("
5556
#include <boost/config.hpp>
5657
" NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE
5758
)
58-
cmake_pop_check_state()
5959
if(NO_DIAGNOSTICS_BOOST_NO_CXX98_FUNCTION_BASE)
6060
target_compile_definitions(Boost::headers INTERFACE
6161
BOOST_NO_CXX98_FUNCTION_BASE
6262
)
63-
else()
64-
set(CMAKE_REQUIRED_DEFINITIONS)
6563
endif()
6664

6765
# Some package managers, such as vcpkg, vendor Boost.Test separately
6866
# from the rest of the headers, so we have to check for it individually.
6967
if(BUILD_TESTS AND DEFINED VCPKG_TARGET_TRIPLET)
70-
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DBOOST_TEST_NO_MAIN)
71-
include(CheckIncludeFileCXX)
72-
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
73-
if(NOT HAVE_BOOST_INCLUDED_UNIT_TEST_H)
74-
message(FATAL_ERROR "Building test_bitcoin executable requested but boost/test/included/unit_test.hpp header not available.")
75-
endif()
68+
find_package(boost_included_unit_test_framework ${Boost_VERSION} EXACT REQUIRED CONFIG)
7669
endif()
7770

7871
endfunction()

cmake/module/FindQRencode.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ endif()
2121

2222
find_path(QRencode_INCLUDE_DIR
2323
NAMES qrencode.h
24-
PATHS ${PC_QRencode_INCLUDE_DIRS}
24+
HINTS ${PC_QRencode_INCLUDE_DIRS}
2525
)
2626

2727
find_library(QRencode_LIBRARY_RELEASE
2828
NAMES qrencode
29-
PATHS ${PC_QRencode_LIBRARY_DIRS}
29+
HINTS ${PC_QRencode_LIBRARY_DIRS}
3030
)
3131
find_library(QRencode_LIBRARY_DEBUG
3232
NAMES qrencoded qrencode
33-
PATHS ${PC_QRencode_LIBRARY_DIRS}
33+
HINTS ${PC_QRencode_LIBRARY_DIRS}
3434
)
3535
include(SelectLibraryConfigurations)
3636
select_library_configurations(QRencode)

contrib/tracing/p2p_monitor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
5555
bpf_usdt_readarg(3, ctx, &pconn_type);
5656
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
57-
bpf_usdt_readarg(4, ctx, &pconn_type);
57+
bpf_usdt_readarg(4, ctx, &pmsg_type);
5858
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
5959
bpf_usdt_readarg(5, ctx, &msg.msg_size);
6060
@@ -71,7 +71,7 @@
7171
bpf_probe_read_user_str(&msg.peer_addr, sizeof(msg.peer_addr), paddr);
7272
bpf_usdt_readarg(3, ctx, &pconn_type);
7373
bpf_probe_read_user_str(&msg.peer_conn_type, sizeof(msg.peer_conn_type), pconn_type);
74-
bpf_usdt_readarg(4, ctx, &pconn_type);
74+
bpf_usdt_readarg(4, ctx, &pmsg_type);
7575
bpf_probe_read_user_str(&msg.msg_type, sizeof(msg.msg_type), pmsg_type);
7676
bpf_usdt_readarg(5, ctx, &msg.msg_size);
7777

depends/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ To build dependencies for the current arch+OS:
3333

3434
pkg install bash cmake curl gmake
3535

36+
Skip the following packages if you don't intend to use the GUI and will build with [`NO_QT=1`](#dependency-options):
37+
38+
pkg install bison ninja pkgconf python3
39+
3640
To build dependencies for the current arch+OS:
3741

3842
gmake

depends/packages/boost.mk

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
package=boost
2-
$(package)_version=1.81.0
3-
$(package)_download_path=https://archives.boost.io/release/$($(package)_version)/source/
4-
$(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.gz
5-
$(package)_sha256_hash=205666dea9f6a7cfed87c7a6dfbeb52a2c1b9de55712c9c1a87735d7181452b6
2+
$(package)_version = 1.88.0
3+
$(package)_download_path = https://github.com/boostorg/boost/releases/download/boost-$($(package)_version)
4+
$(package)_file_name = boost-$($(package)_version)-cmake.tar.gz
5+
$(package)_sha256_hash = dcea50f40ba1ecfc448fdf886c0165cf3e525fef2c9e3e080b9804e8117b9694
6+
$(package)_patches = skip_compiled_targets.patch
7+
$(package)_build_subdir = build
8+
9+
define $(package)_set_vars
10+
$(package)_config_opts = -DBOOST_INCLUDE_LIBRARIES="multi_index;signals2;test"
11+
$(package)_config_opts += -DBOOST_TEST_HEADERS_ONLY=ON
12+
$(package)_config_opts += -DBOOST_ENABLE_MPI=OFF
13+
$(package)_config_opts += -DBOOST_ENABLE_PYTHON=OFF
14+
$(package)_config_opts += -DBOOST_INSTALL_LAYOUT=system
15+
$(package)_config_opts += -DBUILD_TESTING=OFF
16+
$(package)_config_opts += -DCMAKE_DISABLE_FIND_PACKAGE_ICU=ON
17+
endef
18+
19+
define $(package)_preprocess_cmds
20+
patch -p1 < $($(package)_patch_dir)/skip_compiled_targets.patch
21+
endef
22+
23+
define $(package)_config_cmds
24+
$($(package)_cmake) -S .. -B .
25+
endef
626

727
define $(package)_stage_cmds
8-
mkdir -p $($(package)_staging_prefix_dir)/include && \
9-
cp -r boost $($(package)_staging_prefix_dir)/include
28+
$(MAKE) DESTDIR=$($(package)_staging_dir) install
1029
endef

0 commit comments

Comments
 (0)