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

Dependency specified in meta-data is not installed #1417

Open
andrewdavidmackenzie opened this issue Sep 18, 2024 · 4 comments
Open

Dependency specified in meta-data is not installed #1417

andrewdavidmackenzie opened this issue Sep 18, 2024 · 4 comments

Comments

@andrewdavidmackenzie
Copy link

I have added the armv7-unknown-linux-gnueabihf target to my cargo-dist list of targets:

# Config for 'cargo dist'
[workspace.metadata.dist]
# The preferred cargo-dist version to use in CI (Cargo.toml SemVer syntax)
cargo-dist-version = "0.22.0"
# CI backends to support
ci = "github"
# The installers to generate for each app
installers = ["shell", "homebrew", "msi"]
# A GitHub repo to push Homebrew formulas to
tap = "andrewdavidmackenzie/pigg-tap"
# Target platforms to build apps for (Rust target-triple syntax)
targets = ["aarch64-apple-darwin", "aarch64-unknown-linux-gnu", "armv7-unknown-linux-gnueabihf", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc"]
# Publish jobs to run in CI
publish-jobs = ["homebrew"]
# Which actions to run on pull requests
pr-run-mode = "plan"
# Path that installers should place binaries in
install-path = "CARGO_HOME"
# Whether to install an updater program
install-updater = false

And I specified the toolchain associated with that target as an install dependency via the meta-data:

[workspace.metadata.dist.dependencies.apt]
gcc-aarch64-linux-gnu = { version = '*', targets = ["aarch64-unknown-linux-gnu"] }
gcc-arm-linux-gnueabihf = { version = '*', targets = ["armv7-unknown-linux-gnueabihf"] }

However, in the GH Action Release run
you can see that the "Install dependencies" step is empty and the armv7 toolchain is not installed.

I have verified the target is correct, the linker name correct and the package to install is correct, and the build works in local Linux and GH Actions.

@andrewdavidmackenzie
Copy link
Author

I can no longer find the entry in the docs that explained using [workspace.metadata.dist.dependencies.apt]

Is that still an option, or is using:

[workspace.metadata.dist]
# ...
github-build-setup = "build-setup.yml"

the only supported mechanism, and hence the one I should use?

@andrewdavidmackenzie
Copy link
Author

andrewdavidmackenzie commented Sep 18, 2024

Pending response, I'm trying to install the linkers I require myself via that customization method.

Getting this error:

Run sudo apt install gcc-aarch64-linux-gnu
The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.
Please visit http://www.java.com/ for information on installing Java.

It looks like that is because it is running that on all platforms (macos included), so I will have to check runner.os in that yml snippet?

@andrewdavidmackenzie
Copy link
Author

I'm getting closer to having release artifact builds working.

Now aarch64 linux build (for RPi) works, but armv7 (32bit for Pi 3) fails with a linkage report error.

That error sounds familiar from other issues I have seen here, so I will close this and move on to finding the fix for that error, maybe in an existing issue...

I assume the declarative way of defining dependencies in Cargo.toml has been deprecated and the "procedural" way of customizing the builds via an additional yml snippet is the way to go and works.

@simonsan
Copy link

@andrewdavidmackenzie Can you please reopen this, I don't think this is resolved, and I don't think it should be solved with github build setup steps. It should just install via [dist.dependencies.apt] as described in the documentation, IMHO.

@andrewdavidmackenzie andrewdavidmackenzie changed the title Dpendency specified in meta-data is not installed Dependency specified in meta-data is not installed Nov 30, 2024
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

2 participants