-
Notifications
You must be signed in to change notification settings - Fork 397
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
error: unexpected argument '-–' found #1638
Comments
Can you please show the output of the command when adding |
cross -v build -–target=armv7-unknown-linux-gnueabihf
+ cargo metadata --format-version 1
+ rustc --print sysroot
+ rustup toolchain list
+ rustup --verbose toolchain add stable-x86_64-unknown-linux-gnu --profile minimal
debug: read metadata version: '12'
debug: updating existing install for 'stable-x86_64-unknown-linux-gnu'
debug: toolchain directory: '/home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
debug: creating temp file: /home/me/.rustup/tmp/ka8p_1kstqre31cp_file
debug: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
debug: downloading with reqwest
debug: deleted temp file: /home/me/.rustup/tmp/ka8p_1kstqre31cp_file
debug: toolchain is already up to date
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.85.0 (4d91de4e4 2025-02-17)
info: self-update is disabled for this build of rustup
info: any updates to rustup will need to be fetched with your system package manager
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ /usr/bin/docker
+ /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=me' --rm --user 1000:1000 -v /home/me/.xargo:/xargo:z -v /home/me/.cargo:/cargo:z -v /cargo/bin -v /home/me/rusttest:/project:z -v /home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:z,ro -v /home/me/rusttest/target:/target:z -w /project -i -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo -v build '\''-–target=armv7-unknown-linux-gnueabihf'\'' --target x86_64-unknown-linux-gnu'
error: unexpected argument '-–' found
Usage: cargo build [OPTIONS]
For more information, try '--help'.
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu |
What shell is this run in?
Could you try updating to cross from the main branch?
|
Oh! Could this be a bad parsing, try not using = |
Looks like the same issue w/o the = on latest release for cross cross -v build -–target armv7-unknown-linux-gnueabihf
+ cargo metadata --format-version 1
+ rustc --print sysroot
+ rustup toolchain list
+ rustup --verbose toolchain add stable-x86_64-unknown-linux-gnu --profile minimal
debug: read metadata version: '12'
debug: updating existing install for 'stable-x86_64-unknown-linux-gnu'
debug: toolchain directory: '/home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
debug: creating temp file: /home/me/.rustup/tmp/ydaf4ep3xtcob231_file
debug: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
debug: downloading with reqwest
debug: deleted temp file: /home/me/.rustup/tmp/ydaf4ep3xtcob231_file
debug: toolchain is already up to date
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.85.0 (4d91de4e4 2025-02-17)
info: self-update is disabled for this build of rustup
info: any updates to rustup will need to be fetched with your system package manager
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ /usr/bin/docker
+ /usr/bin/docker run --userns host -e 'PKG_CONFIG_ALLOW_CROSS=1' -e 'XARGO_HOME=/xargo' -e 'CARGO_HOME=/cargo' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=me' --rm --user 1000:1000 -v /home/me/.xargo:/xargo:z -v /home/me/.cargo:/cargo:z -v /cargo/bin -v /home/me/rusttest:/project:z -v /home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/rust:z,ro -v /home/me/rusttest/target:/target:z -w /project -i -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo -v build '\''-–target'\'' armv7-unknown-linux-gnueabihf --target x86_64-unknown-linux-gnu'
error: unexpected argument '-–' found
Usage: cargo build [OPTIONS]
For more information, try '--help'.
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu |
Similar error if I uninstall cross and re-install from git directly cross -v build -–target armv7-unknown-linux-gnueabihf
+ cargo metadata --format-version 1
+ rustc --print sysroot
+ /usr/bin/docker
+ /usr/bin/docker version -f '{{ .Server.Os }},,,{{ .Server.Arch }}'
+ /usr/bin/docker info -f {{.SecurityOptions}}
+ rustup toolchain list
+ rustup
+ rustup toolchain add stable-x86_64-unknown-linux-gnu --profile minimal --force-non-host
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.85.0 (4d91de4e4 2025-02-17)
info: self-update is disabled for this build of rustup
info: any updates to rustup will need to be fetched with your system package manager
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ /usr/bin/docker run --userns host -e 'XARGO_HOME=/home/me/.xargo' -e 'CARGO_HOME=/home/me/.cargo' -e 'CROSS_RUST_SYSROOT=/home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu' -e 'CARGO_TARGET_DIR=/target' -e 'CROSS_RUNNER=' -e TERM -e 'USER=me' -e 'CROSS_RUSTC_MAJOR_VERSION=1' -e 'CROSS_RUSTC_MINOR_VERSION=85' -e 'CROSS_RUSTC_PATCH_VERSION=0' --name cross-stable-x86_64-unknown-linux-gnu-4972f-4d91de4e4-x86_64-unknown-linux-gnu-36cde-1741399380547 --rm --user 1000:1000 -v /home/me/.xargo:/home/me/.xargo:z -v /home/me/.cargo:/home/me/.cargo:z -v /home/me/.cargo/bin -v /home/me/rusttest:/home/me/rusttest:z -v /home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:/home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu:z,ro -v /home/me/rusttest/target:/target:z -w /home/me/rusttest -t ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main sh -c 'PATH="$PATH":"/home/me/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin" cargo -v build '\''-–target'\'' armv7-unknown-linux-gnueabihf --target x86_64-unknown-linux-gnu'
Unable to find image 'ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main' locally
main: Pulling from cross-rs/x86_64-unknown-linux-gnu
d9802f032d67: Pull complete
3ad1bb56a8c1: Pull complete
dda1b2fa5cc7: Pull complete
8bfc7833b6e4: Pull complete
a90c89307da4: Pull complete
c9df36cc84c8: Pull complete
cb3a9cefdabf: Pull complete
e06840818cde: Pull complete
39a83f986dcc: Pull complete
fbed48866a79: Pull complete
f976503a76fc: Pull complete
0eac5be2a86a: Pull complete
5c77d4244886: Pull complete
5541c0ca7fc8: Pull complete
cb80a4fef305: Pull complete
b4f2b8f6bece: Pull complete
Digest: sha256:e3f405433eb4f7f47d08702fd1e8b90fb02da223c1e80d0290fc92535e4ac89f
Status: Downloaded newer image for ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
error: unexpected argument '-–' found
Usage: cargo build [OPTIONS]
For more information, try '--help'.
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu |
|
does it work in bash? |
Unfortunately, similar error when running under bash
|
hah, must have been some bad copy paste. that worked on zsh, thank you so much. |
Checklist
Describe your issue
I am not able to build anything with cross after installing it via
cargo install cross
What target(s) are you cross-compiling for?
armv7-unknown-linux-gnueabihf
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
Additional information / notes
No response
The text was updated successfully, but these errors were encountered: