Comments (7)
this should solve your issue. See also the wiki
# Cross.toml
[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get install --assume-yes ",
"apt-get update && apt-get install -y pkg-config libudev-dev:$CROSS_DEB_ARCH"
]
from cross.
You need to install libudev inside the container for aarch64 using pre-exec hooks.
from cross.
@Emilgardis I tried the suggested solution, but now cross build seems to hang forever on the command line.
Previously a build would print:
PS I:\myproj> cross build --release -p myapp --target=aarch64-unknown-linux-gnu
workspace: /project/Cargo.toml
Compiling libc v0.2.147
...
With the Cross.toml
file above it now hangs at:
PS I:\myproj> cross build --release -p myapp --target=aarch64-unknown-linux-gnu
without further progress and with casual CPU consumption between 5% - 10%.
from cross.
Add -v
to the command to see what its doing, i suspect its docker buildx that is stalling
from cross.
Here is the console output with -v
:
PS I:\myproj> cross build --release -p myapp --target=aarch64-unknown-linux-gnu -v
+ cargo metadata --format-version 1 --filter-platform aarch64-unknown-linux-gnu
+ rustc --print sysroot
+ rustup toolchain list
+ rustup target list --toolchain stable-x86_64-unknown-linux-gnu
+ rustup component list --toolchain stable-x86_64-unknown-linux-gnu
+ "C:\Program Files\RedHat\Podman\podman.exe"
+ "I:\\myproj" "C:\Program Files\RedHat\Podman\podman.exe" build --label 'org.cross-rs.for-cross-target=aarch64-unknown-linux-gnu' --label 'org.cross-rs.workspace_root=I:\myproj' --tag cross-custom-myproj:aarch64-unknown-linux-gnu-207c1-pre-build --build-arg 'CROSS_CMD=dpkg --add-architecture $CROSS_DEB_ARCH
apt-get update && apt-get install -y pkg-config libudev-dev:$CROSS_DEB_ARCH' --build-arg 'CROSS_DEB_ARCH=arm64' --file 'I:\myproj\target\aarch64-unknown-linux-gnu\Dockerfile.aarch64-unknown-linux-gnu-custom' 'I:\myproj'
It seems to hang at the install
command.
I tried to play around with it a little. Basically any command, even ls -l
, will make it hang. If the list of commands is empty it proceeds.
from cross.
As an additional comment the solution does work under Linux. So this seems to be a Windows specific problem.
from cross.
As this seems to be a different problem now I filed a new issue for it: #1303
Thank you for the help here!
from cross.
Related Issues (20)
- On arm/android a zero initialized vec is not actually filled with zeros HOT 5
- Fresh install - build fail mmap issue HOT 1
- error: failed to run custom build command for ring v0.16.20 HOT 1
- pkgconfig search path not defined for arm-unknown-linux-gnueabihf HOT 6
- binutils too old to be compatible with recent nightlies HOT 4
- Running `apt-get update` hangs on `armv7-unknown-linux-gnueabihf` target HOT 7
- Act: Build fails with `sh: 1: cargo: not found` HOT 7
- Undefined temporary symbol `$BB342_17` when compiling `rustc-demangle` HOT 2
- error while loading shared library `libtest`
- CACHEDIR.TAG is not written when using custom docker image HOT 1
- cross build --target-dir does not behave the same as cargo build --target-dir HOT 2
- Incorrect warning about invalid CARGO_TARGET_arch_RUSTFLAGS being unused HOT 2
- Wrong binary when compiling with cross to x86_64-unknown-linux-musl target (error: No such file or directory) HOT 2
- arm-unknown-linux-gnueabihf - wrong glibc
- Always run `publish` even if `build` is skipped in main/tag ci
- use `defconfig` for ct-ng, minimizing the config HOT 1
- rust-std is not available for mips anymore (for ~2 days) HOT 5
- rlib(sqlite3.o): in function `sqlite3AtoF.part.0': HOT 2
- `docker: invalid spec: [...] too many colons` when run cross in Docker on Windows
- ghcr.io/cross-rs/cross does not work when container runs with `--user` option
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.