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

Build error for MUSL target #83

Closed
orhun opened this issue Apr 24, 2023 · 4 comments
Closed

Build error for MUSL target #83

orhun opened this issue Apr 24, 2023 · 4 comments

Comments

@orhun
Copy link

orhun commented Apr 24, 2023

Hello! 🐻

I was using this action to install Rust for my release workflow: https://github.com/orhun/systeroid/blob/af75cefa3933c1ceda6ee292d43fcec353f5e2ae/.github/workflows/cd.yml#L81

However, I got the following error while building for x86_64-unknown-linux-musl target:

error[E0463]: can't find crate for `core`
  |
  = note: the `x86_64-unknown-linux-musl` target may not be installed
  = help: consider downloading the target with `rustup target add x86_64-unknown-linux-musl`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

error[E0463]: can't find crate for `compiler_builtins`

For more information about this error, try `rustc --explain E0463`.

Full logs: https://github.com/orhun/systeroid/actions/runs/4709456927/jobs/8352603665

I'm already installing musl-tools in the previous step. Do I need to install something else as well?

I switched back to actions-rs/toolchain temporarily and everything worked fine. I'm suspecting this might be due to the usage of actions-rs/cargo for the build step. What do you think?

@dtolnay
Copy link
Owner

dtolnay commented Apr 24, 2023

Yeah I don't know what toolchain actions-rs/cargo would be looking for but it isn't this one.

I would not recommend using that action; it is not maintained.

@dtolnay dtolnay closed this as completed Apr 24, 2023
@orhun
Copy link
Author

orhun commented Apr 25, 2023

So hold on, what do you suggest that I do here? Just drop actions-rs/cargo and use cargo commands directly?

@rikhuijzer
Copy link

I would not recommend using that action; it is not maintained.

I just came across the same issue as @orhun in a different situation while using:

      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: 1.69
          targets: 'x86_64-unknown-linux-musl'

@rikhuijzer
Copy link

It looks like a rustup issue because the issue persist when installing the target via rustup. Therefore, it looks like closing this issue was the right decision 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants