Update minisketch subtree and switch to its build script #32856

pull hebasto wants to merge 3 commits into bitcoin:master from hebasto:250702-minisketch changing 9 files +480 โˆ’85
  1. hebasto commented at 10:17 am on July 2, 2025: member

    This PR:

    1. Updates the minisketch subtree to latest upstream, which includes:

    2. Switches to minisketch upstream build system.

  2. Squashed 'src/minisketch/' changes from ea8f66b1ea..f74b7e2bc2
    f74b7e2bc2 Merge sipa/minisketch#75: build: Introduce CMake-based build system
    850cc868d5 ci: Add GHA workflow with native Windows job
    40d56708c8 doc: Add "Building with CMake" section to `README.md`
    a0c86c79a7 build: Add CMake-based build system
    
    git-subtree-dir: src/minisketch
    git-subtree-split: f74b7e2bc2e5e1a1360927934521216bee5f345c
    b1b208f724
  3. Update minisketch subtree to latest upstream ec5c6a1163
  4. cmake: Switch to `minisketch` upstream build system a6b48f009f
  5. hebasto added the label Build system on Jul 2, 2025
  6. DrahtBot commented at 10:17 am on July 2, 2025: contributor

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

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32856.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK BrandonOdiwuor

    If your review is incorrectly listed, please react with ๐Ÿ‘Ž to this comment and the bot will ignore it on the next update.

  7. hebasto commented at 10:18 am on July 2, 2025: member
    This PR concludes the joint efforts of @sipa, @purpleKarrot, @theuni, and me.
  8. BrandonOdiwuor commented at 7:07 am on August 28, 2025: contributor

    ACK a6b48f009f7bf88bc1f15ed9490276baa898884e

    Verified migration to minisketch upstream CMake build script. Successfully built minisketch and Bitcoin Core on macOS 15.6 (Clang 17, CMake 4.0.2) and Ubuntu 24.04 (GCC 13, CMake 3.28.3)

    macOS

    0$ cmake --build build -j9
    

    Ubuntu

    0$ cmake --build build -j9
    
  9. maflcko added the label DrahtBot Guix build requested on Aug 28, 2025
  10. in cmake/minisketch.cmake:9 in a6b48f009f
    83-      ${PROJECT_SOURCE_DIR}/src/minisketch/src/fields/clmul_8bytes.cpp
    84+function(add_minisketch subdir)
    85+  message("")
    86+  message("Configuring minisketch subtree...")
    87+  set(BUILD_SHARED_LIBS OFF)
    88+  set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
    


    purpleKarrot commented at 7:32 am on August 28, 2025:

    Why?

    We should not interfere with CMAKE_EXPORT_COMPILE_COMMANDS. If developers set this option globally in their dotfiles because it will give them code completion in their IDE, setting it to OFF here will break their setup.

  11. in cmake/minisketch.cmake:11 in a6b48f009f
    85+  message("")
    86+  message("Configuring minisketch subtree...")
    87+  set(BUILD_SHARED_LIBS OFF)
    88+  set(CMAKE_EXPORT_COMPILE_COMMANDS OFF)
    89+  # Hard-code subtree options; they wonโ€™t appear in the CMake cache.
    90+  set(MINISKETCH_INSTALL OFF)
    


    purpleKarrot commented at 7:41 am on August 28, 2025:

    This option is useless and can be removed from minisketch because passing EXCLUDE_FROM_ALL to add_subdirectory has the effect that

    Any install rules defined in the subdirectory or below will be ignored when installing the parent directory.

  12. in src/CMakeLists.txt:21 in a6b48f009f
    17@@ -18,6 +18,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
    18 include(../cmake/crc32c.cmake)
    19 include(../cmake/leveldb.cmake)
    20 include(../cmake/minisketch.cmake)
    21+add_minisketch(minisketch)
    


    purpleKarrot commented at 7:55 am on August 28, 2025:

    I find it a bit awkward to define this as a function in a module, when it is not really providing reusable functionality. The function may only called in a single place and there is only one valid argument.

    A better approach would be to get rid of the ../cmake/minisketch.cmake module and define the function inline without any arguments. Then, add a comment that makes clear that this is a workaround and also notes when it will be replaced:

    0// TODO: use `block()` once the minimum cmake is >=2.25
    1function(minisketch_block)
    2  ...
    3endfunction()
    4minisketch_block()
    
  13. DrahtBot commented at 10:54 pm on August 29, 2025: contributor

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit 7cc9a087069bfcdb79a08ce77eb3a60adf9483af(master) commit 53fb0bed8c6b095db8a14dbbacaf10576e7de272(pull/32856/merge)
    *-aarch64-linux-gnu-debug.tar.gz d4d79e719716b3ec... c1906f0adee8ffbb...
    *-aarch64-linux-gnu.tar.gz a2d7668998cf5581... f33c164b138e4bb6...
    *-arm-linux-gnueabihf-debug.tar.gz 7837b2ae895960f0... 85253090381c1ca9...
    *-arm-linux-gnueabihf.tar.gz d5d7a18af35959f1... 7c6ca7737ca58f3e...
    *-arm64-apple-darwin-codesigning.tar.gz ff2bc3fc9409522c... d4033b7073389025...
    *-arm64-apple-darwin-unsigned.tar.gz 3b10528036208e16... a1474c40ebf2a77c...
    *-arm64-apple-darwin-unsigned.zip 3b1d6add242ef0d7... c0c02a701066e196...
    *-powerpc64-linux-gnu-debug.tar.gz 4c2b7de0dabcdd4a... 000895cac16e7357...
    *-powerpc64-linux-gnu.tar.gz f3f972bc01c3ba2a... 42a094f6df1a044f...
    *-riscv64-linux-gnu-debug.tar.gz 89970d2c2338ca29... 626110369eda673b...
    *-riscv64-linux-gnu.tar.gz 0e9938e42a3374e8... 2179c86597a2c34d...
    *-x86_64-apple-darwin-codesigning.tar.gz 8efa84ef1754aeb0... 5929ac11470c034e...
    *-x86_64-apple-darwin-unsigned.tar.gz cbe1699bdef1590b... 88d18471fd19c63f...
    *-x86_64-apple-darwin-unsigned.zip 279e63b23ff0ce08... 22ace0f53beb8b35...
    *-x86_64-linux-gnu-debug.tar.gz 512b5f4b222c4a46... 892b17e56dd5917a...
    *-x86_64-linux-gnu.tar.gz 56b4aff66d9c4c2d... ee2e5b93fa93f407...
    *.tar.gz 194017e760c3dc48... f0a9a46c976957a1...
    SHA256SUMS.part d6231a052dc6c762... 553753a14991a50c...
    guix_build.log 682a144f4b40ec20... 27f2dd82df7e90e4...
    guix_build.log.diff 6d8a7f57eaa9c089...
  14. DrahtBot removed the label DrahtBot Guix build requested on Aug 29, 2025

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: 2025-09-10 18:13 UTC

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