rustlings icon indicating copy to clipboard operation
rustlings copied to clipboard

Compilation error when running `cargo install --force --path .` for 5.6.* version

Open gilbertguan2385 opened this issue 2 years ago • 3 comments

facing compilation error when building from source and running cargo install --force --path . for 5.6.0 version.

OS: Windows 8.1 Rust: rustc 1.72.0 (stable-x86_64-pc-windows-gnu)

the error as below:

error: failed to compile `rustlings v5.6.0 (\xxx\path\to\rustlings)`, intermediate artifacts can be found at `\xxx\path\to\rustlings\target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

gilbertguan2385 avatar Sep 05 '23 13:09 gilbertguan2385

In case someone outright asks "have you tried 5.5.1" - yes and it works first try. (I've the same problem as OP)

randych-gilad avatar Sep 07 '23 14:09 randych-gilad

checked that 5.6.1 has same compilation issue😞

gilbertguan2385 avatar Sep 23 '23 00:09 gilbertguan2385

I found that I needed to install gcc-multilib for the compilation to work with the latest version.

Found the answer on StackOverflow

Not sure if this helps anyone else but it resolved it for me.

andrewkboyd avatar Sep 25 '23 15:09 andrewkboyd

Sorry for the late reply. I hope that the answer by @andrewkboyd was helpful. If not, please test the main branch again with the latest Rust version. If you still have problems, please reopen the issue and provide the whole error message.

mo8it avatar Mar 28 '24 01:03 mo8it