-
Notifications
You must be signed in to change notification settings - Fork 37.7k
build, depends: Fix libmultiprocess
cross-compilation
#29665
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
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
cc @ryanofsky |
As an alternative, the |
4e70ad4 cmake, refactor: Rename target export files (Hennadii Stepanov) 694b6b1 cmake: Configure `LibmultiprocessGen` package (Hennadii Stepanov) 3b20e35 cmake: Configure `Libmultiprocess` package (Hennadii Stepanov) Pull request description: This PR adds configurations for the `Libmultiprocess` and `LibmultiprocessGen` packages. The Bitcoin Core branch, with uses this PR branch, is available [here](https://github.com/hebasto/bitcoin/tree/240329-cmake-CI-mpgen). As a suggestion for a follow-up, it seems worth disabling `mpgen` target for cross-compiling (see bitcoin/bitcoin#29665 (comment) and CMake [docs](https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html#running-executables-built-in-the-project)). Based on #95. ACKs for top commit: ryanofsky: Code review ACK 4e70ad4. This should make it easier to depend on libmultprocess in cmake projects, using a find_package call and not having to include files directly. Tree-SHA512: 231d00fd3b03bff40d010d39636a4c6b26e071a1d2c220f204ef536d6f3f7b3c81d2d05a16e3bb23f405a45e2b763cd88344cabd9eb407f1967b766b328815a4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 178065f
Thanks for the fix. I don't actually understand why the fix is needed, when this was broken, or why mpgen linking should fail when it is cross compiled. That seems like an upstream bug and it would be nice to have more information about it, though the workaround here seems acceptable and has some nice features like being more efficient and using separate source/build directories.
There are some things I don't like about the workaround, but I don't think they are too important:
- I don't think it's great that is now hardcoding
multiprocess
andmpgen
target names into the build script instead of relying on the fact thatinstall-lib
andinstall-bin
targets will automatically build the targets that are needed. For example now if an another helper library is added upstream or one of the targets is renamed, the install commands will fail because the right targets will not have been built. - I think it would be better if the build and install logic remained upstream instead of being moved into the depends build. If it is important to be able to separate build and install steps, we could add new "bin" and "lib" targets upstream to complement existing "install-bin" and "install-lib" targets.
- I think it would be nice if other cleanups in this PR were separate commits so all the changes would be easy to understand.
- I don't understand the "Rebuilding during installation has been skipped." comment, because I would not think anything would have been actually been built during the install step if make was just run previously.
But again these are all minor concerns and this looks good to merge in its current form (probably with 1 other ACK)
Consider the following commands in the libmultiprocess root directory:
From the build log it follows that the That's not the case when using |
I don't think that's true. I see lines like |
This change prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling.
OK. I've dropped all unrelated / unneeded changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review ACK 2de2ea2
Maybe @fanquake would be a good second reviewer
OK. I've dropped all unrelated / unneeded changes.
That's reasonable, and the change is very simple now. To be clear, I wasn't asking for anything to be reverted, and I'm fine with any version of this PR. I'm mostly curious to know why a link error even happens at all. But I guess can download the mac sdk to experiment. Thanks for the fix and information about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed.
I don't actually understand why the fix is needed, when this was broken, or why mpgen linking should fail when it is cross compiled.
I agree with Russ that it'd be better to actually figure out what the root cause is, and fix it more directly, rather than working around it just to make things compile.
6c64fc2 fixup! ci: Test CMake edge cases (Hennadii Stepanov) c24647c cmake: Add `MULTIPROCESS` option (Hennadii Stepanov) aae82b3 depends: Bump libmultiprocess source (Hennadii Stepanov) Pull request description: Also a new "Linux 64-bit, multiprocess" CI task has been added. Also see: bitcoin#29665. Top commit has no ACKs. Tree-SHA512: c03255070fb843ff37e8997cf2813f10380925fb2a5b7178e5f0516cc4d829700ff334e18066265b246d87f7ba1a20472bb0638608983d11a74b6d68dd9c4306
…ilation 2de2ea2 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov) Pull request description: On the master branch @ 3b12fc7, the following command fails: ``` $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1 ... [100%] Linking CXX executable mpgen ... clang++: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling. ACKs for top commit: ryanofsky: Code review ACK 2de2ea2 fanquake: ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed. Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
…ilation 2de2ea2 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov) Pull request description: On the master branch @ 3b12fc7, the following command fails: ``` $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1 ... [100%] Linking CXX executable mpgen ... clang++: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling. ACKs for top commit: ryanofsky: Code review ACK 2de2ea2 fanquake: ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed. Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
…ilation 2de2ea2 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov) Pull request description: On the master branch @ 3b12fc7, the following command fails: ``` $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1 ... [100%] Linking CXX executable mpgen ... clang++: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling. ACKs for top commit: ryanofsky: Code review ACK 2de2ea2 fanquake: ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed. Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
…ilation 2de2ea2 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov) Pull request description: On the master branch @ 3b12fc7, the following command fails: ``` $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1 ... [100%] Linking CXX executable mpgen ... clang++: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling. ACKs for top commit: ryanofsky: Code review ACK 2de2ea2 fanquake: ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed. Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
…ilation 2de2ea2 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov) Pull request description: On the master branch @ 3b12fc7, the following command fails: ``` $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1 ... [100%] Linking CXX executable mpgen ... clang++: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling. ACKs for top commit: ryanofsky: Code review ACK 2de2ea2 fanquake: ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed. Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
…ilation 2de2ea2 build, depends: Fix `libmultiprocess` cross-compilation (Hennadii Stepanov) Pull request description: On the master branch @ 3b12fc7, the following command fails: ``` $ make -C depends libmultiprocess HOST=arm64-apple-darwin MULTIPROCESS=1 ... [100%] Linking CXX executable mpgen ... clang++: error: linker command failed with exit code 1 (use -v to see invocation) ... ``` This PR prevents building all default targets that include `mpgen`, which expectedly fails to link when cross-compiling. ACKs for top commit: ryanofsky: Code review ACK 2de2ea2 fanquake: ACK 2de2ea2 - I checked that this fixes the macOS cross-compilation issue. I'm assuming these packages are also likely to change further in the (near) future, given the changes going in upstream: https://github.com/chaincodelabs/libmultiprocess/pulls?q=is%3Apr+is%3Aclosed. Tree-SHA512: 563551afbe483c923b52c6171f9d73bcc30bc4febd821b5abfe8aadb2ac601b94c2d10a73746ace3710d9f0afa4798eb090e77ccb1ae66a819495912802d91c9
fbc0bce Merge bitcoin#29665: build, depends: Fix `libmultiprocess` cross-compilation (fanquake) 59a2145 Merge bitcoin#29747: depends: fix mingw-w64 Qt DEBUG=1 build (fanquake) bdb2fa6 Merge bitcoin#29671: index: avoid "failed to commit" errors on initialization (Ava Chow) 65377ea Merge bitcoin#29192: Weaken serfloat tests (fanquake) 4122404 Merge bitcoin#28891: test: fix `AddNode` unit test failure on OpenBSD (fanquake) 812ef53 Merge bitcoin#25677: refactor: make active_chain_tip a reference (MacroFake) 34e12fa Merge bitcoin#24564: doc: Clarify that CheckSequenceLocksAtTip is a validation function (glozow) d529751 Merge bitcoin#24788: doc: Add gpg key import instructions for Windows (fanquake) 61bae78 Merge bitcoin#24784: refactor: deduplicate integer serialization in RollingBloom benchmark (MarcoFalke) Pull request description: ## Issue being fixed or feature implemented Trivial backports ## What was done? ## How Has This Been Tested? built locally ## Breaking Changes ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK fbc0bce Tree-SHA512: 731f70b747712810d4f74fe64a90139b02ddb62e9ac260705fa2588595feb19bd6e5ffed521fd878bacaab0015683e582fed19ed1855c3e955f93cd223862a17
# Conflicts: # CONTRIBUTING.md # doc/dnsseed-policy.md
On the master branch @ 3b12fc7, the following command fails:
This PR prevents building all default targets that include
mpgen
, which expectedly fails to link when cross-compiling.