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.
cmake: Migrate away from deprecated SQLite3 target #34848
pull purpleKarrot wants to merge 1 commits into bitcoin:master from purpleKarrot:cmake-4.3-sqlite changing 2 files +5 −2-
purpleKarrot commented at 9:47 AM on March 18, 2026: contributor
- DrahtBot added the label Build system on Mar 18, 2026
-
DrahtBot commented at 9:53 AM on March 18, 2026: contributor
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
Type Reviewers ACK hebasto If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
-
in CMakeLists.txt:125 in a830ab8680
116 | @@ -117,8 +117,12 @@ if(ENABLE_WALLET) 117 | if(VCPKG_TARGET_TRIPLET) 118 | # Use of the `unofficial::` namespace is a vcpkg package manager convention. 119 | find_package(unofficial-sqlite3 CONFIG REQUIRED) 120 | + add_library(SQLite3::SQLite3 ALIAS unofficial::sqlite3::sqlite3) 121 | else() 122 | find_package(SQLite3 3.7.17 REQUIRED) 123 | + if(CMAKE_VERSION VERSION_LESS "4.3") 124 | + add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3) 125 | + endif()
hebasto commented at 10:35 AM on March 18, 2026:The CMake documentation suggests:
if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3 add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3) endif()Why did you choose the alternative approach?
purpleKarrot commented at 10:42 AM on March 18, 2026:I think it is more explicit and self documenting at what point the workaround may be removed. Checking for the target may be safer if the same workaround is used in multiple places. Which variant would you prefer?
hebasto commented at 10:49 AM on March 18, 2026:I think it is more explicit and self documenting at what point the workaround may be removed. Checking for the target may be safer if the same workaround is used in multiple places. Which variant would you prefer?
I prefer the CMake approach. Hardcoding a version might be problematic if the feature is backported.
hebasto commented at 10:35 AM on March 18, 2026: memberConcept ACK.
When using CMake 4.3.0, the following warnings are emitted:
CMake Warning (dev) at src/wallet/CMakeLists.txt:37 (target_link_libraries): The library that is being linked to, SQLite::SQLite3, is marked as being deprecated by the owner. The message provided by the developer is: The target name SQLite::SQLite3 is deprecated. Please use SQLite3::SQLite3 instead. This warning is for project developers. Use -Wno-dev to suppress it.498b6eb6b5cmake: Migrate away from deprecated SQLite3 target
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.
purpleKarrot force-pushed on Mar 18, 2026hebasto approvedhebasto commented at 10:56 AM on March 18, 2026: memberACK 498b6eb6b5e8aceb372d3097df2715d9c7fc416b, tested on Fedora 43 using CMake 3.22.6 and 4.3.0.
fanquake added the label Needs backport (30.x) on Mar 18, 2026fanquake added the label Needs Backport (31.x) on Mar 18, 2026sedited added the label DrahtBot Guix build requested on Mar 18, 2026fanquake added the label Needs backport (29.x) on Mar 19, 2026fanquake merged this on Mar 19, 2026fanquake closed this on Mar 19, 2026fanquake referenced this in commit ca781e49e5 on Mar 19, 2026fanquake removed the label Needs Backport (31.x) on Mar 19, 2026fanquake referenced this in commit 0fb5e167e8 on Mar 19, 2026fanquake removed the label Needs backport (29.x) on Mar 19, 2026fanquake referenced this in commit fde84b822e on Mar 19, 2026fanquake removed the label Needs backport (30.x) on Mar 19, 2026fanquake commented at 9:40 AM on March 19, 2026: memberGuix build of master, which includes this change:
2ceec355f35740ef71ee5de7e753860ad02781d4bf96ed67acaf5cf135a40fc8 guix-build-a7514c1aa917/output/aarch64-linux-gnu/SHA256SUMS.part 42c0bc3215a713d47ce09314ab875e5e3e072a7e9b1f4b0ae706e25741100c9a guix-build-a7514c1aa917/output/aarch64-linux-gnu/bitcoin-a7514c1aa917-aarch64-linux-gnu-debug.tar.gz a776151aeb8c7186fe6bf7634c9f8cf74307cdb981a7bf0ef5c5c7480ffd1d13 guix-build-a7514c1aa917/output/aarch64-linux-gnu/bitcoin-a7514c1aa917-aarch64-linux-gnu.tar.gz 1fd8f77bc6c90acbde70b5dfb7b27577db8712f9d41fa9fbdfefe27793327d2b guix-build-a7514c1aa917/output/arm-linux-gnueabihf/SHA256SUMS.part 874a4778e0f02d6488921a824e2c10fc483adf47f81f744c7501cb025559c63b guix-build-a7514c1aa917/output/arm-linux-gnueabihf/bitcoin-a7514c1aa917-arm-linux-gnueabihf-debug.tar.gz ce79ebefa1a5fe8ba45838c83c24b84837632ea4fd283c2abcc1f5f73076555c guix-build-a7514c1aa917/output/arm-linux-gnueabihf/bitcoin-a7514c1aa917-arm-linux-gnueabihf.tar.gz c3377f0a4790341e0ade550ecc0dd93063aa16c1c7f0a5a31a37aa3aaf2441aa guix-build-a7514c1aa917/output/arm64-apple-darwin/SHA256SUMS.part 0dda0a8a6a495edc6f6efb6889369107e94b8b0e4e8f4504c039b87a254af9e2 guix-build-a7514c1aa917/output/arm64-apple-darwin/bitcoin-a7514c1aa917-arm64-apple-darwin-codesigning.tar.gz c1741fb849c003bb7e8217fdd3d40875d68fd571a69e2da44abdcc185878df85 guix-build-a7514c1aa917/output/arm64-apple-darwin/bitcoin-a7514c1aa917-arm64-apple-darwin-unsigned.tar.gz 752f3c0c5643416f5a5daf5fd1a7b52d307d4f2fa59dd3f3405fea9d40c30d1f guix-build-a7514c1aa917/output/arm64-apple-darwin/bitcoin-a7514c1aa917-arm64-apple-darwin-unsigned.zip 61214afa860562fe03f64a82f9e313f9bdd6b9f74489b8dd00f5597de0ff55cb guix-build-a7514c1aa917/output/dist-archive/bitcoin-a7514c1aa917.tar.gz 01753d39508082a04beb1b8ae46c050444cc91e0d970b2858f4e732dfda582a2 guix-build-a7514c1aa917/output/powerpc64-linux-gnu/SHA256SUMS.part 739d6c5edc2c0a14ee3c0a2ac846d973f266eccfbaf8d94f9e97b6756dfd16d1 guix-build-a7514c1aa917/output/powerpc64-linux-gnu/bitcoin-a7514c1aa917-powerpc64-linux-gnu-debug.tar.gz 94dbc07ad78c436496d9075a3601cb7a51d5836df0cdaa244ce957574729f6ba guix-build-a7514c1aa917/output/powerpc64-linux-gnu/bitcoin-a7514c1aa917-powerpc64-linux-gnu.tar.gz f1e38d22669b17e826b6dc130464a82f7d1a4a94781db1027d2ed947efecac0b guix-build-a7514c1aa917/output/riscv64-linux-gnu/SHA256SUMS.part 28b7e7efdd67f2b252465b43fdc723aaef0650f744aa55e6b7819e91f4628af0 guix-build-a7514c1aa917/output/riscv64-linux-gnu/bitcoin-a7514c1aa917-riscv64-linux-gnu-debug.tar.gz 0f11859be0fe1e3f6a97a28fd25419ddfedcf0e4a5258bcd712a6aa6c7a2d73b guix-build-a7514c1aa917/output/riscv64-linux-gnu/bitcoin-a7514c1aa917-riscv64-linux-gnu.tar.gz dc59d6af55a589d66fb4fea124f59b433bd227a3488c7597bd6fe59f08fd75a6 guix-build-a7514c1aa917/output/x86_64-apple-darwin/SHA256SUMS.part 29f14ee23385f124e100a5020e652ee0eaa920d3066c01cfe015cffee54384c8 guix-build-a7514c1aa917/output/x86_64-apple-darwin/bitcoin-a7514c1aa917-x86_64-apple-darwin-codesigning.tar.gz 0db5001d75981d52b1ca46799a2048093eb1fa546b1b16b6a06ea60401d162ff guix-build-a7514c1aa917/output/x86_64-apple-darwin/bitcoin-a7514c1aa917-x86_64-apple-darwin-unsigned.tar.gz f3af74657ef2e1fde475af25d25ef85d4df7bf4681c890b781f063235caa191c guix-build-a7514c1aa917/output/x86_64-apple-darwin/bitcoin-a7514c1aa917-x86_64-apple-darwin-unsigned.zip 026ed22c12221bece93e22c08ce4c3123bc5ea08e456b9849be072555c53ccc4 guix-build-a7514c1aa917/output/x86_64-linux-gnu/SHA256SUMS.part 3e9c635aa19ea16775da58a5e035573b803f41d355810c9e867605eaceac59b9 guix-build-a7514c1aa917/output/x86_64-linux-gnu/bitcoin-a7514c1aa917-x86_64-linux-gnu-debug.tar.gz f71df369fff35f59a5117fc18d11b543b06a72b4cc3257e2ee515eb0afdb9814 guix-build-a7514c1aa917/output/x86_64-linux-gnu/bitcoin-a7514c1aa917-x86_64-linux-gnu.tar.gz 8626816cd3fe6a00b23626ba9087252a84d8bcbd2c505a1d5d69cdec70bc9ffd guix-build-a7514c1aa917/output/x86_64-w64-mingw32/SHA256SUMS.part 81673cef327e5efee17c74c4451673228c2f9d4a0d1b09564291ad78c4804130 guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-codesigning.tar.gz 9bcced7156551648abad87d482d95597b80dfe36020b19b91c822258e86da123 guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-debug.zip 56a3360b3075790854645f76c5afcee7bbbef2ae5bbc16f1644b058a409eb6fc guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-setup-unsigned.exe 6ab3cd2dacf463d94cc96cfa190e127e071496f6b1cb8ac3c41bc00021df6e59 guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-unsigned.zipDrahtBot commented at 11:31 AM on March 21, 2026: contributor<!--9cd9c72976c961c55c7acef8f6ba82cd-->
Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]
DrahtBot removed the label DrahtBot Guix build requested on Mar 21, 2026
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 12:12 UTC
More mirrored repositories can be found on mirror.b10c.me