-
Notifications
You must be signed in to change notification settings - Fork 108
Failed to build with custom build command #1141
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
Comments
Thanks for the bug report! I will try if I can reproduce it on Linux tomorrow. |
Alright, I hooked up lldb to see what's happened. Apparently some locking issue:
Another attempt show the same crush but on
I'll try a debug build to find anything else. |
Reproduced on Linux as well:
(Small note when you building the crate: use |
Can you try continuing execution a few times? SIGUSR1 is not the original crash signal (SIGABRT). I believe it is an implementation detail of jobserver and completely normal to happen. |
Well, I guess that's not the problem. I checked the crash log and it's a different story:
The panic should happen here fn with<R>(f: impl FnOnce(&mut Bridge<'_>) -> R) -> R {
BridgeState::with(|state| match state {
BridgeState::NotConnected => {
panic!("procedural macro API is used outside of a procedural macro");
}
BridgeState::InUse => {
panic!("procedural macro API is used while it's already in use");
}
BridgeState::Connected(bridge) => f(bridge),
})
} I know nothing about proc macros. Might be hitting some limitations here. |
Looks like bindgen uses an older proc_macro2 version that checks if it is running inside a proc macro by calling a proc_macro function and checking if it panics (which happens when it is not running inside a proc macro) cg_clif doesn't yet support unwinding on panics, so the panic results in an abort. Newer proc_macro2 versions use a dedicated method of proc_macro which doesn't panic. I will close this in favor of https://github.com/bjorn3/rustc_codegen_cranelift/issues/1101 which is caused by the same proc_macro2 problem. |
Cool thanks. |
This crate is a wrapper over a C library. So I have a
build.rs
to runbindgen
and other stuffs.Normal cargo works fine. But strangely, something aborted the process when using
cg_clif/cargo.sh
:Freshly built from master on macOS Big Sur 11.2.1. Is there any way to find out more?
The text was updated successfully, but these errors were encountered: