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 to compile on aarch64 with rust 1.82.0 : root Cargo.toml is missing field version #25

Open
drauschenbach opened this issue Oct 19, 2024 · 6 comments

Comments

@drauschenbach
Copy link
Contributor

On a Mac:

cargo build
error: failed to parse manifest at `/Users/davidr/workspaces/tinywasm/Cargo.toml`

Caused by:
  missing field `version`
  in `package`

On an arm32v7 Raspberry Pi, it builds fine.

@drauschenbach drauschenbach changed the title next branch fails to compile on aarch64 with rust 1.82.0 : root Cargo.toml is missing field version Fails to compile on aarch64 with rust 1.82.0 : root Cargo.toml is missing field version Oct 19, 2024
@explodingcamera
Copy link
Owner

explodingcamera commented Oct 21, 2024

Hm, seems weird that cargo is behaving differently for both targets. This CI run on 1.82 also didn't error on macos with an m1. The version field shouldn't be required as the root package is never published (https://doc.rust-lang.org/cargo/reference/manifest.html#the-version-field, since 1.75), can you double check your rust/cargo version? Might be a cargo bug.

edit: does it maybe work with cargo build --workspace ?

@drauschenbach
Copy link
Contributor Author

$ rustc --version
rustc 1.82.0 (f6e511eec 2024-10-15)

$ cargo --version
cargo 1.82.0 (8f40fc59f 2024-08-21)

$ machine
arm64e

@drauschenbach
Copy link
Contributor Author

Nope.

$ cargo build --workspace
error: failed to parse manifest at `/Users/davidr/workspaces/tinywasm/Cargo.toml`

Caused by:
  missing field `version`
  in `package`

@drauschenbach
Copy link
Contributor Author

In my personal projects I use cargo set-version <n.n.n> which sets all the workspace member versions, and the root, in a single command.

@explodingcamera
Copy link
Owner

Hm, odd. I don't have my mac setup with me right now so I can check in a couple of days. Until then I guess just adding a "0.0.0" version to the root [package] should work, seems like a small cargo bug.

I'm using cargo-workspaces to publish/version since it can independently version specific workspace members.

@drauschenbach
Copy link
Contributor Author

No rush. Just wanted it added to the backlog, for visibility.

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