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

CTest: Module must be included at the top level #145

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

purpleKarrot
Copy link
Contributor

In order to be able to run ctest from the top level build directory, it is necessary that enable_testing() is invoked in the top level CMakeLists.txt file. The CTest module invokes enable_testing() based on the value of BUILD_TESTING.

@hebasto
Copy link
Member

hebasto commented Feb 1, 2025

I don't think this project should include(CTest) in the first place. Besides calling enable_testing(), it also performs some CDash-related actions, which are unnecessary.

@purpleKarrot
Copy link
Contributor Author

The minimum replacement would be:

option(BUILD_TESTING "Build the testing tree." ON)

include(CTestUseLaunchers)

if(BUILD_TESTING)
  enable_testing()
endif()

The CTestUseLaunchers module should not be omitted.

@hebasto
Copy link
Member

hebasto commented Feb 1, 2025

The CTestUseLaunchers module should not be omitted.

Why?

@purpleKarrot
Copy link
Contributor Author

Because otherwise cmake produces an error when CTEST_USE_LAUNCHERS is on.

@ryanofsky
Copy link
Collaborator

These changes look good to me and make sense to the extent I understand them (which is not very much), but it would be helpful to have some steps to reproduce, just to be able to see what was broken and compare different fixes that have been suggested here.

@purpleKarrot
Copy link
Contributor Author

Try executing the following commands and see what error you get:

mkdir build
cd build
cmake ..
make -j 10
ctest -j 10

The way you probably used to invoke testing on the command line is the following:

make -j 10 check

This worked, because the check target is defined in a subdirectory where testing was enabled.
However, there is a catch with this approach:

What do you think how many tests are executed in parallel when the target check is built with -j 10? The answer is: one. The -j option is passed to the build tool, so the build tool runs 10 jobs in parallel. One of these jobs is to launch ctest without any options. So the tests are executed without any parellelization. (Which is not a big problem in this repository, because there is just one test anyway. But people will want to use the same approach (or user-specific aliases) to build and test any CMake project.)

Therefore, the best recommendation is to run ctest explicitly, not via a build target. Make sure that the default target builds all tests when BUILD_TESTING is enabled, otherwise the tests will report failure because their executable is not found.

@ryanofsky
Copy link
Collaborator

Thanks!

The previous version of this PR 9d841a4 looks much more straightforward than current version 5f9162f, and doesn't add a new build option, so I would really prefer it.

@hebasto you wrote #145 (comment) "I don't think this project should include(CTest) in the first place" because it is doing some unnecessary things. Why is this a problem? The build is written in cmake not rust so by definition is going to do a lot of unnecessary things, I would want to know what practical downsides to simple include(CTest) are if any

@hebasto
Copy link
Member

hebasto commented Feb 4, 2025

@hebasto you wrote #145 (comment) "I don't think this project should include(CTest) in the first place" because it is doing some unnecessary things. Why is this a problem? The build is written in cmake not rust so by definition is going to do a lot of unnecessary things, I would want to know what practical downsides to simple include(CTest) are if any

For example, include(CTest) creates unused DartConfiguration.tcl in the build tree. I don't think this is a user-facing drawback, though. However, this pertains to the intentions behind the code. If the intention is to enable test generation for the add_test() command, the CMake docs state:

CMake only generates tests if the enable_testing() command has been invoked.

CMakeLists.txt Outdated
enable_testing()
endif()

include(CTestUseLaunchers)
Copy link
Member

Choose a reason for hiding this comment

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

What scenarios would this be useful for in this project?

@purpleKarrot
Copy link
Contributor Author

Some background information about this DartConfiguration.tcl file:
https://purplekarrot.net/blog/building-and-testing-with-cmake.html
https://purplekarrot.net/blog/refactoring-ctest.html

It is no longer up to date, because some of the refactoring has already be done.

@ryanofsky
Copy link
Collaborator

I'd be fine with either calling include(CTest) or enable_testing() unconditionally, since the intention should be to always enable testing. I don't think a separate build option should be required. If include(CTest) does unnecessary things, that's an implementation detail of CMake, which should only matter if it has a noticeable impact on performance.

So unless a bare enable_testing() call breaks something, I’d prefer using that. If it does break use cases, then include(CTest) would be fine.

@purpleKarrot
Copy link
Contributor Author

purpleKarrot commented Feb 4, 2025

Proprietary software is developed and tested by a single entity. Very often, the configuration for CI is located in the project's repository and the CI configuration is intertwined with the project configuration (example: the project configuration has options for sanitizers and coverage).

For software that is developed in public, a separation of project configuration and CI configuration brings advantages. Ideally, everyone is able to contribute CI resources, sometimes for platforms the project's main developers do not even have access to. Project configuration should be written in a way that it supports the widest range of CI configurations
and that just means: Make no assumption about what software is installed, what environment variables are set, and what cmake variables are set.

This also includes the cmake variable CTEST_USE_LAUNCHERS: Don't assume whether it is set or not, the project should be able to be configured in both cases. But when it is set and CTestUseLaunchers is not included, cmake will produce the following error:

CMake Error: CTEST_USE_LAUNCHERS is enabled, but the RULE_LAUNCH_COMPILE global property is not defined.
Did you forget to include(CTest) in the toplevel CMakeLists.txt ?

Hence, having include(CTest) in the toplevel CMakeLists.txt probably really is the most convenient approach. I agree that the added .tcl file and targets like NightlyCoverage are a bit annoying. But that is something that should be fixed in upstream cmake.

Copy link
Collaborator

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

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

Code review ACK e7329ae.

I like idea of project/ci separation and just in general, minimizing any assumptions we make about how this build will be used and keeping it generic. If there are practical problems with this include we can address them but at a high level this seems like a good approach.

In order to be able to run `ctest` from the top level build directory,
it is necessary that `enable_testing()` is invoked in the top level
CMakeLists.txt file. The `CTest` module invokes `enable_testing()`
based on the value of `BUILD_TESTING`.
Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

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

ACK 63ac092, tested on Ubuntu 24.04:

$ cmake -B build
$ cmake --build build -t mptests
$ ctest --test-dir build

@ryanofsky ryanofsky merged commit c978878 into bitcoin-core:master Feb 5, 2025
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 5, 2025
Bring in a few cmake changes to improve cmake support

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 7, 2025
Bring in a few cmake changes to improve cmake support and fix compile/lint/tidy warnings.

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 7, 2025
Bring in a few cmake changes to improve cmake support and fix compile/lint/tidy warnings.

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
@hebasto
Copy link
Member

hebasto commented Feb 8, 2025

I don't think this project should include(CTest) in the first place. Besides calling enable_testing(), it also performs some CDash-related actions, which are unnecessary.

I forgot to mention another drawback of using include(CTest).

This command introduces the BUILD_TESTING cache variable, which can sneak into downstream projects.

For example, in bitcoin/bitcoin#31741, after reconfiguring with -DENABLE_IPC=ON, BUILD_TESTING appears in the CMake cache along with the Bitcoin Core project's BUILD_TESTS, which might be confusing at the very least.

ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 10, 2025
Bring in a few cmake changes to improve cmake support and fix compile/lint/tidy warnings.

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
ryanofsky added a commit to ryanofsky/libmultiprocess that referenced this pull request Feb 10, 2025
Reported
bitcoin-core#145 (comment)
this creates confusion in the bitoin core project because it adds a
BUILD_TESTING variable which is confusing because bitcoin core uses a different
BUILD_TESTS variable.
@ryanofsky
Copy link
Collaborator

re: #145 (comment)

This command introduces the BUILD_TESTING cache variable, which can sneak into downstream projects.

Opened #161 to try to fix this, which gets rid of BUILD_TESTING but has other side effects. If you have ideas on how to improve it, would be helpful to have feedback there.

ryanofsky added a commit that referenced this pull request Feb 10, 2025
a7f0669 cmake: Avoid including CTest if not top level project (Ryan Ofsky)

Pull request description:

  Avoid including CTest in if this is not a top-level cmake project because as reported #145 (comment) this adds a `BUILD_TESTING` option could be confused for Bitcoin core's `BUILD_TESTS` option.

Top commit has no ACKs.

Tree-SHA512: c28d8c9a43f23d7d1e91c914c777695fe422105a347133194b547e28217dd94be5418a1384b8c83b41fc173ee1b49fcd4656114f75d169d0cabc78ea2615d681
Sjors pushed a commit to Sjors/bitcoin that referenced this pull request Feb 10, 2025
Bring in a few cmake changes to improve cmake support and fix compile/lint/tidy warnings.

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
Sjors pushed a commit to Sjors/bitcoin that referenced this pull request Feb 13, 2025
Bring in a few cmake changes to improve cmake support and fix compile/lint/tidy warnings.

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 24, 2025
Bump libmultiprocess library to include bugfix
bitcoin-core/libmultiprocess#159 which should fix
intermittent CI failure reported
bitcoin#31921

This change is bumping the libmultiprocess version instead of cherry picking
the bugfix. It could cherry-pick the bugfix instead, but there are reasons to
prefer just bumping the version:

- Bugfix might interact with earlier PRs, and the latest version is better
  tested with testing done in many CI configurations in bitcoin#30975 and bitcoin#31802

- Even though we are in feature freeze for a release, the MULTIPROCESS=1 option
  is currently not enabled for release, so this PR only affect CI builds and
  local builds, not the release build.

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
bitcoin-core/libmultiprocess#164 Bump minimum required cmake to 3.12
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 24, 2025
Bump libmultiprocess library to include bugfix
bitcoin-core/libmultiprocess#159 which should fix
intermittent CI failures reported in
bitcoin#31921

This change is bumping the libmultiprocess version instead of cherry picking
the bugfix. It could cherry-pick the bugfix instead, but there are reasons to
prefer bumping the version:

- Bugfix might interact with earlier PRs, and the latest version is better
  tested with testing done in many CI configurations in bitcoin#30975 and bitcoin#31802

- Even though we are in feature freeze for a release, the MULTIPROCESS=1 option
  is currently not enabled for release, so this PR only affect CI builds and
  local builds, not the release build.

This update brings in the following changes:

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
bitcoin-core/libmultiprocess#164 Bump minimum required cmake to 3.12
ryanofsky added a commit to ryanofsky/bitcoin that referenced this pull request Feb 24, 2025
Bump libmultiprocess library to include bugfix
bitcoin-core/libmultiprocess#159 which should fix
intermittent CI failures reported in
bitcoin#31921

This change is bumping the libmultiprocess version instead of cherry picking
the bugfix. It could cherry-pick the bugfix instead, but there are reasons to
prefer bumping the version:

- Bugfix might interact with earlier PRs, and the latest version is better
  tested with testing done in many CI configurations in bitcoin#30975 and bitcoin#31802

- Even though we are in feature freeze for a release, the MULTIPROCESS=1 option
  is currently not enabled for release, so this PR only affect CI builds and
  local builds, not the release build.

This update brings in the following changes:

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
bitcoin-core/libmultiprocess#164 Bump minimum required cmake to 3.12
fanquake pushed a commit to bitcoin/bitcoin that referenced this pull request Feb 25, 2025
Bump libmultiprocess library to include bugfix
bitcoin-core/libmultiprocess#159 which should fix
intermittent CI failures reported in
#31921

This change is bumping the libmultiprocess version instead of cherry picking
the bugfix. It could cherry-pick the bugfix instead, but there are reasons to
prefer bumping the version:

- Bugfix might interact with earlier PRs, and the latest version is better
  tested with testing done in many CI configurations in #30975 and #31802

- Even though we are in feature freeze for a release, the MULTIPROCESS=1 option
  is currently not enabled for release, so this PR only affect CI builds and
  local builds, not the release build.

This update brings in the following changes:

bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
bitcoin-core/libmultiprocess#164 Bump minimum required cmake to 3.12
fanquake added a commit to bitcoin/bitcoin that referenced this pull request Feb 25, 2025
01f7715 depends: Update libmultiprocess library to fix CI failure (Ryan Ofsky)

Pull request description:

  Bump libmultiprocess library to include bugfix bitcoin-core/libmultiprocess#159 which should fix intermittent CI failures reported in #31921

  This change is bumping the libmultiprocess version instead of cherry picking the bugfix. It could cherry-pick the bugfix instead, but there are reasons to prefer bumping the version:

  - Bugfix might interact with earlier PRs, and the latest version is better tested with testing done in many CI configurations in [#30975](#30975) and [#31802](#31802)

  - Even though we are in feature freeze for a release, the MULTIPROCESS=1 option is currently not enabled for release, so this PR only affect CI builds and local builds, not the release build.

  This update brings in the following changes:

  bitcoin-core/libmultiprocess#140 build: don't clobber user/superproject c++ version
  bitcoin-core/libmultiprocess#142 build: add option for external mpgen binary
  bitcoin-core/libmultiprocess#143 cleanup: initialize vars in the EventLoop constructor in the correct order
  bitcoin-core/libmultiprocess#146 cmake: Suppress compiler warnings from capnproto headers
  bitcoin-core/libmultiprocess#147 cmake: EXTERNAL_MPGEN cleanups
  bitcoin-core/libmultiprocess#148 util: fix -Wpessimizing-move warning
  bitcoin-core/libmultiprocess#145 CTest: Module must be included at the top level
  bitcoin-core/libmultiprocess#149 Avoid `-Wundef` compiler warnings
  bitcoin-core/libmultiprocess#152 refactor: Fix compiler and clang-tidy warnings
  bitcoin-core/libmultiprocess#155 scripted-diff: s/Libmultiprocess_EXTERNAL_MPGEN/MPGEN_EXECUTABLE/g
  bitcoin-core/libmultiprocess#156 refactor: Remove locale-dependent function calls
  bitcoin-core/libmultiprocess#157 refactor: Avoid using std::format
  bitcoin-core/libmultiprocess#159 bugfix: Do not lock EventLoop::mutex after EventLoop is done
  bitcoin-core/libmultiprocess#161 cmake: Avoid including CTest if not top level project
  bitcoin-core/libmultiprocess#164 Bump minimum required cmake to 3.12

  ---

  This PR is part of the [process separation project](#28722).

ACKs for top commit:
  fanquake:
    ACK 01f7715

Tree-SHA512: a6a795e4d4e13e9d35c9346f3c83d5da817f1452bdc4a9412aeadc4c652ad6e5047f4c77756570594a70ec9095cc786772a0469e306dc19bb5a508fd515c37f4
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

Successfully merging this pull request may close these issues.

3 participants