From 8a2d03e323f6e7d223ab04f13b34528a4f21652b Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 12 Jan 2025 12:11:58 +0000 Subject: [PATCH 1/2] NetBSD: Set `LD_LIBRARY_PATH` environment variable when necessary This is a workaround for a build system issue. Enables the `tool_wallet.py` functional test. --- .github/workflows/netbsd.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml index 75dd2bf8..c363d264 100644 --- a/.github/workflows/netbsd.yml +++ b/.github/workflows/netbsd.yml @@ -72,6 +72,8 @@ jobs: run: | set -e cd ${{ github.workspace }} + # TODO: Remove this line after https://github.com/bitcoin/bitcoin/pull/31543 is merged. + export LD_LIBRARY_PATH=/usr/pkg/lib ls -l ./build/src/bitcoind file ./build/src/bitcoind # FIXME: The `-Wl,-z,separate-code` flag is incompatible with NetBSD. @@ -87,11 +89,12 @@ jobs: if: ${{ ! inputs.skip_functional_tests }} run: | cd ${{ github.workspace }} - # TODO: Fix and enable the following tests: rpc_signer.py, tool_wallet.py, wallet_signer.py. + # TODO: Remove this line after https://github.com/bitcoin/bitcoin/pull/31543 is merged. + export LD_LIBRARY_PATH=/usr/pkg/lib + # TODO: Fix and enable the following tests: rpc_signer.py, wallet_signer.py. # See: # - https://github.com/bitcoin/bitcoin/pull/31541 - # - https://github.com/bitcoin/bitcoin/pull/31543 - python3.13 build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 --exclude=rpc_signer.py,tool_wallet.py,wallet_signer.py + python3.13 build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 --exclude=rpc_signer.py,wallet_signer.py netbsd-depends: name: 'NetBSD: depends, no BDB, MP' @@ -185,8 +188,7 @@ jobs: if: ${{ ! inputs.skip_functional_tests }} run: | cd ${{ github.workspace }} - # TODO: Fix and enable the following tests: rpc_signer.py, tool_wallet.py, wallet_signer.py. + # TODO: Fix and enable the following tests: rpc_signer.py, wallet_signer.py. # See: # - https://github.com/bitcoin/bitcoin/pull/31541 - # - https://github.com/bitcoin/bitcoin/pull/31543 - python3.13 build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 --exclude=rpc_signer.py,tool_wallet.py,wallet_signer.py + python3.13 build/test/functional/test_runner.py --ci --extended -j ${{ env.CI_NCPU }} --combinedlogslen=99999999 --quiet --tmpdirprefix . --timeout-factor=8 --exclude=rpc_signer.py,wallet_signer.py From dae306a6551a06bf673f706c2f347441e67baa0a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 12 Jan 2025 13:15:15 +0000 Subject: [PATCH 2/2] NetBSD: Disable `-z separate-code` linker option The `-z separate-code` linker option is incompatible with NetBSD's dynamic linker. --- .github/workflows/netbsd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/netbsd.yml b/.github/workflows/netbsd.yml index c363d264..4bf591ee 100644 --- a/.github/workflows/netbsd.yml +++ b/.github/workflows/netbsd.yml @@ -61,7 +61,8 @@ jobs: - name: Generate buildsystem run: | cd ${{ github.workspace }} - cmake -B build -DCMAKE_C_COMPILER="/usr/pkg/gcc14/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/pkg/gcc14/bin/g++" -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON + # FIXME: The `-Wl,-z,separate-code` flag is incompatible with NetBSD's dynamic linker. + cmake -B build -DCMAKE_C_COMPILER="/usr/pkg/gcc14/bin/gcc" -DCMAKE_CXX_COMPILER="/usr/pkg/gcc14/bin/g++" -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON -DAPPEND_LDFLAGS="-Wl,-z,noseparate-code" - name: Build uses: ./ci/nightly/.github/actions/build-with-ccache @@ -76,8 +77,7 @@ jobs: export LD_LIBRARY_PATH=/usr/pkg/lib ls -l ./build/src/bitcoind file ./build/src/bitcoind - # FIXME: The `-Wl,-z,separate-code` flag is incompatible with NetBSD. - ldd ./build/src/bitcoind || true + ldd ./build/src/bitcoind ./build/src/bitcoind -version - name: Run test suite @@ -162,7 +162,8 @@ jobs: - name: Generate buildsystem run: | cd ${{ github.workspace }} - cmake -B build --toolchain depends/$(./depends/config.guess)/toolchain.cmake -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON + # FIXME: The `-Wl,-z,separate-code` flag is incompatible with NetBSD's dynamic linker. + cmake -B build --toolchain depends/$(./depends/config.guess)/toolchain.cmake -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DWERROR=ON -DAPPEND_LDFLAGS="-Wl,-z,noseparate-code" - name: Build uses: ./ci/nightly/.github/actions/build-with-ccache @@ -175,8 +176,7 @@ jobs: cd ${{ github.workspace }} ls -l ./build/src/bitcoind file ./build/src/bitcoind - # FIXME: The `-Wl,-z,separate-code` flag is incompatible with NetBSD. - ldd ./build/src/bitcoind || true + ldd ./build/src/bitcoind ./build/src/bitcoind -version - name: Run test suite