-
Notifications
You must be signed in to change notification settings - Fork 371
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
Cannot build "backtrace" with locally-compiled rustc on macOS: expected enum std::os::raw::c_void
, found enum libc::c_void
#768
Comments
(Actually, I get errors like |
Yeah we are seeing those deprecation warnings on CI as well. They do not originate from within Miri though. The issue you are having looks like some kind of libc version mismatch. I have no idea where that might come from. It only seems to happen on macOS. |
std::os::raw::c_void
, found enum libc::c_void
But also your build failure is not in Miri, it is in backtrace, so it looks to me that's where the bug is. Miri can't do anything about its dependencies failing to build... Cc @alexcrichton any idea why backtrace might fail to build against a locally built rustc on macOS? |
std::os::raw::c_void
, found enum libc::c_void
std::os::raw::c_void
, found enum libc::c_void
Maybe #427 (not having a Also, which exact rustc commit did you try? Please make sure it is 8e948df707ea8a3c88c65bf2ffdcb2f1cf5491be (the current commit is always given in the |
(Sorry for the spam, each time I am done writing I have a new idea.^^) So according to our CI, the macOS build works fine with backtrace v0.3.30. Your build failure seems to be with an outdated version of the backtrace crate. Did you try |
Yes, this was fixed in rust-lang/backtrace-rs#196 |
Thanks, closing as fixed-upstream. |
|
Looks like some other crates are referencing the outdated version of backtrace then... |
No, this is a patch upgrade which should be used automatically by Cargo. The only thing depending on backtrace is failure v0.1.5, which is the same version as on our CI -- so it does clearly not hard-code an earlier version. |
Just checked, and yes, it seems you're right. Why is the old version being used despite running |
I don't know. What does |
Literally just this:
|
Oh, from reading your original text it sounds like you are literally working inside Did you try But anyway this is definitely not a bug in Miri. Seems more like cargo is acting up, so maybe report it there. |
Good suggestion. Oddly, now I'm getting the same error but with the newer version of backtrace:
And yes, I tried |
That error is with a standalone checkout? (It's not clear what you are referring to with "good suggestion".) |
Yes, the suggestion of a separate checkout. That's the error I got in that case. |
What does |
Okay, rustc 1.29.0-dev... WTF? |
Oh, that was just because I was mid-build. Never mind.
|
How does the rustc version change when you are mid-build...? |
@RalfJung I think it removes the build artefacts, and so rustup "falls back" on another version of rustc (not sure why such an old one though!). |
That's not how rustup works... what should be happening is that you get an error saying that there is no |
Okay, that's a bit worrying then... Anyway, the good news is that building from a "standalone" checkout of Miri seems to work. (The crucial point is probably that this Miri is outside of the Rustc Cargo workspace.) cc @rust-lang/cargo You may want to investigate whether this is a bug? |
Rustup does have a fallback for cargo if it doesn't exist. It falls back to nightly, beta, then stable if any of those toolchains exist. However, if you have an override (or +toolchain), I don't think it has a fallback for rustc, so there should have been an error if rustc doesn't exist. As for the backtrace issue, I'm having a hard time understanding exactly what's wrong. I went to |
I can reproduce the issue just using that (well, more precisely linking the toolchain and then overriding). Maybe because I'm on macOS... |
I'm on macos, so I don't think that's the issue. Did you run Also, the reason |
Hmm, possible. I blew away the |
So that means that I could accidentally be stuck on an old version of a crate if the author removes a feature? Wow, I had no idea. I guess authors shouldn't remove features anyway, but still this is somewhat surprising. |
Yes, removing a feature is a breaking change. |
I locally built rustc master and linked stage2 using rustup, set the override in the miri subdir, but I'm getting this when running
cargo build
:Note that
./x.py build src/tools/miri
works just fine.I've discussed this a bit with @RalfJung on chat but not had much luck, so I thought I'd post it here so we can treat it as a proper issue.
The text was updated successfully, but these errors were encountered: