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

feature request: install missing musl deps #20

Closed
ilteoood opened this issue Aug 24, 2024 · 11 comments
Closed

feature request: install missing musl deps #20

ilteoood opened this issue Aug 24, 2024 · 11 comments

Comments

@ilteoood
Copy link

If I try to use a musl target like aarch64-unknown-linux-musl, the step breaks because no musl deps are not installed.
I expect them to be installed by this action, to have an easier integration

@autarch
Copy link
Member

autarch commented Aug 25, 2024

Could you point me at a failed run and the config for it? I also use targets like aarch64-unknown-linux-musl with this action, and it just works for me.

@autarch
Copy link
Member

autarch commented Aug 25, 2024

Doh, what am I saying? It just works because I install them outside the action. Heh, I forgot that for a second. Yes, I think it would make sense to have the action do this.

@ilteoood
Copy link
Author

Here is a broken ci if you still need it: https://github.com/ilteoood/nmt/actions/runs/10536741898/job/29197263232

@autarch
Copy link
Member

autarch commented Aug 25, 2024

So I did some further investigating, and it seems like there's no need to install the musl-tools when using cross. I realized that the tests for this action were in fact not installing that package and they all passed, regardless of whether cross was used or not.

So then I went back to one of my projects that uses this action, and I removed the step to install musl-tools entirely. It still works fine - https://github.com/houseabsolute/precious/actions/runs/10548192981/job/29221794258

Looking at the output of your action, you can see that it's complaining about a package that doesn't exist, musl-gcc.

@autarch
Copy link
Member

autarch commented Aug 25, 2024

Just to clarify further, the issue is coming from your CI setup. It's not coming from actions-rust-cross. I don't think it even got to the point of executing this action.

@ilteoood
Copy link
Author

The CI is quite standard.
I had to insert this additional step to make it work.
https://github.com/ilteoood/nmt/blob/733f2c5afc18c917db638dd43a37b5843c6ce73e/.github/workflows/rust.yml#L39

Honestly I expect the action to install these additional deps to make musl working.

@autarch
Copy link
Member

autarch commented Aug 25, 2024

You didn't really respond to my point. The failure you linked is erroring out because you tried to install a Debian package named musl-gcc, which doesn't exist. Do you have a failure that shows what happens when musl-tools isn't installed?

@ilteoood
Copy link
Author

Sorry, here is the right ci with the error: https://github.com/ilteoood/nmt/actions/runs/10536709300/job/29197193762

@autarch
Copy link
Member

autarch commented Aug 25, 2024

Aha, I see. It looks like this is only an issue when the code being compiled needs gcc. In your project, the psm crate has some C code, which leads to this error.

Can you try using the musl branch of this action?

      - name: Build binary
        uses: houseabsolute/actions-rust-cross@musl
        with:
            ...

Just replace @v0 with @musl. I think that will address the issue.

@ilteoood
Copy link
Author

Yes, it's working fine!

@autarch
Copy link
Member

autarch commented Aug 25, 2024

I just published v0.0.14, which includes this fix.

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

No branches or pull requests

2 participants