-
Notifications
You must be signed in to change notification settings - Fork 32
cmake: Combine installed packages #98
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
Conversation
Move code and add comments, no substantive changes.
This change combines previous installed "cmake/LibmultiprocessLibConfig.cmake" and "cmake/LibmultiprocessBinConfig.cmake" files into a single "cmake/Libmultiprocess/LibmultiprocessConfig.cmake" file, so it can be imported with "find_package(Libmultiprocess)". The previous locations which were set in bitcoin-core#97 were not actually compatible with find_package search behavior by default. The change also adds some documentation about using the new package to doc/install.md.
Other comments about this #97 (comment) |
I did not test this PR yet, but have a question regarding the combined package configuration. In the Bitcoin Core depends, how does it suppose to work considering that the mpgen tool is installed in the |
I'm not sure exactly, but I'd imagine you'd just find the package twice with different components instead of finding two packages separately. Even before this PR you would need to point cmake at the native directory to find the code generation package, so I don't think that aspect is changing. |
Or if the issue is that cmake doesn't allow importing two packages with the same name, maybe a good solution would be to add an option here controlling the installed package name. If multiple libmultiprocess builds are installed (native and cross-compiled) it seems good if they are all allowed to be full installs, and downstream cmake projects can choose which components of each install to use. Even though depends system only does half-builds for efficiency (executable only or library only), this doesn't seem like something that should be required for other builds. |
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
depends: Update libmultiprocess library Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in #95 and #96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in #95 and #96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in #95 and #96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in #95 and #96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in #95 and #96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
d318c4e depends: bump libmultiprocess for CMake fixes (Cory Fields) Pull request description: Broken out of #30454 . Bumped [even further](4883197#r1684802528) after bitcoin-core/libmultiprocess#98 was merged upstream. hebasto Presumably this approach works now with the CMake branch? ACKs for top commit: ryanofsky: Code review ACK d318c4e. Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
Once a package found, the Therefore, to work with Bitcoin Core's depends, the code as follows should be used: find_package(Libmultiprocess COMPONENTS Lib)
unset(Libmultiprocess_DIR CACHE)
find_package(Libmultiprocess COMPONENTS Bin
NO_CMAKE_FIND_ROOT_PATH
PATHS ${CMAKE_FIND_ROOT_PATH}/native
) But this approach undermines the user's ability to specify non-standard package component locations because the
If such an option will be leveraged by depends, Bitcoin Core probably will fail to find the |
re: #98 (comment) @hebasto can you use the
So modifying your example above, you could write: find_package(Libmultiprocess COMPONENTS Lib)
find_package(LibmultiprocessNative COMPONENTS Bin
NAMES Libmultiprocess
NO_CMAKE_FIND_ROOT_PATH
PATHS ${CMAKE_FIND_ROOT_PATH}/native
) This should result in separate |
Thank you! The suggested approach looks nice to me. It only requires a bugfix suggested in #103. |
c373a94 cmake: Fix package configuration file (Hennadii Stepanov) Pull request description: When loading a package configuration file, `find_package` defines variables to provide information about the call arguments. In particular, `CMAKE_FIND_PACKAGE_NAME` represents the package name. This PR uses this variable instead of a hardcoded name, making the use case suggested in #98 (comment) workable: ```cmake find_package(Libmultiprocess COMPONENTS Lib) find_package(LibmultiprocessNative COMPONENTS Bin NAMES Libmultiprocess ) ``` ACKs for top commit: ryanofsky: Code review ACK c373a94 Tree-SHA512: 493cfd62c4992c9753772844c0a96004d45eb1c807986b7ce7871fdf0debede79d9f9fbe22ecce0a92d4d0b5a2d24f0067c2b5816f5210a8f5bcbb41d04fb917
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
Fix "connection: run async cleanups in LIFO not FIFO order" bitcoin-core/libmultiprocess#101 is needed to prevent CI failure https://cirrus-ci.com/task/4549686449668096 caused by wallet processes deadlocking during shutdown when node process is killed. This also includes other recent changes: bitcoin-core/libmultiprocess#95: cmake: Introduce `LibmultiprocessMacros` module bitcoin-core/libmultiprocess#96: cmake: Introduce packages bitcoin-core/libmultiprocess#97: cmake: rename new packages and module introduced in bitcoin#95 and bitcoin#96 bitcoin-core/libmultiprocess#98: cmake: Combine installed packages bitcoin-core/libmultiprocess#99: proxy-types: Fix missing space in server destroy log print bitcoin-core/libmultiprocess#100: doc: Add various code comments and documentation bitcoin-core/libmultiprocess#102: doc: Document shutdown sequences better
d318c4e depends: bump libmultiprocess for CMake fixes (Cory Fields) Pull request description: Broken out of bitcoin#30454 . Bumped [even further](bitcoin@4883197#r1684802528) after bitcoin-core/libmultiprocess#98 was merged upstream. hebasto Presumably this approach works now with the CMake branch? ACKs for top commit: ryanofsky: Code review ACK d318c4e. Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
d318c4e depends: bump libmultiprocess for CMake fixes (Cory Fields) Pull request description: Broken out of bitcoin#30454 . Bumped [even further](bitcoin@4883197#r1684802528) after bitcoin-core/libmultiprocess#98 was merged upstream. hebasto Presumably this approach works now with the CMake branch? ACKs for top commit: ryanofsky: Code review ACK d318c4e. Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
d318c4e depends: bump libmultiprocess for CMake fixes (Cory Fields) Pull request description: Broken out of bitcoin#30454 . Bumped [even further](bitcoin@4883197#r1684802528) after bitcoin-core/libmultiprocess#98 was merged upstream. hebasto Presumably this approach works now with the CMake branch? ACKs for top commit: ryanofsky: Code review ACK d318c4e. Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
d318c4e depends: bump libmultiprocess for CMake fixes (Cory Fields) Pull request description: Broken out of bitcoin#30454 . Bumped [even further](bitcoin@4883197#r1684802528) after bitcoin-core/libmultiprocess#98 was merged upstream. hebasto Presumably this approach works now with the CMake branch? ACKs for top commit: ryanofsky: Code review ACK d318c4e. Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
d318c4e depends: bump libmultiprocess for CMake fixes (Cory Fields) Pull request description: Broken out of bitcoin#30454 . Bumped [even further](bitcoin@4883197#r1684802528) after bitcoin-core/libmultiprocess#98 was merged upstream. hebasto Presumably this approach works now with the CMake branch? ACKs for top commit: ryanofsky: Code review ACK d318c4e. Tree-SHA512: 4b5491f73c0063d09e8339829cd831b1f4c441dd7b55a22037c9337c80cce19bb00a3e5cf925efa77d6d4e89ab45482f40f5799bc14948f8cabcbad3c3549430
This change combines previous installed:
cmake/LibmultiprocessLibConfig.cmake
cmake/LibmultiprocessBinConfig.cmake
files into a single:
cmake/Libmultiprocess/LibmultiprocessConfig.cmake
file, so it can be imported with
find_package(Libmultiprocess)
.The previous locations which were set in #97 were not compatible with
find_package
search behavior by default.The change also adds some documentation about using the new package to doc/install.md.