Git Product home page Git Product logo

Comments (4)

Emilgardis avatar Emilgardis commented on June 15, 2024

can you try a cargo clean and then retry?

from cross.

ZHider avatar ZHider commented on June 15, 2024

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.

ZHider avatar ZHider commented on June 15, 2024
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.

Emilgardis avatar Emilgardis commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.