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
  1. purpleKarrot commented at 9:47 am on March 18, 2026: contributor
    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.
  2. DrahtBot added the label Build system on Mar 18, 2026
  3. DrahtBot commented at 9:53 am on March 18, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK hebasto

    If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.

  4. 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:

    0    if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3
    1      add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
    2    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.

  5. hebasto commented at 10:35 am on March 18, 2026: member

    Concept ACK.

    When using CMake 4.3.0, the following warnings are emitted:

    0CMake Warning (dev) at src/wallet/CMakeLists.txt:37 (target_link_libraries):
    1  The library that is being linked to, SQLite::SQLite3, is marked as being
    2  deprecated by the owner.  The message provided by the developer is:
    3
    4  The target name SQLite::SQLite3 is deprecated.  Please use SQLite3::SQLite3
    5  instead.
    6
    7This warning is for project developers.  Use -Wno-dev to suppress it.
    
  6. cmake: 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.
    498b6eb6b5
  7. purpleKarrot force-pushed on Mar 18, 2026
  8. hebasto approved
  9. hebasto commented at 10:56 am on March 18, 2026: member
    ACK 498b6eb6b5e8aceb372d3097df2715d9c7fc416b, tested on Fedora 43 using CMake 3.22.6 and 4.3.0.
  10. fanquake added the label Needs backport (30.x) on Mar 18, 2026
  11. fanquake added the label Needs Backport (31.x) on Mar 18, 2026
  12. sedited added the label DrahtBot Guix build requested on Mar 18, 2026
  13. fanquake added the label Needs backport (29.x) on Mar 19, 2026
  14. fanquake merged this on Mar 19, 2026
  15. fanquake closed this on Mar 19, 2026

  16. fanquake referenced this in commit ca781e49e5 on Mar 19, 2026
  17. fanquake removed the label Needs Backport (31.x) on Mar 19, 2026
  18. fanquake commented at 6:34 am on March 19, 2026: member
    Backported to 31.x in #34800.
  19. fanquake referenced this in commit 0fb5e167e8 on Mar 19, 2026
  20. fanquake removed the label Needs backport (29.x) on Mar 19, 2026
  21. fanquake commented at 6:46 am on March 19, 2026: member
    Backported to 29.x in #34855.
  22. fanquake referenced this in commit fde84b822e on Mar 19, 2026
  23. fanquake removed the label Needs backport (30.x) on Mar 19, 2026
  24. fanquake commented at 6:50 am on March 19, 2026: member
    Backported to 30.x in #34856.
  25. fanquake commented at 9:40 am on March 19, 2026: member

    Guix build of master, which includes this change:

     02ceec355f35740ef71ee5de7e753860ad02781d4bf96ed67acaf5cf135a40fc8  guix-build-a7514c1aa917/output/aarch64-linux-gnu/SHA256SUMS.part
     142c0bc3215a713d47ce09314ab875e5e3e072a7e9b1f4b0ae706e25741100c9a  guix-build-a7514c1aa917/output/aarch64-linux-gnu/bitcoin-a7514c1aa917-aarch64-linux-gnu-debug.tar.gz
     2a776151aeb8c7186fe6bf7634c9f8cf74307cdb981a7bf0ef5c5c7480ffd1d13  guix-build-a7514c1aa917/output/aarch64-linux-gnu/bitcoin-a7514c1aa917-aarch64-linux-gnu.tar.gz
     31fd8f77bc6c90acbde70b5dfb7b27577db8712f9d41fa9fbdfefe27793327d2b  guix-build-a7514c1aa917/output/arm-linux-gnueabihf/SHA256SUMS.part
     4874a4778e0f02d6488921a824e2c10fc483adf47f81f744c7501cb025559c63b  guix-build-a7514c1aa917/output/arm-linux-gnueabihf/bitcoin-a7514c1aa917-arm-linux-gnueabihf-debug.tar.gz
     5ce79ebefa1a5fe8ba45838c83c24b84837632ea4fd283c2abcc1f5f73076555c  guix-build-a7514c1aa917/output/arm-linux-gnueabihf/bitcoin-a7514c1aa917-arm-linux-gnueabihf.tar.gz
     6c3377f0a4790341e0ade550ecc0dd93063aa16c1c7f0a5a31a37aa3aaf2441aa  guix-build-a7514c1aa917/output/arm64-apple-darwin/SHA256SUMS.part
     70dda0a8a6a495edc6f6efb6889369107e94b8b0e4e8f4504c039b87a254af9e2  guix-build-a7514c1aa917/output/arm64-apple-darwin/bitcoin-a7514c1aa917-arm64-apple-darwin-codesigning.tar.gz
     8c1741fb849c003bb7e8217fdd3d40875d68fd571a69e2da44abdcc185878df85  guix-build-a7514c1aa917/output/arm64-apple-darwin/bitcoin-a7514c1aa917-arm64-apple-darwin-unsigned.tar.gz
     9752f3c0c5643416f5a5daf5fd1a7b52d307d4f2fa59dd3f3405fea9d40c30d1f  guix-build-a7514c1aa917/output/arm64-apple-darwin/bitcoin-a7514c1aa917-arm64-apple-darwin-unsigned.zip
    1061214afa860562fe03f64a82f9e313f9bdd6b9f74489b8dd00f5597de0ff55cb  guix-build-a7514c1aa917/output/dist-archive/bitcoin-a7514c1aa917.tar.gz
    1101753d39508082a04beb1b8ae46c050444cc91e0d970b2858f4e732dfda582a2  guix-build-a7514c1aa917/output/powerpc64-linux-gnu/SHA256SUMS.part
    12739d6c5edc2c0a14ee3c0a2ac846d973f266eccfbaf8d94f9e97b6756dfd16d1  guix-build-a7514c1aa917/output/powerpc64-linux-gnu/bitcoin-a7514c1aa917-powerpc64-linux-gnu-debug.tar.gz
    1394dbc07ad78c436496d9075a3601cb7a51d5836df0cdaa244ce957574729f6ba  guix-build-a7514c1aa917/output/powerpc64-linux-gnu/bitcoin-a7514c1aa917-powerpc64-linux-gnu.tar.gz
    14f1e38d22669b17e826b6dc130464a82f7d1a4a94781db1027d2ed947efecac0b  guix-build-a7514c1aa917/output/riscv64-linux-gnu/SHA256SUMS.part
    1528b7e7efdd67f2b252465b43fdc723aaef0650f744aa55e6b7819e91f4628af0  guix-build-a7514c1aa917/output/riscv64-linux-gnu/bitcoin-a7514c1aa917-riscv64-linux-gnu-debug.tar.gz
    160f11859be0fe1e3f6a97a28fd25419ddfedcf0e4a5258bcd712a6aa6c7a2d73b  guix-build-a7514c1aa917/output/riscv64-linux-gnu/bitcoin-a7514c1aa917-riscv64-linux-gnu.tar.gz
    17dc59d6af55a589d66fb4fea124f59b433bd227a3488c7597bd6fe59f08fd75a6  guix-build-a7514c1aa917/output/x86_64-apple-darwin/SHA256SUMS.part
    1829f14ee23385f124e100a5020e652ee0eaa920d3066c01cfe015cffee54384c8  guix-build-a7514c1aa917/output/x86_64-apple-darwin/bitcoin-a7514c1aa917-x86_64-apple-darwin-codesigning.tar.gz
    190db5001d75981d52b1ca46799a2048093eb1fa546b1b16b6a06ea60401d162ff  guix-build-a7514c1aa917/output/x86_64-apple-darwin/bitcoin-a7514c1aa917-x86_64-apple-darwin-unsigned.tar.gz
    20f3af74657ef2e1fde475af25d25ef85d4df7bf4681c890b781f063235caa191c  guix-build-a7514c1aa917/output/x86_64-apple-darwin/bitcoin-a7514c1aa917-x86_64-apple-darwin-unsigned.zip
    21026ed22c12221bece93e22c08ce4c3123bc5ea08e456b9849be072555c53ccc4  guix-build-a7514c1aa917/output/x86_64-linux-gnu/SHA256SUMS.part
    223e9c635aa19ea16775da58a5e035573b803f41d355810c9e867605eaceac59b9  guix-build-a7514c1aa917/output/x86_64-linux-gnu/bitcoin-a7514c1aa917-x86_64-linux-gnu-debug.tar.gz
    23f71df369fff35f59a5117fc18d11b543b06a72b4cc3257e2ee515eb0afdb9814  guix-build-a7514c1aa917/output/x86_64-linux-gnu/bitcoin-a7514c1aa917-x86_64-linux-gnu.tar.gz
    248626816cd3fe6a00b23626ba9087252a84d8bcbd2c505a1d5d69cdec70bc9ffd  guix-build-a7514c1aa917/output/x86_64-w64-mingw32/SHA256SUMS.part
    2581673cef327e5efee17c74c4451673228c2f9d4a0d1b09564291ad78c4804130  guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-codesigning.tar.gz
    269bcced7156551648abad87d482d95597b80dfe36020b19b91c822258e86da123  guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-debug.zip
    2756a3360b3075790854645f76c5afcee7bbbef2ae5bbc16f1644b058a409eb6fc  guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-setup-unsigned.exe
    286ab3cd2dacf463d94cc96cfa190e127e071496f6b1cb8ac3c41bc00021df6e59  guix-build-a7514c1aa917/output/x86_64-w64-mingw32/bitcoin-a7514c1aa917-win64-unsigned.zip
    

github-metadata-mirror

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-03-20 18:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me