Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Meta-issue for follow-ups to initial CMake merge (#1113) #1224

Closed
real-or-random opened this issue Mar 8, 2023 · 3 comments
Closed
Labels
build user-documentation user-facing documentation

Comments

@real-or-random
Copy link
Contributor

real-or-random commented Mar 8, 2023

edit: see #1235

@real-or-random real-or-random added user-documentation user-facing documentation build labels Mar 8, 2023
@real-or-random
Copy link
Contributor Author

I'm happy to fan out some of these items of these as full Github issues. But doing so for every item would probably flood the issue tracker. So I suggest we do this lazily, which helps also to keep the discussions separated:

  • If it's clear how to address an item, open a (draft) PR and we can discuss there.
  • If you want to discuss an item without opening a PR, just open an issue and start the discussion.

@theuni
Copy link
Contributor

theuni commented Mar 8, 2023

  • Consider dropping support for building static and shared libraries at the same time

I'll work on a POC of this for discussion.

real-or-random added a commit to real-or-random/secp256k1 that referenced this issue Mar 10, 2023
To use, invoke `cmake` with argument `--preset dev-mode`.

One disadvantage over `./configure --enable-dev-mode` is that CMake
does not provide a way to "hide" presets from users. That is,
`cmake --list-presets` will list dev-mode, and it will also appear
in `cmake-gui`, even though it's not selectable there due to a bug
in cmake-gui.

Solves one item in bitcoin-core#1224.
@real-or-random
Copy link
Contributor Author

Moving to #1235 to make sure @hebasto can edit the list.

hebasto pushed a commit to hebasto/secp256k1 that referenced this issue Mar 28, 2023
To use, invoke `cmake` with argument `--preset dev-mode`.

One disadvantage over `./configure --enable-dev-mode` is that CMake
does not provide a way to "hide" presets from users. That is,
`cmake --list-presets` will list dev-mode, and it will also appear
in `cmake-gui`, even though it's not selectable there due to a bug
in cmake-gui.

Solves one item in bitcoin-core#1224.
real-or-random added a commit that referenced this issue Apr 18, 2023
ef49a11 build: allow static or shared but not both (Cory Fields)
36b0adf build: remove warning until it's reproducible (Cory Fields)

Pull request description:

  Continuing from here: #1224 (comment)

  Unfortunately it wasn't really possible to keep a clean diff here because of the nature of the change. I suggest reviewing the lib creation stuff in its entirety, sorry about that :\

  Rather than allowing for shared and static libs to be built at the same time like autotools, this PR switches to the CMake convention of allowing only 1.

  A new `BUILD_SHARED_LIBS` option is added to match CMake convention, as well as a `SECP256K1_DISABLE_SHARED` option which overrides it. That way even projects which have `BUILD_SHARED_LIBS=1` can opt-into a static libsecp in particular.

  Details:

  Two object libraries are created: `secp256k1_asm` and `secp256k1_precomputed_objs`. Some tests/benchmarks use the object libraries directly, some link against the real lib: `secp256k1`.

  Because the objs don't know what they're going to be linked into, they need to be told how to deal with PIC.

  The `DEFINE_SYMBOL` property sets the `DLL_EXPORT` define as necessary (when building a shared lib)

ACKs for top commit:
  hebasto:
    re-ACK ef49a11, only [suggested](#1230 (review)) changes since my recent [review](#1230 (review)).
  real-or-random:
    ACK ef49a11

Tree-SHA512: 8870de305176fdb677caff0fdfc6f8c59c0e906489cb72bc9980e551002812685e59e20d731f2a82e33628bdfbb7261eafd6f228038cad3ec83bd74335959600
real-or-random added a commit to real-or-random/secp256k1 that referenced this issue Apr 19, 2023
To use, invoke `cmake` with argument `--preset dev-mode`.

One disadvantage over `./configure --enable-dev-mode` is that CMake
does not provide a way to "hide" presets from users. That is,
`cmake --list-presets` will list dev-mode, and it will also appear
in `cmake-gui`, even though it's not selectable there due to a bug
in cmake-gui.

Solves one item in bitcoin-core#1224.
real-or-random added a commit to real-or-random/secp256k1 that referenced this issue Apr 19, 2023
To use, invoke `cmake` with argument `--preset dev-mode`.

One disadvantage over `./configure --enable-dev-mode` is that CMake
does not provide a way to "hide" presets from users. That is,
`cmake --list-presets` will list dev-mode, and it will also appear
in `cmake-gui`, even though it's not selectable there due to a bug
in cmake-gui.

Solves one item in bitcoin-core#1224.
real-or-random added a commit that referenced this issue Apr 27, 2023
ce5ba9e gitignore: Add CMakeUserPresets.json (Tim Ruffing)
0a446a3 cmake: Add dev-mode CMake preset (Tim Ruffing)

Pull request description:

  To use, invoke `cmake` with argument `--preset dev-mode`.

  One disadvantage over `./configure --enable-dev-mode` is that CMake does not provide a way to "hide" presets from users. That is, `cmake --list-presets` will list dev-mode, and it will also appear in `cmake-gui`, even though it's not selectable there due to a bug in cmake-gui.

  Solves one item in #1224.

ACKs for top commit:
  hebasto:
    ACK ce5ba9e
  theuni:
    ACK ce5ba9e

Tree-SHA512: c14bd283bd5bf64006bf3a23d72e6e55777b084aff71eb2a002f8ddde1d3549ccb2f08feb2b83366a24272209ab579cac8b73cfc020919adf7f039beb65bc9cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build user-documentation user-facing documentation
Projects
None yet
Development

No branches or pull requests

2 participants