protobuf: fix protoc used when cross-compiling#370155
Merged
misuzu merged 4 commits intoNixOS:stagingfrom Jan 29, 2025
Merged
Conversation
ed76dfa to
176d3ae
Compare
GaetanLepage
reviewed
Jan 5, 2025
176d3ae to
e1751c5
Compare
GaetanLepage
approved these changes
Jan 6, 2025
Contributor
GaetanLepage
left a comment
There was a problem hiding this comment.
LGTM.
I would like another ACK from someone who is more familiar with cross-compilation.
3 tasks
misuzu
reviewed
Jan 13, 2025
e6b0cb8 to
6eee173
Compare
GaetanLepage
approved these changes
Jan 14, 2025
sikmir
approved these changes
Jan 15, 2025
Member
Author
|
So I thought about this again, and I think adding a setup-hook as below would be the better solution. ProtobufCMakeFlags() {
cmakeFlagsArray+=(
-DPROTOC_EXE="@build_protobuf@/bin/protoc"
)
}
preConfigureHooks+=(ProtobufCMakeFlags)^ has essentially the same effect as the previous patch to the CMake files, overriding the path to protoc. |
6eee173 to
fc29afa
Compare
misuzu
approved these changes
Jan 29, 2025
Contributor
misuzu
left a comment
There was a problem hiding this comment.
Tested by building:
- pkgs.monero-cli
- pkgs.monero-gui
- pkgs.opencv4
- pkgsCross.riscv64.opencv4
- pkgsCross.riscv64.protobuf_21
- pkgsCross.riscv64.protobuf_23
- pkgsCross.riscv64.protobuf_24
- pkgsCross.riscv64.protobuf_25
- pkgsCross.riscv64.protobuf_26
- pkgsCross.riscv64.protobuf_27
- pkgsCross.riscv64.protobuf_28
- pkgsCross.riscv64.protobuf_29
Contributor
|
Thanks guys ! |
13 tasks
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This basically inlines the fix applied in most consumers of protobuf.
OpenCV 4 derivation is simplified to automatically use the right protoc. (It didn't work before anyhow.)
Things done
pkgsCross.aarch64-multiplatform.protobuf_{21,23,24,25,26,27,28}pkgsCross.aarch64-multiplatform.opencv4buildsnix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.