Comments (4)
can you try a cargo clean and then retry?
from cross.
can you try a cargo clean and then retry?
D:\Hider\Code\hello>cargo clean
D:\Hider\Code\hello>cross build --target aarch64-unknown-linux-gnu
Compiling hello v0.1.0 (/project)
warning: error copying object file `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19.1wzo2ddvk07ysav3.rcgu.o` to incremental directory as `/target/aarch64-unknown-linux-gnu/debug/incremental/hello-wlpynlpr6m1x/s-gqd7g6s4ua-9e7pg9-working/1wzo2ddvk07ysav3.o`: Operation not permitted (os error 1)
warning: error copying object file `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19.2yawwvxy47jniai0.rcgu.o` to incremental directory as `/target/aarch64-unknown-linux-gnu/debug/incremental/hello-wlpynlpr6m1x/s-gqd7g6s4ua-9e7pg9-working/2yawwvxy47jniai0.o`: Operation not permitted (os error 1)
warning: error copying object file `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19.3qo22uka2ymqkdm9.rcgu.o` to incremental directory as `/target/aarch64-unknown-linux-gnu/debug/incremental/hello-wlpynlpr6m1x/s-gqd7g6s4ua-9e7pg9-working/3qo22uka2ymqkdm9.o`: Operation not permitted (os error 1)
warning: error copying object file `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19.45lasg6m76ggyj3p.rcgu.o` to incremental directory as `/target/aarch64-unknown-linux-gnu/debug/incremental/hello-wlpynlpr6m1x/s-gqd7g6s4ua-9e7pg9-working/45lasg6m76ggyj3p.o`: Operation not permitted (os error 1)
warning: error copying object file `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19.46rhcooeqh7ue7m9.rcgu.o` to incremental directory as `/target/aarch64-unknown-linux-gnu/debug/incremental/hello-wlpynlpr6m1x/s-gqd7g6s4ua-9e7pg9-working/46rhcooeqh7ue7m9.o`: Operation not permitted (os error 1)
warning: error copying object file `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19.544fa8djmnmenqqi.rcgu.o` to incremental directory as `/target/aarch64-unknown-linux-gnu/debug/incremental/hello-wlpynlpr6m1x/s-gqd7g6s4ua-9e7pg9-working/544fa8djmnmenqqi.o`: Operation not permitted (os error 1)
warning: `hello` (bin "hello") generated 6 warnings
error: failed to link or copy `/target/aarch64-unknown-linux-gnu/debug/deps/hello-05828c9a82637a19` to `/target/aarch64-unknown-linux-gnu/debug/hello`
Caused by:
Operation not permitted (os error 1)
Thank you for your advice but nothing changed.
It looks like it had something wrong with the permission while copying files in the mounted /target
dir. I found that to run docker run
with the parameter --privileged
might solve the problem but since it's not me but cross to deal with the container I'm not able to try the solution.
from cross.
C:\test\hello>cross clean
[cross] note: Falling back to `cargo` on the host.
C:\test\hello>cross build --target aarch64-unknown-linux-gnu
Compiling hello v0.1.0 (/project)
Finished dev [unoptimized + debuginfo] target(s) in 8.81s
Everything works now! The filesystem of D: drive is ReFS, and for C: is NTFS. It looks like docker's mount doesn't work properly on the refs filesystem.
The ReFS filesystem doesn't support file linking, cargo
will fallback to file copying instead of linking, and cargo build
still works correctly, but it seems docker doesn't.
from cross.
Interesting!
If you need to add --privileged
you can use CARGO_CONTAINER_OPTS="--privileged"
to tell cross to add it.
from cross.
Related Issues (20)
- cross builds successfully but there are no target files HOT 3
- Docker progress output hides degugging output from pre-build hooks HOT 1
- FreeBSD docker image has headers and libs in wrong place HOT 1
- Any plan to support higher Ubuntu base image? say, Ubuntu 22.04 LTS? HOT 1
- Cross isn't working due to docker run exiting without error HOT 29
- windows-gnu target can't be emulated arm64 qemu via wine HOT 12
- Compiling udev with hwdb support HOT 3
- Build linux binary from Windows HOT 1
- add docker/buildx compatible tags HOT 4
- Config via `package.metadata` does not get read when in a workspace HOT 2
- unable to cross-compile for mips-unknown-linux-musl, anything that uses openssl (e.g. http client, mqtt-client) HOT 4
- Remote docker throws "sh: 1: cargo: not found" error if cargo comes from nix distribution HOT 2
- FreeBSD: Docker image doesn't set PKG_CONFIG_PATH
- cross build --target armv7-unknown-linux-gnueabihf HOT 2
- Investigate bindgen woes - "file not found" HOT 9
- FreeBSD 12 is EoL, update to 13 HOT 1
- `cross metadata` target_dir does not match target dir used during build HOT 5
- cannot install mips-unknown-linux-musl, and 'rustup target --list | grep mips' is empty HOT 1
- Building a custom `initrd` with the `linux-image.sh` script of the docker image fails on powerpc64 HOT 2
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.