Skip to content

cross builds successfully but there are no target files #1364

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

Closed
fr-an-k opened this issue Nov 5, 2023 · 3 comments
Closed

cross builds successfully but there are no target files #1364

fr-an-k opened this issue Nov 5, 2023 · 3 comments
Labels
A-docker Area: docker container engine A-windows-host Area: windows (not WSL2) hosts

Comments

@fr-an-k
Copy link

fr-an-k commented Nov 5, 2023

The build succeeds but no target directory is created.

cross build --release --target aarch64-linux-android --verbose

"zero-configuration" means it creates and uses the target folder, correct?

I can see that the correct volumes are bound but no files are written even if I manually create the target directory; what's going on?

docker.exe 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 'USER=frank' --rm --user 1000:1000 -v 'C:\Users\frank\.xargo:/xargo:z' -v 'C:\Users\frank\.cargo:/cargo:z' -v /cargo/bin -v 'C:\Users\frank\repos\rust-android-examples\na-mainloop:/project:z' -v 'C:\Users\frank\.rustup\toolchains\1.67.0-x86_64-unknown-linux-gnu:/rust:z,ro' -v 'C:\Users\frank\repos\rust-android-examples\na-mainloop\target:/target:z' -w /project -i -t ghcr.io/cross-rs/aarch64-linux-android:0.2.5 sh -c 'PATH=$PATH:/rust/bin cargo build --release --target aarch64-linux-android --verbose

It's run on Windows 11 with all the latest versions (except rust 1.67 instead of 1.68 because of #1222 ).

@Emilgardis
Copy link
Member

this is most likely a docker problem

if you run

docker run --rm -v 'C:\Users\frank\repos\rust-android-examples\na-mainloop\target:/target:z' ubuntu:20.04 mkdir /target/itworks

the container should create a folder C:\Users\frank\repos\rust-android-examples\na-mainloop\target\itworks

@Emilgardis Emilgardis added A-docker Area: docker container engine A-windows-host Area: windows (not WSL2) hosts labels Nov 5, 2023
@fr-an-k
Copy link
Author

fr-an-k commented Nov 5, 2023

Thanks, and sorry, I was accidentally looking in the wrong location.

@fr-an-k fr-an-k closed this as completed Nov 5, 2023
@Emilgardis
Copy link
Member

Awesome, feel free to reach out here or on our matrix channel if you need any help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docker Area: docker container engine A-windows-host Area: windows (not WSL2) hosts
Projects
None yet
Development

No branches or pull requests

2 participants