Skip to content

backport: bitcoin#34848 (cmake: migrate away from deprecated SQLite3 target) - #8186

Merged
PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:backport-34848-sqlite3-target
Nov 17, 2026
Merged

PastaPastaPasta merged 1 commit into
dashpay:developfrom
PastaPastaPasta:backport-34848-sqlite3-target

Conversation

@PastaPastaPasta

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

CMake 4.3 deprecated the SQLite::SQLite3 imported target in favor of SQLite3::SQLite3. With CMake 4.3, every configure prints this author warning nine times:

CMake Warning (author) at src/wallet/CMakeLists.txt:59 (target_link_libraries):
  The library that is being linked to, SQLite::SQLite3, is marked as being
  deprecated by the owner.

What was done?

Backport of bitcoin#34848 (cmake: Migrate away from deprecated SQLite3 target). The wallet links SQLite3::SQLite3. With CMake older than 4.3, that name is defined as an alias of SQLite::SQLite3, and for vcpkg as an alias of unofficial::sqlite3::sqlite3.

Dash adaptation: SQLite is still optional next to BDB, so the wallet links it inside its if(USE_SQLITE) block. The new name replaces both target names there.

How Has This Been Tested?

  • On develop, configuring against depends with CMake 4.3.4 prints the warning 9 times. With this change it prints none, with CMake 4.3.4 or 4.2.3.
  • With CMake 4.3.4 (native target), the full build succeeds and the wallet, db and coin selection unit tests (12) pass.
  • With CMake 4.2.3 (alias path), dash-wallet builds and links.
  • With -DWITH_SQLITE=OFF -DWITH_BDB=ON, configure and the dash-wallet build still succeed.

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone (if you have permission to set one)

🤖 Generated with Claude Code

498b6eb cmake: Migrate away from deprecated SQLite3 target (Daniel Pfeifer)

Pull request description:

  CMake version 4.3 deprecated the imported target `Sqlite::Sqlite3`.
  Use the preferred name `Sqlite3::Sqlite3` instead and provide an alias for older versions of CMake.
  Also define the same alias when using vcpkg.

ACKs for top commit:
  hebasto:
    ACK 498b6eb, tested on Fedora 43 using CMake 3.22.6 and 4.3.0.

Tree-SHA512: 8ec0e9673ea39c4383d2995d804498675f9bcd1196ec586f338cb3fa63aa632f160dd179bda3c2d70d932d8b1ac821c15d8247e7302465420937c9227f1bf20a
(cherry picked from commit a7514c1)

Dash adaptation: the wallet links SQLite inside its `if(USE_SQLITE)`
block, because SQLite is still optional next to BDB here, so the
alias replaces both target names there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PastaPastaPasta PastaPastaPasta added this to the 24.1 milestone Nov 17, 2026
@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The CMake configuration aliases SQLite targets to SQLite3::SQLite3 for vcpkg and package-based setups. When USE_SQLITE is enabled, bitcoin_wallet links directly to SQLite3::SQLite3.

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: fanquake

Merge Risk: Minimal · up to 5f9a8

This change switches the wallet's SQLite CMake target to a non-deprecated name, which avoids the CMake 4.3 warnings. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: a backport of bitcoin#34848 that migrates the SQLite3 link target away from the deprecated name. The raw summary and objectives both describe the CMake target change in the…
Description check Passed The description explains the CMake 4.3 deprecation of SQLite::SQLite3, the switch to SQLite3::SQLite3 in the wallet's if(USE_SQLITE) block, the alias handling for older CMake and vcpkg, and the testin…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: a backport of bitcoin#34848 that migrates the SQLite3 link target away from the deprecated name. The raw summary and objectives both describe the CMake target change in the wallet and root CMakeLists, so the title matches the main change. It is specific and references the upstream PR.

Full details: Description check

Explanation

The description explains the CMake 4.3 deprecation of SQLite::SQLite3, the switch to SQLite3::SQLite3 in the wallet's if(USE_SQLITE) block, the alias handling for older CMake and vcpkg, and the testing performed. It matches the changeset closely.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 133af454-1d2d-4053-99e5-86aa8315d2cd
Commits

Reviewing files that changed from the base of the PR and between d412e52 and 5f9a832.

Files selected for processing: 2

  • CMakeLists.txt
  • src/wallet/CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@thepastaclaw

thepastaclaw commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit 5f9a832) · triage: low

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Final validation — Phase 1 + Phase 2

Verified head 5f9a832. The two-file backport correctly provides SQLite3::SQLite3 aliases for older CMake and vcpkg, and the wallet consumes the target only when SQLite support is enabled; no in-scope correctness issues were found. Lint, ClangFormat, and cppcheck passed; source-build checks were still pending in the supplied CI snapshot, while the unrelated failed milestone check was contradicted by a passing duplicate.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: backport-reviewer); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: dash-core-commit-history); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained CMake target-name migration with no runtime behavior or critical-surface changes, though cross-version build compatibility merits focused review.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 98% left, weekly 98% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — backport-reviewer (completed, effort medium); agent phase2-reviewer, gpt-6.1-sol — dash-core-commit-history (completed, effort medium); agent phase2-reviewer

@thepastaclaw thepastaclaw added the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 17, 2026

@PastaPastaPasta PastaPastaPasta left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Approved

@PastaPastaPasta
PastaPastaPasta merged commit 9b296ee into dashpay:develop Nov 17, 2026
50 of 51 checks passed
@thepastaclaw thepastaclaw removed the pastaclaw:approved thepastaclaw's latest review approved this PR label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants