From 9eead5131a91d084550b5898de4b797b23165a01 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Tue, 6 Feb 2024 15:41:25 -0800 Subject: [PATCH 1/2] Regenerate artifacts. --- .github/workflows/ci.yml | 110 ++++++++++++++++++------------- builds/cmake/CMakeLists.txt | 127 +++++++++++++++++++++++------------- configure.ac | 6 ++ install-cmake.sh | 15 ++--- install-cmakepresets.sh | 15 ++--- install.sh | 2 + 6 files changed, 162 insertions(+), 113 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9439ce1..946bbec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,22 +18,22 @@ jobs: matrix: include: - os: ubuntu-22.04 - cxx: "clang++-14" + cxx: "clang++-15" link: "dynamic" - optimization: "size" + optimization: "debug" assert: "debug" coverage: "nocov" boost: "--build-boost" icu: "" zmq: "--build-zmq" - cc: "clang-14" - flags: "-Os -fPIE" + cc: "clang-15" + flags: "-Og -fPIE" options: "--enable-isystem" packager: "apt" packages: "" - os: ubuntu-22.04 - cxx: "clang++-14" + cxx: "clang++-15" link: "static" optimization: "size" assert: "ndebug" @@ -41,7 +41,7 @@ jobs: boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang-15" flags: "-Os -fPIE" options: "--enable-isystem" packager: "apt" @@ -65,20 +65,20 @@ jobs: - os: ubuntu-22.04 cxx: "g++-11" link: "static" - optimization: "debug" + optimization: "size" assert: "ndebug" coverage: "nocov" boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" cc: "gcc-11" - flags: "-Og -fPIE" + flags: "-Os -fPIE" options: "--enable-isystem" packager: "apt" packages: "" - os: macos-latest - cxx: "clang++-14" + cxx: "clang++" link: "dynamic" optimization: "size" assert: "ndebug" @@ -86,14 +86,14 @@ jobs: boost: "--build-boost" icu: "--with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang" flags: "-Os -fPIE" options: "--enable-isystem" packager: "brew" packages: "icu4c" - os: macos-latest - cxx: "clang++-14" + cxx: "clang++" link: "static" optimization: "size" assert: "ndebug" @@ -101,7 +101,7 @@ jobs: boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang" flags: "-Os -fvisibility=hidden -fPIE" options: "--enable-isystem" packager: "brew" @@ -119,7 +119,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare toolchain [generic] run: | @@ -140,7 +140,7 @@ jobs: shell: bash run: | WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-protocol}" - echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV + echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV if [[ ${{ matrix.assert }} == 'ndebug' ]]; then echo "ASSERT_NDEBUG=--enable-ndebug" >> $GITHUB_ENV else @@ -152,9 +152,15 @@ jobs: echo "LINKAGE=--disable-shared" >> $GITHUB_ENV fi if [[ ${{ matrix.link }} == 'dynamic' ]]; then - echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV + echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/lib" >> $GITHUB_ENV fi + - name: Display Compiler details + shell: bash + run: | + ${CC} -v + ${CXX} -v + - name: Display CPU details if: ${{ (runner.os == 'Linux') }} shell: bash @@ -164,8 +170,8 @@ jobs: - name: Execute install.sh run: > ./install.sh - --build-dir=$LIBBITCOIN_SRC_PATH ${{ matrix.options }} - --prefix=$LIBBITCOIN_SRC_PATH/prefix + --build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }} + --prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix ${{ env.LINKAGE }} ${{ env.ASSERT_NDEBUG }} ${{ matrix.boost }} @@ -242,22 +248,22 @@ jobs: matrix: include: - os: ubuntu-22.04 - cxx: "clang++-14" + cxx: "clang++-15" link: "dynamic" - optimization: "size" + optimization: "debug" assert: "debug" coverage: "nocov" boost: "--build-boost" icu: "" zmq: "--build-zmq" - cc: "clang-14" - flags: "-Os -fPIE" + cc: "clang-15" + flags: "-Og -fPIE" options: "" packager: "apt" packages: "" - os: ubuntu-22.04 - cxx: "clang++-14" + cxx: "clang++-15" link: "static" optimization: "size" assert: "ndebug" @@ -265,7 +271,7 @@ jobs: boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang-15" flags: "-Os -fPIE" options: "" packager: "apt" @@ -289,20 +295,20 @@ jobs: - os: ubuntu-22.04 cxx: "g++-11" link: "static" - optimization: "debug" + optimization: "size" assert: "ndebug" coverage: "nocov" boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" cc: "gcc-11" - flags: "-Og -fPIE" + flags: "-Os -fPIE" options: "" packager: "apt" packages: "" - os: macos-latest - cxx: "clang++-14" + cxx: "clang++" link: "dynamic" optimization: "size" assert: "ndebug" @@ -310,14 +316,14 @@ jobs: boost: "--build-boost" icu: "--with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang" flags: "-Os -fPIE" options: "" packager: "brew" packages: "icu4c" - os: macos-latest - cxx: "clang++-14" + cxx: "clang++" link: "static" optimization: "size" assert: "ndebug" @@ -325,7 +331,7 @@ jobs: boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang" flags: "-Os -fvisibility=hidden -fPIE" options: "" packager: "brew" @@ -343,7 +349,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare toolchain [generic] run: | @@ -364,7 +370,7 @@ jobs: shell: bash run: | WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-protocol}" - echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV + echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV if [[ ${{ matrix.packager }} == 'brew' ]]; then echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV fi @@ -379,9 +385,15 @@ jobs: echo "LINKAGE=--disable-shared" >> $GITHUB_ENV fi if [[ ${{ matrix.link }} == 'dynamic' ]]; then - echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/lib" >> $GITHUB_ENV + echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/lib" >> $GITHUB_ENV fi + - name: Display Compiler details + shell: bash + run: | + ${CC} -v + ${CXX} -v + - name: Display CPU details if: ${{ (runner.os == 'Linux') }} shell: bash @@ -391,8 +403,8 @@ jobs: - name: Execute install-cmake.sh run: > ./install-cmake.sh - --build-dir=$LIBBITCOIN_SRC_PATH ${{ matrix.options }} - --prefix=$LIBBITCOIN_SRC_PATH/prefix + --build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }} + --prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix ${{ env.LINKAGE }} ${{ env.ASSERT_NDEBUG }} ${{ matrix.boost }} @@ -480,23 +492,23 @@ jobs: include: - os: ubuntu-22.04 preset: "nix-gnu-debug-shared" - cxx: "clang++-14" + cxx: "clang++-15" link: "dynamic" - optimization: "size" + optimization: "debug" assert: "debug" coverage: "nocov" boost: "--build-boost" icu: "" zmq: "--build-zmq" - cc: "clang-14" - flags: "-Os -fPIE" + cc: "clang-15" + flags: "-Og -fPIE" options: "" packager: "apt" packages: "" - os: ubuntu-22.04 preset: "nix-gnu-release-static-size" - cxx: "clang++-14" + cxx: "clang++-15" link: "static" optimization: "size" assert: "ndebug" @@ -504,7 +516,7 @@ jobs: boost: "--build-boost" icu: "--build-icu --with-icu" zmq: "--build-zmq" - cc: "clang-14" + cc: "clang-15" flags: "-Os -fPIE" options: "" packager: "apt" @@ -538,7 +550,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Prepare toolchain [generic] run: | @@ -559,7 +571,7 @@ jobs: shell: bash run: | WORKSPACE_SUBPATH="${GITHUB_WORKSPACE%libbitcoin-protocol}" - echo "LIBBITCOIN_SRC_PATH=$WORKSPACE_SUBPATH" >> $GITHUB_ENV + echo "LIBBITCOIN_SRC_PATH=${WORKSPACE_SUBPATH}" >> $GITHUB_ENV if [[ ${{ matrix.packager }} == 'brew' ]]; then echo "CMAKE_LIBRARY_PATH=/usr/local/lib" >> $GITHUB_ENV fi @@ -574,9 +586,15 @@ jobs: echo "LINKAGE=--disable-shared" >> $GITHUB_ENV fi if [[ ${{ matrix.link }} == 'dynamic' ]]; then - echo "LDFLAGS=-Wl,-rpath,$WORKSPACE_SUBPATH/prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV + echo "LDFLAGS=-Wl,-rpath,${WORKSPACE_SUBPATH}prefix/${{ matrix.preset }}/lib" >> $GITHUB_ENV fi + - name: Display Compiler details + shell: bash + run: | + ${CC} -v + ${CXX} -v + - name: Display CPU details if: ${{ (runner.os == 'Linux') }} shell: bash @@ -586,8 +604,8 @@ jobs: - name: Execute install-cmakepresets.sh run: > ./install-cmakepresets.sh - --build-dir=$LIBBITCOIN_SRC_PATH ${{ matrix.options }} - --prefix=$LIBBITCOIN_SRC_PATH/prefix/${{ matrix.preset }} + --build-dir=${{ env.LIBBITCOIN_SRC_PATH }} ${{ matrix.options }} + --prefix=${{ env.LIBBITCOIN_SRC_PATH }}prefix/${{ matrix.preset }} --preset=${{ matrix.preset }} ${{ env.LINKAGE }} ${{ env.ASSERT_NDEBUG }} @@ -706,7 +724,7 @@ jobs: msbuild-architecture: x64 - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize SDK shell: powershell diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index 7965de2..7fb4654 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -7,7 +7,7 @@ # libbitcoin-protocol project configuration. #------------------------------------------------------------------------------ -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 3.18 FATAL_ERROR) project(libbitcoin-protocol LANGUAGES C CXX) @@ -18,6 +18,7 @@ include(CheckIncludeFiles) include(CheckSymbolExists) include(CheckCXXCompilerFlag) include(CheckCXXSourceCompiles) +include(CheckLinkerFlag) set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -142,11 +143,7 @@ find_package( Boost 1.76.0 REQUIRED COMPONENTS set( boost_unit_test_framework_LIBS "-lboost_unit_test_framework" ) -if (enable-ndebug) - set( Boost_LIBRARY_DIR "${Boost_LIBRARY_DIR_DEBUG}" ) -else () - set( Boost_LIBRARY_DIR "${Boost_LIBRARY_DIR_RELEASE}" ) -endif() +set( Boost_LIBRARY_DIR $,"${Boost_LIBRARY_DIR_RELEASE}","${Boost_LIBRARY_DIR_DEBUG}">) set( boost_CPPFLAGS "-I${Boost_INCLUDE_DIR}" ) set( boost_LDFLAGS "-L${Boost_LIBRARY_DIR}" ) @@ -159,46 +156,75 @@ find_package( Zmq 4.3.4 REQUIRED ) #------------------------------------------------------------------------------ find_package( Bitcoin-System 4.0.0 REQUIRED ) -# Define project common includes directories +# Define project common includes for build. #------------------------------------------------------------------------------ if (BUILD_SHARED_LIBS) - include_directories( SYSTEM - ${zmq_INCLUDE_DIRS} - ${bitcoin_system_INCLUDE_DIRS} ) + set( zmq_FOR_BUILD_INCLUDE_DIRS ${zmq_INCLUDE_DIRS} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_INCLUDE_DIRS ${bitcoin_system_INCLUDE_DIRS} CACHE STRING "Placeholder" ) else() - include_directories( SYSTEM - ${zmq_STATIC_INCLUDE_DIRS} - ${bitcoin_system_STATIC_INCLUDE_DIRS} ) + set( zmq_FOR_BUILD_INCLUDE_DIRS ${zmq_STATIC_INCLUDE_DIRS} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_INCLUDE_DIRS ${bitcoin_system_STATIC_INCLUDE_DIRS} CACHE STRING "Placeholder" ) endif() -# Define project common library directories +# Define project common includes directories +#------------------------------------------------------------------------------ +include_directories( SYSTEM + ${zmq_FOR_BUILD_INCLUDE_DIRS} + ${bitcoin_system_FOR_BUILD_INCLUDE_DIRS} ) + +# Define project common library directories for build. #------------------------------------------------------------------------------ if (BUILD_SHARED_LIBS) - link_directories( - ${zmq_LIBRARY_DIRS} - ${bitcoin_system_LIBRARY_DIRS} ) + set( zmq_FOR_BUILD_LIBRARY_DIRS ${zmq_LIBRARY_DIRS} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_LIBRARY_DIRS ${bitcoin_system_LIBRARY_DIRS} CACHE STRING "Placeholder" ) else() - link_directories( - ${zmq_STATIC_LIBRARY_DIRS} - ${bitcoin_system_STATIC_LIBRARY_DIRS} ) + set( zmq_FOR_BUILD_LIBRARY_DIRS ${zmq_STATIC_LIBRARY_DIRS} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_LIBRARY_DIRS ${bitcoin_system_STATIC_LIBRARY_DIRS} CACHE STRING "Placeholder" ) +endif() + +# Define project common library directories +#------------------------------------------------------------------------------ +link_directories( + ${zmq_FOR_BUILD_LIBRARY_DIRS} + ${bitcoin_system_FOR_BUILD_LIBRARY_DIRS} ) + +# Define project common linker flags. +#------------------------------------------------------------------------------ +check_linker_flag(CXX "-no_fixup_chains" "no_fixup_chains_FOUND") + +if (no_fixup_chains_FOUND) + add_link_options("-no_fixup_chains") +endif() + +check_linker_flag(CXX "-fstack-protector" "fstack_protector_FOUND") + +if (fstack_protector_FOUND) + add_link_options("-fstack-protector") +endif() + +check_linker_flag(CXX "-fstack-protector-all" "fstack_protector_all_FOUND") + +if (fstack_protector_all_FOUND) + add_link_options("-fstack-protector-all") endif() -# Define project common libraries/linker flags. + +# Define common library usage for build. #------------------------------------------------------------------------------ if (BUILD_SHARED_LIBS) - link_libraries( - "-fstack-protector" - "-fstack-protector-all" - ${zmq_LIBRARIES} - ${bitcoin_system_LIBRARIES} ) + set( zmq_FOR_BUILD_LIBRARIES ${zmq_LIBRARIES} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_LIBRARIES ${bitcoin_system_LIBRARIES} CACHE STRING "Placeholder" ) else() - link_libraries( - "-fstack-protector" - "-fstack-protector-all" - ${zmq_STATIC_LIBRARIES} - ${bitcoin_system_STATIC_LIBRARIES} ) + set( zmq_FOR_BUILD_LIBRARIES ${zmq_STATIC_LIBRARIES} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_LIBRARIES ${bitcoin_system_STATIC_LIBRARIES} CACHE STRING "Placeholder" ) endif() +# Define project common libraries. +#------------------------------------------------------------------------------ +link_libraries( + ${zmq_FOR_BUILD_LIBRARIES} + ${bitcoin_system_FOR_BUILD_LIBRARIES} ) + # Define ${CANONICAL_LIB_NAME} project. #------------------------------------------------------------------------------ add_library( ${CANONICAL_LIB_NAME} @@ -217,35 +243,42 @@ add_library( ${CANONICAL_LIB_NAME} "../../src/zmq/socket.cpp" "../../src/zmq/worker.cpp" ) -# ${CANONICAL_LIB_NAME} project specific include directories. +# ${CANONICAL_LIB_NAME} project specific include directory normalization for build. #------------------------------------------------------------------------------ if (BUILD_SHARED_LIBS) - target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE - "../../include" - ${zmq_INCLUDE_DIRS} - ${bitcoin_system_INCLUDE_DIRS} ) + set( zmq_FOR_BUILD_INCLUDE_DIRS ${zmq_INCLUDE_DIRS} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_INCLUDE_DIRS ${bitcoin_system_INCLUDE_DIRS} CACHE STRING "Placeholder" ) else() - target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE - "../../include" - ${zmq_STATIC_INCLUDE_DIRS} - ${bitcoin_system_STATIC_INCLUDE_DIRS} ) + set( zmq_FOR_BUILD_INCLUDE_DIRS ${zmq_STATIC_INCLUDE_DIRS} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_INCLUDE_DIRS ${bitcoin_system_STATIC_INCLUDE_DIRS} CACHE STRING "Placeholder" ) endif() +# ${CANONICAL_LIB_NAME} project specific include directories. +#------------------------------------------------------------------------------ +target_include_directories( ${CANONICAL_LIB_NAME} PRIVATE + "../../include" + ${zmq_FOR_BUILD_INCLUDE_DIRS} + ${bitcoin_system_FOR_BUILD_INCLUDE_DIRS} ) + target_include_directories( ${CANONICAL_LIB_NAME} PUBLIC "../../include" ) -# ${CANONICAL_LIB_NAME} project specific libraries/linker flags. +# ${CANONICAL_LIB_NAME} project specific libraries noramalization for build. #------------------------------------------------------------------------------ if (BUILD_SHARED_LIBS) - target_link_libraries( ${CANONICAL_LIB_NAME} - ${zmq_LIBRARIES} - ${bitcoin_system_LIBRARIES} ) + set( zmq_FOR_BUILD_LIBRARIES ${zmq_LIBRARIES} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_LIBRARIES ${bitcoin_system_LIBRARIES} CACHE STRING "Placeholder" ) else() - target_link_libraries( ${CANONICAL_LIB_NAME} - ${zmq_STATIC_LIBRARIES} - ${bitcoin_system_STATIC_LIBRARIES} ) + set( zmq_FOR_BUILD_LIBRARIES ${zmq_STATIC_LIBRARIES} CACHE STRING "Placeholder" ) + set( bitcoin_system_FOR_BUILD_LIBRARIES ${bitcoin_system_STATIC_LIBRARIES} CACHE STRING "Placeholder" ) endif() +# ${CANONICAL_LIB_NAME} project specific libraries/linker flags. +#------------------------------------------------------------------------------ +target_link_libraries( ${CANONICAL_LIB_NAME} + ${zmq_FOR_BUILD_LIBRARIES} + ${bitcoin_system_FOR_BUILD_LIBRARIES} ) + # Define libbitcoin-protocol-test project. #------------------------------------------------------------------------------ if (with-tests) diff --git a/configure.ac b/configure.ac index 3de68c7..0c46a4a 100644 --- a/configure.ac +++ b/configure.ac @@ -192,6 +192,12 @@ AS_CASE([${CC}], [*clang*], [AX_CHECK_COMPILE_FLAG([-Wno-mismatched-tags], [CXXFLAGS="$CXXFLAGS -Wno-mismatched-tags"])]) +# Address -undefined dynamic_lookup MacOS error. +#------------------------------------------------------------------------------ +AS_CASE([${CC}], [*], + [AX_CHECK_LINK_FLAG([-no_fixup_chains], + [LDFLAGS="$LDFLAGS -no_fixup_chains"])]) + # Protect stack. #------------------------------------------------------------------------------ AS_CASE([${CC}], [*], diff --git a/install-cmake.sh b/install-cmake.sh index 951f222..f295218 100755 --- a/install-cmake.sh +++ b/install-cmake.sh @@ -450,15 +450,9 @@ set_pkgconfigdir() set_with_boost_prefix() { if [[ $BUILD_BOOST ]]; then - # Boost has no pkg-config, m4 searches in the following order: - # --with-boost=, /usr, /usr/local, /opt, /opt/local, $BOOST_ROOT. - # We use --with-boost to prioritize the --prefix path when we build it. - # Otherwise standard paths suffice for Linux, Homebrew and MacPorts. - # ax_boost_base.m4 appends /include and adds to BOOST_CPPFLAGS - # ax_boost_base.m4 searches for /lib /lib64 and adds to BOOST_LDFLAGS - # - # cmake does not process this argument, so it has been zeroed out. - with_boost="" + # Boost detection via FindBoost.cmake provides for path hint via + # $BOOT_ROOT environment variable only. + export BOOST_ROOT="$PREFIX" fi } @@ -479,6 +473,7 @@ display_configuration() display_message "BUILD_ICU : $BUILD_ICU" display_message "BUILD_ZMQ : $BUILD_ZMQ" display_message "BUILD_BOOST : $BUILD_BOOST" + display_message "BOOST_ROOT : $BOOST_ROOT" display_message "BUILD_DIR : $BUILD_DIR" display_message "CUMULATIVE_FILTERED_ARGS : $CUMULATIVE_FILTERED_ARGS" display_message "CUMULATIVE_FILTERED_ARGS_CMAKE : $CUMULATIVE_FILTERED_ARGS_CMAKE" @@ -723,7 +718,7 @@ cmake_project_directory() local PROJ_CONFIG_DIR PROJ_CONFIG_DIR=$(pwd) - cmake $@ builds/cmake + cmake -LA $@ builds/cmake make_jobs "$JOBS" if [[ $TEST == true ]]; then diff --git a/install-cmakepresets.sh b/install-cmakepresets.sh index 4012079..aeb4515 100755 --- a/install-cmakepresets.sh +++ b/install-cmakepresets.sh @@ -495,15 +495,9 @@ set_pkgconfigdir() set_with_boost_prefix() { if [[ $BUILD_BOOST ]]; then - # Boost has no pkg-config, m4 searches in the following order: - # --with-boost=, /usr, /usr/local, /opt, /opt/local, $BOOST_ROOT. - # We use --with-boost to prioritize the --prefix path when we build it. - # Otherwise standard paths suffice for Linux, Homebrew and MacPorts. - # ax_boost_base.m4 appends /include and adds to BOOST_CPPFLAGS - # ax_boost_base.m4 searches for /lib /lib64 and adds to BOOST_LDFLAGS - # - # cmake does not process this argument, so it has been zeroed out. - with_boost="" + # Boost detection via FindBoost.cmake provides for path hint via + # $BOOT_ROOT environment variable only. + export BOOST_ROOT="$PREFIX" fi } @@ -524,6 +518,7 @@ display_configuration() display_message "BUILD_ICU : $BUILD_ICU" display_message "BUILD_ZMQ : $BUILD_ZMQ" display_message "BUILD_BOOST : $BUILD_BOOST" + display_message "BOOST_ROOT : $BOOST_ROOT" display_message "BUILD_DIR : $BUILD_DIR" display_message "PRESET_ID : $PRESET_ID" display_message "CUMULATIVE_FILTERED_ARGS : $CUMULATIVE_FILTERED_ARGS" @@ -772,7 +767,7 @@ cmake_project_directory() push_directory "builds/cmake" display_message "Preparing cmake --preset=$PRESET $@" - cmake --preset=$PRESET $@ + cmake -LA --preset=$PRESET $@ popd push_directory "obj/$PRESET" diff --git a/install.sh b/install.sh index b5979ad..0bfb459 100755 --- a/install.sh +++ b/install.sh @@ -397,6 +397,7 @@ set_with_boost_prefix() # ax_boost_base.m4 appends /include and adds to BOOST_CPPFLAGS # ax_boost_base.m4 searches for /lib /lib64 and adds to BOOST_LDFLAGS with_boost="--with-boost=$PREFIX" + export BOOST_ROOT="$PREFIX" fi } @@ -417,6 +418,7 @@ display_configuration() display_message "BUILD_ICU : $BUILD_ICU" display_message "BUILD_ZMQ : $BUILD_ZMQ" display_message "BUILD_BOOST : $BUILD_BOOST" + display_message "BOOST_ROOT : $BOOST_ROOT" display_message "BUILD_DIR : $BUILD_DIR" display_message "PREFIX : $PREFIX" display_message "DISABLE_SHARED : $DISABLE_SHARED" From fbd6ab5dcb4907031b48adfbf8091fa535524c10 Mon Sep 17 00:00:00 2001 From: Phillip Mienk Date: Fri, 9 Feb 2024 22:02:15 -0800 Subject: [PATCH 2/2] Regenerate artifacts (update zeromq to 4.3.5). --- builds/cmake/CMakeLists.txt | 2 +- configure.ac | 12 ++++++------ install-cmake.sh | 4 ++-- install-cmakepresets.sh | 4 ++-- install.sh | 4 ++-- libbitcoin-protocol.pc.in | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/builds/cmake/CMakeLists.txt b/builds/cmake/CMakeLists.txt index 7fb4654..fdec50c 100644 --- a/builds/cmake/CMakeLists.txt +++ b/builds/cmake/CMakeLists.txt @@ -150,7 +150,7 @@ set( boost_LDFLAGS "-L${Boost_LIBRARY_DIR}" ) # Find zmq #------------------------------------------------------------------------------ -find_package( Zmq 4.3.4 REQUIRED ) +find_package( Zmq 4.3.5 REQUIRED ) # Find bitcoin-system #------------------------------------------------------------------------------ diff --git a/configure.ac b/configure.ac index 0c46a4a..99f9b0c 100644 --- a/configure.ac +++ b/configure.ac @@ -237,13 +237,13 @@ AS_CASE([${with_tests}], [yes], AC_MSG_NOTICE([boost_unit_test_framework_LIBS : ${boost_unit_test_framework_LIBS}])], [AC_SUBST([boost_unit_test_framework_LIBS], [])]) -# Require zmq of at least version 4.3.4 and output ${zmq_CPPFLAGS/LIBS/PKG}. +# Require zmq of at least version 4.3.5 and output ${zmq_CPPFLAGS/LIBS/PKG}. #------------------------------------------------------------------------------ -PKG_CHECK_MODULES([zmq], [libzmq >= 4.3.4], - [zmq_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libzmq >= 4.3.4" 2>/dev/null`" - zmq_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libzmq >= 4.3.4" 2>/dev/null`"], - [AC_MSG_ERROR([libzmq >= 4.3.4 is required but was not found.])]) -AC_SUBST([zmq_PKG], ['libzmq >= 4.3.4']) +PKG_CHECK_MODULES([zmq], [libzmq >= 4.3.5], + [zmq_INCLUDEDIR="`$PKG_CONFIG --variable=includedir "libzmq >= 4.3.5" 2>/dev/null`" + zmq_OTHER_CFLAGS="`$PKG_CONFIG --cflags-only-other "libzmq >= 4.3.5" 2>/dev/null`"], + [AC_MSG_ERROR([libzmq >= 4.3.5 is required but was not found.])]) +AC_SUBST([zmq_PKG], ['libzmq >= 4.3.5']) AC_SUBST([zmq_CPPFLAGS], [${zmq_CFLAGS}]) AS_IF([test x${zmq_INCLUDEDIR} != "x"], [AC_SUBST([zmq_ISYS_CPPFLAGS], ["-isystem${zmq_INCLUDEDIR} ${zmq_OTHER_CFLAGS}"])], diff --git a/install-cmake.sh b/install-cmake.sh index f295218..ee7a445 100755 --- a/install-cmake.sh +++ b/install-cmake.sh @@ -64,8 +64,8 @@ ICU_ARCHIVE="icu4c-55_2-src.tgz" # ZMQ archive. #------------------------------------------------------------------------------ -ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz" -ZMQ_ARCHIVE="zeromq-4.3.4.tar.gz" +ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz" +ZMQ_ARCHIVE="zeromq-4.3.5.tar.gz" # Boost archive. #------------------------------------------------------------------------------ diff --git a/install-cmakepresets.sh b/install-cmakepresets.sh index aeb4515..5c2fdb1 100755 --- a/install-cmakepresets.sh +++ b/install-cmakepresets.sh @@ -70,8 +70,8 @@ ICU_ARCHIVE="icu4c-55_2-src.tgz" # ZMQ archive. #------------------------------------------------------------------------------ -ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz" -ZMQ_ARCHIVE="zeromq-4.3.4.tar.gz" +ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz" +ZMQ_ARCHIVE="zeromq-4.3.5.tar.gz" # Boost archive. #------------------------------------------------------------------------------ diff --git a/install.sh b/install.sh index 0bfb459..743c07d 100755 --- a/install.sh +++ b/install.sh @@ -64,8 +64,8 @@ ICU_ARCHIVE="icu4c-55_2-src.tgz" # ZMQ archive. #------------------------------------------------------------------------------ -ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.3.4/zeromq-4.3.4.tar.gz" -ZMQ_ARCHIVE="zeromq-4.3.4.tar.gz" +ZMQ_URL="https://github.com/zeromq/libzmq/releases/download/v4.3.5/zeromq-4.3.5.tar.gz" +ZMQ_ARCHIVE="zeromq-4.3.5.tar.gz" # Boost archive. #------------------------------------------------------------------------------ diff --git a/libbitcoin-protocol.pc.in b/libbitcoin-protocol.pc.in index a205dac..652a8e2 100644 --- a/libbitcoin-protocol.pc.in +++ b/libbitcoin-protocol.pc.in @@ -25,7 +25,7 @@ Version: @PACKAGE_VERSION@ #============================================================================== # Dependencies that publish package configuration. #------------------------------------------------------------------------------ -Requires: libzmq >= 4.3.4 libbitcoin-system >= 4.0.0 +Requires: libzmq >= 4.3.5 libbitcoin-system >= 4.0.0 # Include directory and any other required compiler flags. #------------------------------------------------------------------------------