-
Notifications
You must be signed in to change notification settings - Fork 235
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
Crashes on run on macOS Sonoma 14.0 Beta (23A5312d) #524
Comments
I ran into this in rye. Since I do not have a mac beta I cannot reproduce this myself but if I were to guess, this might be an initialization order issue. Today Lines 138 to 151 in 3dc0872
There is a decent chance that this now runs too early and something that curl's init requires on macOS is not initialized yet. |
Interestingly, we recently got a similar crash reported on Windows: |
TL;DR. Link In Sonoma, some CoreFoundation functions require CoreServices, but dyld of Sonoma cannot load CoreServices when it should do, like cxx_global_init in gettext, MacOS_init in libcurl. |
Linking with CoreServices hasn't helped in my case, but switching to system curl did: curl-sys = { version = "0.4", features = ["force-system-lib-on-osx"] } |
I am facing the same issue in stable sonoma 14.0. |
Workaround works for me thanks @kornelski |
Fix for this issue has been implemented in curl/curl@6ab7e19 and is pending the next release. |
Please let us know when the fix is released, thanks! |
As seen in Homebrew#142161 (comment), the libcurl built by the `curl-sys` crate crashes on macOS Sonoma, and requires CoreServices to be linked against. While one possible workaround is to add CoreServices linkage, let's instead use our own `curl` formula to avoid vendoring a copy of libcurl at all. See also: alexcrichton/curl-rust#524
Hi, In my comprehension, if someone uses the curl crate to produce a binary, this binary will potentially crash if the linked libcurl is the current system one. In other words, even if curl is patched, a Rust binary linking to the system libcurl will crash unless:
Given this, shouldn't we always link a Rust binary using curl crate to CoreServices on Sonoma? |
For what it's worth, I've seen several similar bug reports and none of them seem to be using the system libcurl. See, for example, the stack trace in this issue description, where To further verify this, see the minimal reproducer below. Minimal reproducer
[package]
name = "curl-repro"
version = "0.1.0"
[dependencies]
# This doesn't work:
curl = { version = "0.4.44", features = ["static-curl"] }
# This works:
# curl = { version = "0.4.44", features = ["force-system-lib-on-osx"] }
fn main() {
let _ = curl::easy::Easy::new();
println!("OK");
} Using the
Note that Homebrew's cargo from the Linkage of Homebrew's
|
Thanks for the clarifications @ZhongRuoyu! |
To note, there's no need to wait for the next |
Does anybody know who's able to review #530 ? |
I can confirm that the issue is resolved and my related projects work on Sonoma now. To fix the issue, one needs to upgrade to https://github.com/alexcrichton/curl-rust/releases/tag/curl-sys-0.4.67 |
The result of running `cargo update -p curl-sys`, as recommended in alexcrichton/curl-rust#524 (comment).
Forwarding because I see Curl_macos_init <- ZN3std4sync4once4Once9call_once28$u7b$ $u7b$closure$u7d$$u7d$17hac714a257a9e32a7E <- _ZN4curl9INIT_CTOR9init_ctor17h6cadb2258443a9ccE in backtrace.
Downstream: nabijaczleweli/cargo-update#240
Using cargo 1.71.0 (cfd3bbd8f 2023-06-08)
cargo install-update
immediately crashes.The text was updated successfully, but these errors were encountered: