-
Notifications
You must be signed in to change notification settings - Fork 69
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
generate a wrong platform protoc.exe when cross compile #126
Comments
@Yannic can U see see? |
@thii can u cc? |
can anybody take a look please? |
|
clear && bazel build --incompatible_enable_cc_toolchain_resolution --platforms=@bazel_build_file//platforms:linux_gcc11_aarch64_none_musleabi -s --copt=-g3 --strip=never //... |
@Yannic demo may have toolchain download problem, but I have checked, it's fine, if demo has any problem, tell me, I'll fix it |
after I check rules_proto source code, I found my platforms value passby was
and I defined a toolchain
exec_compatible_with indicate it's for cross compiling, but rules_proto use target_compatible_with values I guess, so cpu:aarch64 and os:linux will be recognised by rule_proto in BUILD.release, so :linux-aarch64": "@com_google_protobuf_protoc_linux_aarch64//:protoc" be selected. as a conclusion: rules_proto not support cross compile? can update rules_proto support cross compile? |
maybe it's not rules_proto problem, I think may need bazel make select more flexible |
rules_proto need choose protoc platform by detect bazel excution platform(host), not by select, use select cannot support cross compile |
my project import rules_proto and grpc, when I cross compile for arm with with --incompatible_enable_cc_toolchain_resolution and --platforms, it generated protoc.exe for arm, so protoc.exe cannot executed on build host( x86_64 linux), so build grpc will fail, I'm not sure it's grpc problem or rules_proto problem. here it's a demo:
https://github.com/xiedeacc/tbox
I also open an issue at grpc: grpc/grpc#30103
The text was updated successfully, but these errors were encountered: