Comments (10)
Could you try the master branch? (cargo install --git https://github.com/japaric/cross
). I think someone already fixed this in #90 / #96 but I haven't made a release with those changes.
from cross.
It definitely helps. Build works. But test still doesn't work, I think it is related to this:
Setting up binfmt-support (2.1.6-1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Setting up qemu-user-static (1:2.5+dfsg-5ubuntu10.14) ...
mount: only root can use "--options" option (effective UID is 231072)
update-binfmts: warning: Couldn't mount the binfmt_misc filesystem on /proc/sys/fs/binfmt_misc.
Then it complains that:
Running /target/armv7-unknown-linux-musleabihf/debug/deps/aggregator-9187e04453fe8de2
error: could not execute process `/target/armv7-unknown-linux-musleabihf/debug/deps/aggregator-9187e04453fe8de2` (never executed)
I guess getting away without setting up the binfmt_misc won't be easy?
from cross.
In principle we can set up the binfmt_misc stuff outside docker then we wouldn't need that privileged docker call but I never got around to implement that. Setting binfmt_misc outside docker would still require root privilege though.
from cross.
Alternatively now that target.$T.runner
is a thing we could set that to QEMU to have Cargo call test binaries using QEMU instead of relying on binfmt_misc. Those Cargo runners are not in stable so such change would be breaking and would only be usable from nightly at least until the feature rides the train and reaches stable.
from cross.
Maybe as an option? Or detect if it is running nightly?
from cross.
@vorner PR #122, which has not yet landed, has the changes I mentioned above, if you want to try it.
from cross.
Hmm. Am I using it in a wrong way? What should I look for? The error message seems a bit unhelpful.
$ cross test --target armv7-unknown-linux-musleabihf --verbose
+ "rustup" "target" "list"
+ "cargo" "fetch" "--manifest-path" "/home/vorner/prog/cross/Cargo.toml"
+ "rustc" "--print" "sysroot"
+ "docker" "run" "--userns" "host" "--rm" "--user" "1000:407" "-e" "CARGO_HOME=/cargo" "-e" "CARGO_TARGET_DIR=/target" "-e" "USER=vorner" "-e" "XARGO_HOME=/xargo" "-v" "/home/vorner/.xargo:/xargo" "-v" "/home/vorner/.cargo:/cargo" "-v" "/home/vorner/prog/cross:/project:ro" "-v" "/home/vorner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu:/rust:ro" "-v" "/home/vorner/prog/cross/target:/target" "-w" "/project" "-it" "japaric/armv7-unknown-linux-musleabihf:latest" "sh" "-c" "PATH=$PATH:/rust/bin \"cargo\" \"test\" \"--target\" \"armv7-unknown-linux-musleabihf\" \"--verbose\""
Fresh rustc-demangle v0.1.3
Fresh cfg-if v0.1.0
Fresh libc v0.2.18
Fresh semver-parser v0.7.0
Fresh lazy_static v0.2.8
Fresh gcc v0.3.45
Fresh semver v0.1.20
Fresh winapi-build v0.1.1
Fresh winapi v0.2.8
Fresh rustc-serialize v0.3.22
Fresh semver v0.6.0
Fresh rustc_version v0.1.7
Fresh toml v0.2.1
Fresh backtrace-sys v0.1.5
Fresh dbghelp-sys v0.2.0
Fresh kernel32-sys v0.2.2
Fresh backtrace v0.3.0
Fresh error-chain v0.7.2
Fresh cross v0.1.12-dev (file:///project)
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running `/target/armv7-unknown-linux-musleabihf/debug/deps/cross-4c8a6115151a421e`
error: could not execute process `/target/armv7-unknown-linux-musleabihf/debug/deps/cross-4c8a6115151a421e` (never executed)
(this is an attempt on cross itself)
from cross.
@vorner hmm, that's probably because you are using a "-dev" version (see cross -V
). On "-dev" releases cross will use local Docker images so you would need to build a Docker image locally, with the tag "v0.1.12-dev", to make this work.
In any case the PR I linked above has been r+-ed and I'll release a new (stable) Cross version when it lands.
from cross.
Hello. Sorry for taking so long to get back to this. Yes, it works now, tested successfully few days ago.
from cross.
Closing as @vorner says it works.
from cross.
Related Issues (20)
- Allow using a Cross.toml beside another workspace member Cargo.toml HOT 1
- Docker in Docker doesn't seem to find / forward the volume mounts HOT 6
- E: libopus-dev has no installation candidate HOT 1
- Call to `podman` fails when building custom image HOT 2
- Running cross on apple silicon with orbstack fails to download the containers. HOT 2
- Cannot compile cmake projects with cross-rs freebsd target HOT 6
- Cannot compile for RISC-V with V extension
- Package libudev was not found in the pkg-config search path. HOT 7
- Segfault when compiling from M1 macbook to x86_64-unknown-linux-gnu HOT 7
- CROSS_REMOTE incompatible with CROSS_CONTAINER_IN_CONTAINER?
- GitHub release is built with too new a version of glibc HOT 3
- `CROSS_CONTAINER_OPTS` is also used for `docker exec` when using `CROSS_REMOTE`
- Fail to build for `aarch64-unknown-linux-gnu` HOT 9
- When using pre-build commands cross build hangs under Windows HOT 9
- failed to read configuration file `/cargo/config.toml`
- Doing `Getting Started` tutorial corrupted my WSL HOT 2
- Failed cross build with Docker built image: aarch64-pc-windows-msvc-cross
- cross test failed with error: test failed, to rerun pass --lib
- On arm/android a zero initialized vec is not actually filled with zeros HOT 5
- Fresh install - build fail mmap issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cross.