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-std is not passing to cargo if falling back to host #1590

Closed
4 of 11 tasks
zonyitoo opened this issue Nov 25, 2024 · 5 comments
Closed
4 of 11 tasks

build-std is not passing to cargo if falling back to host #1590

zonyitoo opened this issue Nov 25, 2024 · 5 comments

Comments

@zonyitoo
Copy link

Checklist

Describe your issue

I was trying to build for target mips-unknown-linux-musl with cross with latest master. Build with Cross.toml setting:

[target.mips-unknown-linux-gnu]
build-std = ["std", "panic_abort", "proc_macro"]

But no -Zbuild-std=std,panic_abort,proc_macro in the final command line.

What target(s) are you cross-compiling for?

mips-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.5 (4090bec 2024-10-15)

Example

$ cross build --target "mips-unknown-linux-musl" --bin ssservice --features "full-extra" --release --verbose
+ cargo metadata --format-version 1 --filter-platform mips-unknown-linux-musl --features full-extra
[cross] warning: `cross` does not provide a Docker image for target mips-unknown-linux-musl, specify a custom image in `Cross.toml`.
[cross] note: Falling back to `cargo` on the host.
+ cargo build --target mips-unknown-linux-musl --bin ssservice --features full-extra --release --verbose
       Fresh unicode-ident v1.0.14
   Compiling cfg-if v1.0.0
... OTHER UNRELATED LOGS...

Additional information / notes

No response

@Emilgardis
Copy link
Member

I'm not sure if this is is what should happen or not. Could you explain why this is a problem?

@zonyitoo
Copy link
Author

As a user, I would expect that when I run cross, it should be consistent for all targets.

Parameters that are passing from command line arguments will apply to builds that are running in both container and host. It should be consistent for parameters in Cross.toml.

@Emilgardis
Copy link
Member

But this is an error, the error being that you've not setup cross correctly. This will eventually become a hard error without a fallback.

@zonyitoo
Copy link
Author

Em, Ok. If there will be no fallback, it is Ok. But if there is a fallback, behavior should be kept consistent.

@Emilgardis
Copy link
Member

The start of removing the fallback was done in #661, I do see thought that I've not documented the intent of fully removing the fallback. So I've created #1591 now

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