Skip to content

Couldn't copy error during build #293

Open
@DrDinosaur

Description

I am following this guide: https://github.com/johnthagen/min-sized-rust#optimize-libstd-with-xargo

I ran the following commands:

$ rustup toolchain install nightly
$ rustup override set nightly
$ rustup component add rust-src
$ cargo install xargo

When I run this command, I get an error.

xargo build --target x86_64-pc-windows-gnu --release
error: couldn't copy /home/drdinosaur/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o to /home/drdinosaur/.xargo/lib/rustlib/x86_64-pc-windows-gnu/lib/rsbegin.o
caused by: No such file or directory (os error 2)
note: run with `RUST_BACKTRACE=1` for a backtrace

I am attempting to compile to Windows from Linux. I'm not sure what the issue is from that. I'm still, new to Rust, I'm just trying to reduce my binary size through this method. Thanks.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions