Skip to content

Conversation

@kwvg
Copy link
Collaborator

@kwvg kwvg commented Nov 20, 2025

Additional Information

Spun-off from dash#6998 to remedy CI failures. Potential alternative to dash#6991 as Clang 19 does not seem to exhibit failures observed with Clang 18 (comment) caused by change in compile flags in dash#6966.

Note: The base of this pull request does not use latest develop (86e84d7) due to build issues potentially related to dash#6971 (see below) and uses a slightly out-of-date base to sidestep the issue. The build issue was found to be present independent of this PR using the Guix container. Fixed with dash#6997.

Build error:
make[2]: Nothing to be done for 'install-exec-am'.
 /home/ubuntu/.guix-profile/bin/mkdir -p '/distsrc-base/distsrc-23.0.0-rc.3-453-g86e84d701641-x86_64-linux-gnu/installed/dashcore-23.0.0-rc.3-453-g86e84d701641//lib/pkgconfig'
 /home/ubuntu/.guix-profile/bin/install -c -m 644 libdashconsensus.pc '/distsrc-base/distsrc-23.0.0-rc.3-453-g86e84d701641-x86_64-linux-gnu/installed/dashcore-23.0.0-rc.3-453-g86e84d701641//lib/pkgconfig'
make[2]: Leaving directory '/distsrc-base/distsrc-23.0.0-rc.3-453-g86e84d701641-x86_64-linux-gnu'
make[1]: Leaving directory '/distsrc-base/distsrc-23.0.0-rc.3-453-g86e84d701641-x86_64-linux-gnu'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/bin/dash-tx.dbg'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/lib/libdashconsensus.so.0.0.0.dbg'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/bin/dash-cli.dbg'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/bin/dash-wallet.dbg'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/bin/dash-qt.dbg'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/bin/test_dash.dbg'
objcopy: Unable to recognise the format of the input file `dashcore-23.0.0-rc.3-453-g86e84d701641/bin/dashd.dbg'

Breaking Changes

None expected.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (note: N/A)
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation (note: N/A)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 23.1 milestone Nov 20, 2025
@github-actions
Copy link

github-actions bot commented Nov 20, 2025

⚠️ Potential Merge Conflicts Detected

This PR has potential conflicts with the following open PRs:

Please coordinate with the authors of these PRs to avoid merge conflicts.

@DashCoreAutoGuix
Copy link

Guix Automation has began to build this PR tagged as v23.0.0-devpr6995.d6a04cc0. A new comment will be made when the image is pushed.

@DashCoreAutoGuix
Copy link

Guix Automation has completed; a release should be present here: https://github.com/dashpay/dash-dev-branches/releases/tag/v23.0.0-devpr6995.d6a04cc0. The image should be on dockerhub soon.

@DashCoreAutoGuix
Copy link

Guix Automation has failed due to the HEAD commit not being signed by an authorized core-team member. Please rebase and sign or push a new empty signed commit to allow Guix build to happen.

@kwvg
Copy link
Collaborator Author

kwvg commented Nov 20, 2025

Checksums for 930c389

7f88c9fbe729e942488242c1ac518357a426dd9b6a4eba25dc468c5a08d28791  dashcore-23.0.0-rc.3-450-g930c3893453c-aarch64-linux-gnu-debug.tar.gz
ab536125890ad4cdcf15b266e0c52f42ebebded1d39c181bdb78118eadddc707  dashcore-23.0.0-rc.3-450-g930c3893453c-aarch64-linux-gnu.tar.gz
cd84665e19a1dbb858e2b96c56823c4fcf6553d88179fd683acf7b01eabad061  dashcore-23.0.0-rc.3-450-g930c3893453c-arm64-apple-darwin-unsigned.tar.gz
5a5ac57dabd2a9761267f0f35bba86dcfa8ab33c6f77b75c2b92d63efd830e99  dashcore-23.0.0-rc.3-450-g930c3893453c-arm64-apple-darwin-unsigned.zip
cf9ebd2a31123fbd39443f8f175a7dae137e4f1d6bc2e95d62e83e1cf2519559  dashcore-23.0.0-rc.3-450-g930c3893453c-arm64-apple-darwin.tar.gz
1fa95ec6499e13652be0acd1edc267a88b3ade9071387eff9c4378d1cdfcc58b  dashcore-23.0.0-rc.3-450-g930c3893453c.tar.gz
f133933c038e294a9800d1de54e1b18c6b1b7259ca2ca6fd9cbe918b40ffd982  dashcore-23.0.0-rc.3-450-g930c3893453c-riscv64-linux-gnu-debug.tar.gz
2e18112f7a941f28b627df310beddd6a9867b5a4d5e6e83ea9ed522a684a4e56  dashcore-23.0.0-rc.3-450-g930c3893453c-riscv64-linux-gnu.tar.gz
0b2c2c34efadf2d7b3462e187756d7ef23a6731d11d488f8a00081bd738190e4  dashcore-23.0.0-rc.3-450-g930c3893453c-x86_64-apple-darwin-unsigned.tar.gz
a085f1351328e636feb4d569d93cbfaac84d7034c4fda8883d16c2a645733936  dashcore-23.0.0-rc.3-450-g930c3893453c-x86_64-apple-darwin-unsigned.zip
4fa434699f5f1d262d6eb1bb702b358970abf05edc804ca3de543bdfa72abacc  dashcore-23.0.0-rc.3-450-g930c3893453c-x86_64-apple-darwin.tar.gz
4b0dfcb1db8ed734c51de9ea27d448f0fc03004a72a7d739c45d67e26d4eceb7  dashcore-23.0.0-rc.3-450-g930c3893453c-x86_64-linux-gnu-debug.tar.gz
50d21447248f94dc1e0a27553f36839c6c968a9f9a24295da1561884066c4da9  dashcore-23.0.0-rc.3-450-g930c3893453c-x86_64-linux-gnu.tar.gz
e987691168ff7699596d021341220b0356909f4c7e6fbff95d72afd9928cb1de  dashcore-23.0.0-rc.3-450-g930c3893453c-win64-debug.zip
e41cff38923d57d56a39e3c355a1c8715549aa751b649adc953ee3be0b23b226  dashcore-23.0.0-rc.3-450-g930c3893453c-win64-setup-unsigned.exe
8ef1b272b00ec60b58d754c7ba38faf67f9a3ee0e2d584bc318edeea385b5676  dashcore-23.0.0-rc.3-450-g930c3893453c-win64-unsigned.tar.gz
1ec8c6dd547051698b7c5a828df269d19c62f96f78a6853465e087d48842043b  dashcore-23.0.0-rc.3-450-g930c3893453c-win64.zip

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kwvg kwvg marked this pull request as ready for review November 20, 2025 19:35
@kwvg kwvg requested review from UdjinM6 and knst November 20, 2025 19:39
@coderabbitai
Copy link

coderabbitai bot commented Nov 20, 2025

Walkthrough

The changes upgrade LLVM/Clang toolchain references from 18 to 19 across CI scripts, Dockerfile, and Guix manifests; update the Mach-O LLD version check to accept the new linker version; modify a time-machine commit hash in the Guix prelude; refactor base-gcc in the Guix manifest and update glibc metadata (commit, sha256, added patches, and extra configure flags); and add a RISC-V-specific glibc assembly patch that routes certain jumps through HIDDEN_JUMPTARGET wrappers and adjusts symbol visibility for setcontext. No runtime control-flow logic outside build/configuration was added.

Sequence Diagram(s)

(Skipped: these are build and configuration updates without new runtime control-flow to visualize.)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas requiring extra attention:

  • contrib/guix/manifest.scm: refactor of base-gcc, glibc commit/sha256/patches, new configure flags, and Darwin toolchain bumps — check consistency and rebuild implications.
  • contrib/guix/patches/glibc-riscv-jumptarget.patch: low-level RISC-V assembly changes (HIDDEN_JUMPTARGET, libc_hidden_def, weak_alias) — verify correctness and link-time behavior with LLD.
  • contrib/devtools/symbol-check.py: LLD version acceptance change — ensure matcher is correct for Mach-O binaries produced by toolchain-19.
  • CI scripts and Dockerfile: clang/LLVM version bumps across multiple files — validate that sanitizers, fuzzers, Valgrind/Tsan/UBSan integration, and build flags remain compatible with clang-19.
  • contrib/guix/libexec/prelude.bash: time-machine commit change — confirm reproducible environment expectations.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: updating the build system to use Clang 19 instead of Clang 18, which is the primary modification across all files in the changeset.
Description check ✅ Passed The description is directly related to the changeset, explaining the motivation (fixing CI failures), context (spun off from dash#6988), and the specific rationale for upgrading to Clang 19 rather than addressing the underlying Clang 18 issues.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 930c389 and c359fb2.

📒 Files selected for processing (7)
  • ci/test/00_setup_env_native_fuzz.sh (1 hunks)
  • ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1 hunks)
  • ci/test/00_setup_env_native_multiprocess.sh (1 hunks)
  • ci/test/00_setup_env_native_tsan.sh (1 hunks)
  • ci/test/00_setup_env_native_ubsan.sh (1 hunks)
  • ci/test/00_setup_env_native_valgrind.sh (1 hunks)
  • contrib/containers/ci/ci-slim.Dockerfile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • ci/test/00_setup_env_native_ubsan.sh
  • contrib/containers/ci/ci-slim.Dockerfile
  • ci/test/00_setup_env_native_multiprocess.sh
  • ci/test/00_setup_env_native_tsan.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build container / Build container
🔇 Additional comments (3)
ci/test/00_setup_env_native_fuzz.sh (1)

18-18: Version bump looks good; verify clang-19 is available in CI environment.

The update from clang-18 to clang-19 preserves all compiler flags and configuration options. This is consistent with the broader toolchain upgrade across the repository.

Verify that clang-19 and clang++-19 are available in the CI container image.

ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1)

18-18: Version bump is consistent; dwarf-4 pinning preserved correctly.

The clang version is updated while maintaining the dwarf-4 CFLAGS/CXXFLAGS, which aligns with the comment on line 17 noting that valgrind compatibility requires this older debug format.

Ensure clang-19 and clang++-19 are available in the CI container image used for this configuration.

ci/test/00_setup_env_native_valgrind.sh (1)

15-15: Version bump is consistent with other CI scripts; dwarf-4 pinning preserved.

The clang version is updated while maintaining the dwarf-4 debug format required for valgrind compatibility.

Ensure clang-19 and clang++-19 are available in the CI container image.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 86e84d7 and 930c389.

📒 Files selected for processing (11)
  • ci/test/00_setup_env_native_fuzz.sh (1 hunks)
  • ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1 hunks)
  • ci/test/00_setup_env_native_multiprocess.sh (1 hunks)
  • ci/test/00_setup_env_native_tsan.sh (1 hunks)
  • ci/test/00_setup_env_native_ubsan.sh (1 hunks)
  • ci/test/00_setup_env_native_valgrind.sh (1 hunks)
  • contrib/containers/ci/ci-slim.Dockerfile (1 hunks)
  • contrib/devtools/symbol-check.py (1 hunks)
  • contrib/guix/libexec/prelude.bash (1 hunks)
  • contrib/guix/manifest.scm (5 hunks)
  • contrib/guix/patches/glibc-riscv-jumptarget.patch (1 hunks)
🔇 Additional comments (15)
ci/test/00_setup_env_native_fuzz.sh (1)

18-18: LGTM!

The compiler configuration correctly updates to clang-19/clang++-19, consistent with the PR's goal to upgrade to Clang 19.

ci/test/00_setup_env_native_ubsan.sh (2)

14-14: LGTM!

The compiler configuration correctly updates to clang-19/clang++-19.


11-11: I'll search for information about LLVM/Clang version availability and compatibility to verify whether this configuration is intentional.

Verify mixed LLVM/Clang versions intentionality through manual testing.

Unable to verify package availability in the current environment, but the concern remains valid. The configuration specifies clang-19 alongside llvm-18—confirm whether:

  • llvm-19 is available in Ubuntu Noble repositories (if so, versions should align)
  • This version combination is intentional (e.g., for compatibility or toolchain reasons)

Test locally with apt-cache search "llvm-19" on Ubuntu Noble to determine the latest available LLVM version and whether mixing these versions is appropriate.

contrib/containers/ci/ci-slim.Dockerfile (1)

113-113: LGTM!

The LLVM version correctly updates to 19, ensuring the Docker image uses the Clang 19 toolchain.

ci/test/00_setup_env_native_valgrind.sh (1)

15-15: LGTM!

The compiler configuration correctly updates to clang-19/clang++-19 while maintaining the -gdwarf-4 flag for valgrind compatibility.

ci/test/00_setup_env_native_fuzz_with_valgrind.sh (1)

18-18: LGTM!

The compiler configuration correctly updates to clang-19/clang++-19 while maintaining the -gdwarf-4 flag for valgrind compatibility.

ci/test/00_setup_env_native_tsan.sh (3)

11-11: LGTM!

The DEP_OPTS correctly updates to clang-19/clang++-19.


15-15: LGTM!

The BITCOIN_CONFIG correctly updates to clang-19/clang++-19.


10-10: I need to verify the compatibility between Clang 19 and LLVM 18 runtime libraries, as the version-19 packages don't exist in Ubuntu Noble.

Let me search for ThreadSanitizer version requirements with Clang 19:

Confirm whether the version mismatch is unavoidable or requires adjustment.

ThreadSanitizer needs all userspace code compiled with TSan, including libc++. Verification shows that version-19 packages (llvm-19, libclang-rt-19-dev, libc++abi-19-dev, libc++-19-dev) are not available in the Ubuntu Noble repository, while version-18 packages are available. This explains why the configuration specifies clang-19 alongside version-18 runtime libraries—version-19 equivalents do not exist in the distribution.

Clarify whether:

  • This is an intentional fallback due to package unavailability in Ubuntu Noble, or
  • The version-18 packages should be updated when version-19 becomes available in the repository
contrib/guix/libexec/prelude.bash (1)

74-74: Commit hash verified—Guix commit includes Clang 19 toolchain.

The commit 5cb84f2013c5b1e48a7d0e617032266f1e6059e2 is a GNU Guix time-machine update that makes Clang/LLVM 19 available. No changes needed.

ci/test/00_setup_env_native_multiprocess.sh (1)

12-18: Clang 19 bump for multiprocess job looks consistent; just confirm tool availability

Updating DEP_OPTS and BITCOIN_CONFIG to clang-19/clang++-19 keeps this job aligned with the rest of the Clang 19 CI setup; no issues in the script itself. Please just confirm the CI image exposes clang-19 and clang++-19 on PATH so these vars don’t fail at configure time.

contrib/guix/patches/glibc-riscv-jumptarget.patch (1)

1-57: RISCV HIDDEN_JUMPTARGET backport matches upstream intent

This patch cleanly mirrors the upstream glibc change: RISCV setjmp/setcontext now jump via HIDDEN_JUMPTARGET to non‑preemptible symbols and marks __setcontext hidden before the weak alias. That’s the right fix for LLD + -mno-relax and looks safe to carry as an out‑of‑tree patch. The “drop when glibc ≥ 2.35” note is also a good reminder for a future glibc bump.

contrib/guix/manifest.scm (3)

95-105: base-gcc alias simplification looks fine; verify assumptions about gcc-12 arguments

Switching base-gcc to a straight alias of gcc-12 keeps mingw-w64-base-gcc and linux-base-gcc working as simple inherit wrappers while avoiding a bespoke base definition, which is a nice simplification. Just make sure the gcc-12 package in the Guix revision you pin still exposes the #:configure-flags and #:phases arguments you override later, so these derived packages don’t break on a Guix update.


453-493: Updated glibc-2.31 metadata/flags and extra patch are coherent; confirm configure support

The glibc-2.31 package now:

  • Pins to a newer 2.31 commit and matching sha256.
  • Adds the new glibc-riscv-jumptarget.patch alongside the existing prefix patch.
  • Appends --disable-timezone-tools and --disable-profile to the inherited configure flags.

Structurally this is consistent with the new RISCV patch file and should further slim the toolchain, but it does rely on 2.31’s configure understanding those two new flags and on the chosen commit not already including the RISCV fix (to avoid patch conflicts). Please confirm the Guix build for all relevant targets (including riscv-linux) still configures successfully with these flags and patches.


541-545: Darwin toolchain move to Clang 19 aligns with CI; ensure Guix packages resolve

For the "-darwin" targets, replacing clang-toolchain-18/lld-18 with clang-toolchain-19, lld-19, and make-lld-wrapper lld-19 #:lld-as-ld? #t matches the project‑wide Clang 19 upgrade and keeps the Guix manifest in sync with CI. Please just double‑check that the Guix channel you’re using defines these *-19 packages and that the wrapper still produces the expected ld behavior for the macOS cross builds.

Comment on lines 255 to 258
def check_MACHO_lld(binary) -> bool:
if binary.build_version.tools[0].version == [18, 1, 8]:
if binary.build_version.tools[0].version == [19, 1, 4]:
return True
return False
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify LLD version 19.1.4 matches Clang 19 distribution.

The expected LLD version has been updated to [19, 1, 4] to align with the Clang 19 upgrade. Please verify this is the correct LLD version that ships with Clang 19 for macOS builds.


🌐 Web query:

What version of LLD ships with LLVM/Clang 19?

💡 Result:

LLVM/Clang 19 ships with LLD 19 (initially LLD 19.1.0 in the LLVM 19.1.0 release). [1][2]

Sources:
[1] LLD 19.1.0 documentation.
[2] LLVM 19.1.0 release announcement (includes lld).


Update version check to match actual LLD 19.1.0 shipped with Clang 19.

LLVM/Clang 19 ships with LLD 19.1.0, not 19.1.4. The version check at line 256 should be updated from [19, 1, 4] to [19, 1, 0] to correctly match the shipped LLD version.

🤖 Prompt for AI Agents
In contrib/devtools/symbol-check.py around lines 255 to 258, the LLD version
check incorrectly expects [19, 1, 4]; update the comparison to expect [19, 1, 0]
so the function returns True for the actual LLD 19.1.0 that ships with Clang 19;
ensure you modify the literal array in the equality check accordingly and keep
the rest of the function logic unchanged.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK c359fb2

@DashCoreAutoGuix
Copy link

Guix Automation has failed due to the HEAD commit not being signed by an authorized core-team member. Please rebase and sign or push a new empty signed commit to allow Guix build to happen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants