Skip to content
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

Fails on msys2 with --target x86_64-pc-windows-gnu on Github Actions #56

Closed
niklasf opened this issue Aug 4, 2022 · 4 comments
Closed
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@niklasf
Copy link

niklasf commented Aug 4, 2022

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

@Shnatsel
Copy link
Member

Shnatsel commented Aug 4, 2022

Thank you for the report!

That's not the kind of error I expected 😅 Maybe we mess up some paths somewhere?

I'll try to spin up a Windows VM and take a closer look today or tomorrow.

@Shnatsel
Copy link
Member

Shnatsel commented Aug 4, 2022

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.

@Shnatsel
Copy link
Member

Shnatsel commented Aug 4, 2022

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.

@Shnatsel Shnatsel changed the title Fails on msys2 with --target x86_64-pc-windows-gnu Fails on msys2 with --target x86_64-pc-windows-gnu on Github Actions Aug 4, 2022
@Shnatsel Shnatsel added bug Something isn't working help wanted Extra attention is needed labels Aug 11, 2022
@niklasf
Copy link
Author

niklasf commented Dec 8, 2022

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 🤷

@niklasf niklasf closed this as completed Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants