cargo-auditable
cargo-auditable copied to clipboard
Fails on msys2 with --target x86_64-pc-windows-gnu on Github Actions
Hi, nice to see all the progress on the "injection" approach. On msys2 i see that
cargo build --release --target x86_64-pc-windows-gnu
works fine, but
cargo auditable build --release --target x86_64-pc-windows-gnu
fails with
error[E0463]: can't find crate for `std`
|
= note: the `x86_64-pc-windows-gnu` target may not be installed
= help: consider downloading the target with `rustup target add x86_64-pc-windows-gnu`
error: cannot find macro `println` in this scope
--> src\main.rs:2:5
|
2 | println!("Hello, world!");
| ^^^^^^^
error: requires `sized` lang_item
For more information about this error, try `rustc --explain E0463`.
I tried to create a minimal reproducible example here: https://github.com/niklasf/cargo-auditable-issue/runs/7665968148?check_suite_focus=true
Thank you for the report!
That's not the kind of error I expected :sweat_smile: Maybe we mess up some paths somewhere?
I'll try to spin up a Windows VM and take a closer look today or tomorrow.
Okay, so plain rustup installation without msys2 works with cargo auditable
just fine.
And cargo auditable
doesn't have any C dependencies, so it doesn't need cygwin/msys2. cargo geiger
with its C dependency on OpenSSL fails to build because it can't find gcc.exe.
So I guess I'll have to dig into how exactly msys2 is set up, and how to wire it up to Rust. I caught a cold, so I probably won't make much progress on this in the next few days.
Running cargo auditable install cargo-geiger
in msys2 mingw x64 console worked for me. So it must be some issue with the Github action specifically, not a general msys2 issue.
Something in the Github Actions or msys2 environment must have changed. The issue is no longer reproducible, even on previously broken versions of cargo-auditable :shrug: