build: Move generation of prebuilt files out of build system #1281

issue real-or-random openend this issue on April 19, 2023
  1. real-or-random commented at 2:22 pm on April 19, 2023: contributor

    #1245 and its need for #1277 have shown that “abusing” autotools to generate prebuilt files is hard to understand, and remains hard to maintain.

    With all this autotools mess, and since we don’t even have these features in CMake, it would perhaps be cleaner to move (maintainer-)generation of the distributed files entirely out of the build system(s). This is currently hard since creating the files involves running a C program, which needs to be compiled, which needs some kind of build infrastructure. If we used Python to create the table files (see #919), this would simplify some things. In particular because we have a “maintainer dependency” on Python anyway now with the test vector scripts…. On the other hand, all of this is work and I doubt it’s worth spending our time on this right now.

    Originally posted by @real-or-random in #1280 (comment)

  2. hebasto commented at 2:59 pm on April 22, 2023: member

    If generate prebuilt sources manually, is it just like that:

    0gcc src/precompute_ecmult.c -o precompute_ecmult && ./precompute_ecmult 
    1gcc src/precompute_ecmult_gen.c -o precompute_ecmult_gen && ./precompute_ecmult_gen
    

    right?

    If there are no pitfalls here, two additional lines in the developers’ section of the documentation can significantly simplify the build system and its usage.

    UPD. Moreover, src/precompute_ecmult.c and src/precompute_ecmult_gen.c can be excluded from a release archive as build process “implementation details”.

  3. sipa commented at 10:42 am on April 23, 2023: contributor
    With a “source generation / auditing” dependency on Python now with the Wycheproof code, I’m in favor of just rewriting the precomputation part in Python too. It should be pretty trivial.
  4. real-or-random commented at 6:54 am on April 24, 2023: contributor

    I’m in favor of just rewriting the precomputation part in Python too. It should be pretty trivial.

    It’s as trivial as picking up #919. :)


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 21:15 UTC

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