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
cc 0.89 causes build failures, when building rustls on macos arm #989
Comments
I suspect it is #873 that caused this. Can you do a bisect on cc please? |
Bisect seems to agree
|
Opened #992 , can you test that please? |
Also, it would be great if you have a minimal reproduction, so that I can add a regression test to prevent it from happening again |
#992 works, thank you. Looking into a repro. |
Here's a repro tested on a mac M1, running Sonoma 14.3.1, latest XCode, cargo 1.76.0 (stable). Cargo.toml: [package]
name = "cc-rs-repro"
version = "0.1.0"
edition = "2021"
[dependencies]
reqwest = { version = "0.11", features = ["rustls-tls"], default-features = false }
tokio = "1"
cc = "=1.0.89"
[lib]
name = "repro"
crate-type = ["staticlib"] lib.rs pub extern "C" fn repro() {
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.unwrap();
rt.block_on(async {
reqwest::Client::new()
.post("example.org")
.send()
.await
.unwrap();
})
} Steps: rustup target add x86_64-apple-ios aarch64-apple-ios-sim
cargo build --target x86_64-apple-ios
cargo build --target aarch64-apple-ios-sim
lipo -create -output librepro.a target/aarch64-apple-ios-sim/debug/librepro.a target/x86_64-apple-ios/debug/librepro.a Result when repro successful:
|
Thanks, I will look into to it to see if it can be further simplified. |
I've managed to simplify it further (if you haven't already, in case that might saves you some time) pub extern "C" fn repro() {
use ring::agreement;
let rng = ring::rand::SystemRandom::new();
agreement::EphemeralPrivateKey::generate(&agreement::X25519, &rng).unwrap();
}
On 1.0.88, this gives no output. A successful repro looks like:
I haven't looked what in ring exactly triggers the issue, but at least no need to pull all of reqwest and rusttls, I suppose. |
Thanks, that will help a lot! |
Hello,
We're building a small rust crate for ios, for the
aarch64-apple-ios-sim
andx86_64-apple-ios
targets, on a macos arm host.Because this is for iOS, we create a "fat" static library using macOS's
lipo
tool, like so:This works with
rustls v0.21.10
andcc 1.0.88
, but started failing withcc 1.0.89
with the following error:Looking at the last few
cc
commits, it's not clear to me what could have caused this change in behavior, but the problem evidently disappears when we pincc = "=1.0.88"
in Cargo.toml.Unfortunately I don't have a minimal repro I can submit at the moment, but submitting for your consideration, and in case someone else runs into the same issue.
The text was updated successfully, but these errors were encountered: