First I want to say that I tried many different ways to cross-compile Rust code to RasPi 3B and this one seems to be the most promising so far.
I'm on OS X 10.11.3, Docker 1.10.2, Rust 1.7.0. I have successfully built the Docker image, but I ran into some permission problems as I tried to cross-compile my project.
If I run cargo build on host environment and then try to run the image, I get the following error:
$ docker run -v /Users/rav/Projects/rust/guessing_game:/home/cross/project rust-17-pi-cross build
*** Extracting target dependencies ***
*** Cross compiling project ***
could not remove build directory
To learn more, run the command again with --verbose.
If I run cargo clean first, then I get this error:
$ docker run -v /Users/rav/Projects/rust/guessing_game:/home/cross/project rust-17-pi-cross build --verbose
*** Extracting target dependencies ***
*** Cross compiling project ***
Updating registry `https://github.com/rust-lang/crates.io-index`
couldn't prepare build directories
Caused by:
Permission denied (os error 13)
I looked for ways to solve it on Docker level, but none of them helped (like adding :z to the end of the volume path). Also, I believe most of them assume the image is running SELinux, while this Dockerfile uses Debian.
Pinging @schnupperboy, as from the issue tracker I see he's the one who added Docker support, so maybe he knows something that I don't. 😉
First I want to say that I tried many different ways to cross-compile Rust code to RasPi 3B and this one seems to be the most promising so far.
I'm on OS X 10.11.3, Docker 1.10.2, Rust 1.7.0. I have successfully built the Docker image, but I ran into some permission problems as I tried to cross-compile my project.
If I run
cargo buildon host environment and then try to run the image, I get the following error:If I run
cargo cleanfirst, then I get this error:I looked for ways to solve it on Docker level, but none of them helped (like adding
:zto the end of the volume path). Also, I believe most of them assume the image is running SELinux, while this Dockerfile uses Debian.Pinging @schnupperboy, as from the issue tracker I see he's the one who added Docker support, so maybe he knows something that I don't. 😉