Skip to content

Conversation

@hebasto
Copy link
Member

@hebasto hebasto commented Dec 20, 2025

Using the CMake-based build system enables smoother integration with parent projects by providing both CMake package configuration files and the traditional libsecp256k1.pc.

However, packagers on some systems, such as Gentoo and Guix, insist on recreating the precomputed files, which is not currently supported by the CMake-based build system.

This PR addresses the issue by introducing a new build option, SECP256K1_BUILD_PRECOMPUTED, which is disabled by default.

@hebasto hebasto force-pushed the 251220-cmake-precomputed branch 2 times, most recently from cbc6679 to 5373c6a Compare December 20, 2025 23:52
@kevkevinpal
Copy link
Contributor

are we able to do this via ./configure?

or is this meant to be only done for CMake?

@hebasto
Copy link
Member Author

hebasto commented Dec 24, 2025

are we able to do this via ./configure?

Yes. Run make clean-precomp && make precomp.

Copy link
Contributor

@real-or-random real-or-random left a comment

Choose a reason for hiding this comment

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

Concept ACK

@hebasto hebasto force-pushed the 251220-cmake-precomputed branch from 5373c6a to f9eeb11 Compare January 6, 2026 18:08
@hebasto
Copy link
Member Author

hebasto commented Jan 6, 2026

@real-or-random

Thank you for the review! Your feedback has been addressed.

@hebasto hebasto force-pushed the 251220-cmake-precomputed branch from f9eeb11 to fdfda7b Compare January 7, 2026 12:52
real-or-random added a commit that referenced this pull request Jan 27, 2026
47eb709 ecmult: Use size_t for array indices in _odd_multiplies_table (Tim Ruffing)
bb1d199 ecmult: Use size_t for array indices into tables (Tim Ruffing)

Pull request description:

  I don't think the current code is incorrect, but using `size_t` improves readability because the type makes it clear that we're dealing with array indices.

  Also, making the result of the `ECMULT_TABLE_SIZE` macro (hopefully) a `size_t` fixes a compiler warning on MSVC, see #1791.

ACKs for top commit:
  hebasto:
    re-ACK 47eb709.
  jonasnick:
    ACK 47eb709
  theStack:
    ACK 47eb709

Tree-SHA512: e484fd610d50e972021c0184a683993364290eb58e09b65f9521b4507ec8d0639b402c67002005630b389bc863a7aa05b75f7224524dbcbafbfa5f9a4812b4a5
@hebasto hebasto force-pushed the 251220-cmake-precomputed branch from fdfda7b to 8b58c55 Compare January 27, 2026 11:25
@hebasto
Copy link
Member Author

hebasto commented Jan 27, 2026

Rebased on the top of the first commit from #1794.

Rebased on top of the merged #1794.

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.

3 participants