-
Notifications
You must be signed in to change notification settings - Fork 257
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
Remove uses_cxx11()
in build.rs build_grpc function causing MacOS build failures
#654
Comments
I see. So the fix is to just remove the line that |
@BusyJay exactly! Thank you for your quick response. I'll gladly submit a PR for this. |
Is it preferred that I fork the repo and submit a PR for review, or should I request access to be able to push a new branch to master? Thanks |
It seems a PR is submitted: #655 |
I see the PR was submitted but changes haven't landed yet. Were you going to still have that PR land with the contributor making the chances, or can/shall I? Would love to pull out the workarounds we have at present. Thanks @BusyJay |
Describe the bug
When attempting to compile and build several rust projects on MacOS (Silicon and otherwise), a regression became apparent when the build would fail when reaching
grpc-rs
:error: failed to run custom build command for
grpcio-sys v0.13.0+1.56.2-patched
, due to error occurred in cc-rs: unknown targetaarch64-apple-darwin11
.followed by:
error occurred in cc-rs: unknown target
aarch64-apple-darwin11
.(See further below for full error output)
This pointed to the problematic code in
build.rs
here. We set up a workaround after a lot of debugging, we pulled down a local copy of grpc-rs and simply calledconfig.build()
instead ofconfig.uses_cxx11().build()
and altered our Cargo.toml like so to point to the local build:This is definitely a workout and not a sustainable solution. This functionality is not really needed given minimum suppored OS versions in rust are well above MacOS 10.7 and
cc
sets the value in the deployment target. Modifying the returned value like this results in confusion and potential problems downstream.See additional context section, as this issue was relatedly discussed in
cc-rs
and ties directly into this bug. They just landed a patch related to this.To Reproduce
Steps to reproduce the behavior:
cargo build
(on Intel or Silicon Mac) with versions listed below. One example repo was autopush-rsExpected behavior
Build should not fail when compiling and reaching
grpcio-sys
.System information
rustc/cargo 1.84.1
grpcio = { version = "=0.13.0", features = ["openssl"], optional = true }
grpcio-sys = { version = "=0.13.0", optional = true }
Additional context
See related in cc-rs with recent PR to bypass and deprecate
uses_cxx11
Previously, a workaround had been introduced to fix a regression default targets on OSX, which is now no longer needed. As stated in 1276's comments, this is redundant nowadays, where:
2. cc sets this value in the deployment target.
And wrong because the target value in cc is the rustc target, while cmake invalidly assumed it refers to the Clang target.
full error output
The text was updated successfully, but these errors were encountered: