-
Notifications
You must be signed in to change notification settings - Fork 13.3k
"extern location for serde_derive is of an unknown type" when cross compiling #37899
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
cc @jseyfried I'm not sure if this ever worked, but maybe you know if something changed recently about it? (or maybe was fixed) |
Could this be the same issue as #37893? |
Nope, same error with |
Interestingly, renaming the file from
|
Been looking into it, AFAIU, the crate loader first tries to load the file for the target, which naturally fails with the error, and then tries again with the host triple which actually succeeds. However because the first attempt raised an error, the compiler eventually stops on the next I guess the solution would be to save the error, and only raise it if I'd be happy to give it a try at fixing it, probably tomorrow |
@plietar great, thanks for diagnosing! If you'd like to work on fixing, free to ping me on IRC with questions (or ask here). Otherwise, I can fix tomorrow. |
When cross compiling with procedural macros, the crate loader starts by looking for a target crate, before trying with a host crate. Rather than emitting an error immediately if the host and target extension differ, the compiler should delay it until both attempts have failed. Fixes rust-lang#37899 r? @jseyfried
Delay error reporting of filename mismatch. When cross compiling with procedural macros, the crate loader starts by looking for a target crate, before trying with a host crate. Rather than emitting an error immediately if the host and target extension differ, the compiler should delay it until both attempts have failed. Fixes #37899
Trying to cross compile serde's example from macOS to Linux
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: