-
Notifications
You must be signed in to change notification settings - Fork 423
Open
Labels
Description
Checklist
- I've looked through the issues and pull requests for similar reportsTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Describe your issue
I have installed rust
from the official fedora repository but I still want to sometimes use cross for testing purposes. So for this I installed rustup
and made my default toolchain to be the rust version that I installed via the package manager. My ~/.rustup/toolchains
directory looks like this:
drwxr-xr-x. 1 xxx xxx 42 Jan 30 22:18 stable-x86_64-unknown-linux-gnu
lrwxrwxrwx. 1 xxx xxx 4 Jan 30 22:18 system -> /usr
When I try to run the following command (added -v
to see what cross is trying to do):
CROSS_CONTAINER_ENGINE=podman cross +stable test --target i686-unknown-linux-gnu -v
Then I get an error message that looks like this:
+ cargo +stable metadata --format-version 1 --filter-platform i686-unknown-linux-gnu
+ rustc --print sysroot
+ rustup toolchain list
+ rustup --verbose toolchain add stable --profile minimal
verbose: read metadata version: '12'
verbose: updating existing install for 'stable-x86_64-unknown-linux-gnu'
verbose: toolchain directory: '/home/xxx/.rustup/toolchains/stable-x86_64-unknown-linux-gnu'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
verbose: creating temp file: /home/xxx/.rustup/tmp/mce693vqz1yhvje6_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with reqwest
verbose: deleted temp file: /home/xxx/.rustup/tmp/mce693vqz1yhvje6_file
verbose: toolchain is already up to date
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.67.0 (fc594f156 2023-01-24)
info: checking for self-updates
+ rustup target list --toolchain stable
+ rustup component list --toolchain stable
+ /usr/bin/podman
+ /usr/bin/podman 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=xxx' --rm -v /home/xxx/.xargo:/xargo:Z -v /home/xxx/.cargo:/cargo:Z -v /cargo/bin -v /home/xxx/xxx/fallible_collections:/project:Z -v /stable:/rust:Z,ro -v /home/xxx/xxx/fallible_collections/target:/target:Z -w /project -i -t ghcr.io/cross-rs/i686-unknown-linux-gnu:0.2.4 sh -c 'PATH=$PATH:/rust/bin cargo test --target i686-unknown-linux-gnu -v'
Error: statfs /stable: no such file or directory
+ rustup component list --toolchain stable
It seems wierd to me that cross
is trying to mount a /stable
directory. Replacing the +stable
with +PATH_TO_stable-x86_64-unknown-linux-gnu
seems to fix my problem. Is this a bug or is this intended?
What target(s) are you cross-compiling for?
i686-unknown-linux-gnu
Which operating system is the host (e.g computer cross is on) running?
- macOSWindowsLinux / BSDother OS (specify in description)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
What architecture is the host?
- x86_64 / AMD64arm32arm64 (including Mac M1)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
What container engine is cross using?
- dockerpodmanother container engine (specify in description)To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
cross version
0.2.4
Example
No response
Additional information / notes
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Emilgardis commentedon Feb 2, 2023
Interesting! Do you get the same behaviour when using cross installed from this git repo? We changed how the toolchain is mounted in #947
This is the offending code:
cross/src/docker/local.rs
Line 55 in 4645d93
What is the output of
rustc +stable --print sysroot
on your system?edit: also, what's the output of
rustc --print sysroot
? the same?blinxen commentedon Feb 2, 2023
Emilgardis commentedon Feb 2, 2023
alright, so cross assumes that the sysroot of the default toolchain is in the same place as the other ones, I think that should be considered a bug.
I think the way forward is for us to fix this inconsistency (somehow), and in the meantime you should be able to do
RUSTUP_TOOLCHAIN=stable cross ...
Emilgardis commentedon Feb 2, 2023
Can you show me the calls cross does when using the version from main btw. Would be appreciated!
blinxen commentedon Feb 2, 2023
This fixes my problem :D
How can I do this?
blinxen commentedon Feb 2, 2023
Do you mean these calls?
Emilgardis commentedon Feb 2, 2023
perfect, thanks!
blinxen commentedon Feb 2, 2023
If you need any help with fixing this then just let me know.