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

ubi fails to install cross when running on an aarch64-unknown-linux-gnu host #38

Closed
lilith opened this issue Jan 21, 2025 · 11 comments
Closed

Comments

@lilith
Copy link

lilith commented Jan 21, 2025

I use github's linux arm runners ('aarch64-unknown-linux-gnu) for speed, but ubi can't find the right cross binary.

  • ./ubi --project cross-rs/cross --matching musl --in . --tag v0.2.5
    [ubi][ERROR] could not find a release asset for this OS (linux) and architecture (aarch64) from cross-x86_64-apple-darwin.tar.gz, cross-x86_64-pc-windows-msvc.tar.gz, cross-x86_64-unknown-linux-gnu.tar.gz, cross-x86_64-unknown-linux-musl.tar.gz

https://github.com/imazen/imageflow/actions/runs/12878799067/job/35905294927

I'm guessing this is due to cross-rs/cross#1612

Is there a way to have a from-source compilation, or is using aarch64 hosts just out?

@autarch
Copy link
Member

autarch commented Jan 21, 2025

I don't think this is a bug. ubi is doing the right thing here, since there's no cross release for that platform. Having ubi do compilation is way out of scope for this tool.

But it looks like you're using my actions-rust-cross action. I think there is a bug there. It shouldn't be trying to use cross on that platform at all! Your target matches the host platform, so it should just use cargo. It'd be great if you could file an issue there. I think it's a simple fix, though I'm not sure if I can test it since I don't think I can use the ARM runners without paying.

@autarch autarch closed this as completed Jan 21, 2025
@lilith
Copy link
Author

lilith commented Jan 21, 2025 via email

@autarch autarch transferred this issue from houseabsolute/ubi Jan 21, 2025
@autarch autarch reopened this Jan 21, 2025
@autarch
Copy link
Member

autarch commented Jan 21, 2025

Thanks for the quick response! There's a way to just move an issue to the
right repository, less clutter#25

Indeed! I'm not sure I ever used this. Anyway, I think this is a fairly easy fix.

@autarch
Copy link
Member

autarch commented Jan 21, 2025

Also, as an aside, looking at your workflow file, you shouldn't use Swatinem/rust-cache in your workflow. The actions-rust-cross action will do this for you, and it can even use it for cross-compilation because it includes the value of the target input in the cache key.

@autarch
Copy link
Member

autarch commented Jan 21, 2025

I don't have access to an ARM runner. If you could try running your workflow with actions-rust-cross@fix-running-on-arm-host, I'd appreciate it!

@lilith
Copy link
Author

lilith commented Jan 21, 2025

Question - what about musl compilation on aarch64? Am I missing something and cross is not required or ?

@autarch
Copy link
Member

autarch commented Jan 21, 2025

If your target includes "musl" and cross isn't needed, then the action should install the musl-tools Ubuntu package. I don't know if this will work, though. But that's part of why I need someone to test this on an ARM host for me.

@lilith
Copy link
Author

lilith commented Jan 21, 2025

I've moved both of my aarch64 targets (musl and gnu) back to running on an ARM host, and using that version of the action.

Running now: https://github.com/imazen/imageflow/actions/runs/12879935043

@autarch
Copy link
Member

autarch commented Jan 21, 2025

Cool, it looks like that worked.

I would note that your workflow could be a bit simpler. You can execute this action for all of your targets. It will take care of installing rust and running cargo test or cross test as needed. It also takes care of caching. In fact, all of the targets for which you've set cross: 'true' are actually not really using cross if you look at the output. But this action may still be handy for you because of the way it handles caching, installing musl tools, etc.

So the only thing you need to do differently is install NASM or not based on the target.

@autarch
Copy link
Member

autarch commented Jan 21, 2025

This should be fixed in v1.0.1.

@autarch autarch closed this as completed Jan 21, 2025
@lilith
Copy link
Author

lilith commented Jan 21, 2025 via email

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