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

CMake-based build system tracking issue #28607

Closed
16 tasks done
hebasto opened this issue Oct 6, 2023 · 16 comments
Closed
16 tasks done

CMake-based build system tracking issue #28607

hebasto opened this issue Oct 6, 2023 · 16 comments

Comments

@hebasto
Copy link
Member

hebasto commented Oct 6, 2023

This issue will be updated to reflect the current state of CMake integration.

A brief historical context:

  1. build: Add CMake-based build system #25797 proposed a CMake-based build system with 100% feature parity to the Autotools-based one.
  2. The reviewing process is happening in this repo as suggested in build: Add CMake-based build system (1 of N) #27060 (comment).
  3. The recent discussion at CoreDev -- https://btctranscripts.com/bitcoin-core-dev-tech/2023-09/cmake/

How reviewing happens:

  1. Pull requests are opened against the https://github.com/hebasto/bitcoin/tree/cmake-staging branch.
  2. After reviewing and merging them, the staging branch get synced with the main branch from this repo.
  3. This loop continues until all commits from build: Add CMake-based build system #25797 get reviewed.

The planned chunks of work:


The current minimum required CMake version is 3.13, which is the system package on Debian 10. Considering the timings of Debian 10 LTS EOL and integrating CMake into this repo, it seems reasonable to bump the minimum supported version up to 3.16, which is the system package on Ubuntu 20.04 LTS.


To hold the 100% feature parity, the current CMake-based build system implementation can autodetect an optional package and enable it as Autotools-based one does. However, it was suggested to make all optional package opt-in by default. See:


Autotools vs CMake Feature Parity Table is available here.

To list CMake's options, one might add the -LH option during configuring step.


Updated build docs:

@hebasto
Copy link
Member Author

hebasto commented Oct 6, 2023

cc @theuni @TheCharlatan

@maflcko
Copy link
Member

maflcko commented Oct 6, 2023

The current minimum required CMake version is 3.13, which is the system package on Debian 10. Considering the timings of Debian 10 LTS EOL and integrating CMake into this repo, it seems reasonable to bump the minimum supported version up to 3.16, which is the system package on Ubuntu 20.04 LTS.

Buster Backports has 3.18: https://packages.debian.org/buster-backports/cmake

@maflcko
Copy link
Member

maflcko commented Oct 6, 2023

Also, on a general note, it would be good to have a "cheat sheet" table for each configure option to list the corresponding cmake option. Maybe also one auto-generated and enforced with a script, to check equality, similar to curl/curl#11964

@hebasto
Copy link
Member Author

hebasto commented Oct 6, 2023

Also, on a general note, it would be good to have a "cheat sheet" table for each configure option to list the corresponding cmake option. Maybe also one auto-generated and enforced with a script, to check equality, similar to curl/curl#11964

Thanks! It is available here. It has been added to the top post.

@hebasto
Copy link
Member Author

hebasto commented Oct 17, 2023

The next PR to review is hebasto#32.

@hebasto
Copy link
Member Author

hebasto commented Oct 18, 2023

The current minimum required CMake version is 3.13, which is the system package on Debian 10. Considering the timings of Debian 10 LTS EOL and integrating CMake into this repo, it seems reasonable to bump the minimum supported version up to 3.16, which is the system package on Ubuntu 20.04 LTS.

Buster Backports has 3.18: packages.debian.org/buster-backports/cmake

The CMake minimum required version has been bumped up to 3.16 in hebasto#33.

@ajtowns
Copy link
Contributor

ajtowns commented Oct 30, 2023

libbitcoin-kernel and bitcoin-chainstate should be on this list too?

@hebasto
Copy link
Member Author

hebasto commented Oct 30, 2023

libbitcoin-kernel and bitcoin-chainstate should be on this list too?

Sure. Added.

@hebasto
Copy link
Member Author

hebasto commented Nov 29, 2023

The new Building Bitcoin Core with Visual Studio doc has been added to the issue description.

@paulocoutinhox
Copy link

+1

@hebasto
Copy link
Member Author

hebasto commented Jan 8, 2024

Heads up: here are suggestions regarding the current features that are not expected being ported to the CMake-based build system:

fanquake added a commit that referenced this issue Jan 9, 2024
080763a build: Drop `ALLOW_HOST_PACKAGES` support in depends (Hennadii Stepanov)

Pull request description:

  The `ALLOW_HOST_PACKAGES` variable was introduced in #10508 "to speed up build and avoid timeout".

  It is no longer the case for our CI infrastructure, which uses self- hosted persistent workers and depends caching.

  In the current circumstances, it does not seem worth porting this feature to the upcoming [CMake-based](#28607) build system.

ACKs for top commit:
  fanquake:
    ACK 080763a - I can't imagine this option got any use outside our CI. It's also mostly just at odds with the idea of a self-contained dependency builder.
  TheCharlatan:
    ACK 080763a

Tree-SHA512: 36f52690be913479c5d12be36760b8de1a6e891fe7c2cf98a7b8d6561006a6b18631e431351d79e97edb9409f9902d032aedf7b963aa7615e54b59fc2a58f7d6
@hebasto
Copy link
Member Author

hebasto commented Mar 9, 2024

Next one: Add MULTIPROCESS option.

@Sjors
Copy link
Member

Sjors commented Apr 22, 2024

What's next?

It would be useful to have a link to build instructions too, not just the cheat cheat (or just add the standard mkdir build, cmake .. incantations to the cheat cheat).

In noticed that in your hebasto/cmake-staging branch the macOS instructions still assume autotools.

@hebasto
Copy link
Member Author

hebasto commented Apr 22, 2024

@Sjors

What's next?

It would be useful to have a link to build instructions too, not just the cheat cheat (or just add the standard mkdir build, cmake .. incantations to the cheat cheat).

In noticed that in your hebasto/cmake-staging branch the macOS instructions still assume autotools.

WIP :)

Your testing and reviewing hebasto#163 will be much appreciated!

@hebasto
Copy link
Member Author

hebasto commented May 20, 2024

The main part of the #28607 (comment) has all checkboxes checked.

Thanks to all reviewers and testers!

Keeping working :)

@hebasto
Copy link
Member Author

hebasto commented Oct 15, 2024

Closing. See #30454.

@hebasto hebasto closed this as completed Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants