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

Rust toolchain tests failing with unpriviliged runner and unpacked compiler shards #395

Open
giordano opened this issue Dec 21, 2024 · 1 comment

Comments

@giordano
Copy link
Member

giordano commented Dec 21, 2024

With

BINARYBUILDER_RUNNER=unprivileged
BINARYBUILDER_USE_SQUASHFS=false

Rust toolchain tests are failing on CI with

  Installing cargo_build v0.1.0 (/usr/share/testsuite/rust/cargo_build)
error: failed to compile `cargo_build v0.1.0 (/usr/share/testsuite/rust/cargo_build)`, intermediate artifacts can be found at `/usr/share/testsuite/rust/cargo_build/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

Caused by:
  failed to create directory `/usr/share/testsuite/rust/cargo_build/target`

Caused by:
  Cross-device link (os error 18)
make[1]: *** [Makefile:7: /tmp/testsuite/x86_64-linux-gnu/rust/cargo_build/cargo_build] Error 101

This looks like rust-lang/rustup#2949. This is also similar to #347, which had been marked as solved at some point.

@giordano
Copy link
Member Author

giordano commented Dec 21, 2024

Presumably, setting CARGO_TARGET_DIR to an actually writable directory, as suggested by the error message, could help

CARGO_TARGET_DIR — Location of where to place all generated artifacts, relative to the current working directory. See build.target-dir to set via config.

Edit: this is actually the directory where the files are generated, which we typically expect to the be a subdir of the workspace dir. Other toolchain tests are able to write to that dir, so that shouldn't be the issue per se, I think. Setting CARGO_TARGET_DIR could help for this specific issue in the tests, but in general it'd be confusing for other builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant