rust-lang / rustlings

:crab: Small exercises to get you used to reading and writing Rust code!
https://rustlings.cool
MIT License
52.68k stars 10.02k forks source link

[MacOS/BigSur] unable to do `cargo install rustlings --locked` #2086

Closed jfroffice closed 7 hours ago

jfroffice commented 3 weeks ago
cargo install rustlings --locked
    Updating crates.io index
  Installing rustlings v6.2.0
    Updating crates.io index
    Updating crates.io index
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.155
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.205
   Compiling version_check v0.9.5
   Compiling rustversion v1.0.17
   Compiling ahash v0.8.11
   Compiling autocfg v1.3.0
   Compiling zerocopy v0.7.35
   Compiling quote v1.0.36
   Compiling once_cell v1.19.0
   Compiling syn v2.0.72
   Compiling log v0.4.22
   Compiling lock_api v0.4.12
   Compiling signal-hook v0.3.17
   Compiling crossbeam-utils v0.8.20
   Compiling parking_lot_core v0.9.10
   Compiling allocator-api2 v0.2.18
   Compiling bitflags v2.6.0
   Compiling heck v0.5.0
error: failed to run custom build command for `parking_lot_core v0.9.10`

Caused by:
  process didn't exit successfully: `/var/folders/6w/l27sqc311h138v2zqc5nwl4m0000gn/T/cargo-installHgxjka/release/build/parking_lot_core-6d7db9fd9e1fbecc/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rustlings v6.2.0`, intermediate artifacts can be found at `/var/folders/6w/l27sqc311h138v2zqc5nwl4m0000gn/T/cargo-installHgxjka`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
mo8it commented 3 weeks ago

Did you try running it without --locked first?

mo8it commented 3 weeks ago

Can you compile normal Rust projects? Please test these commands:

cargo new hello
cd hello
cargo run

You should see a "Hello, world!" printed.

jfroffice commented 3 weeks ago

both works above @mo8it

mo8it commented 3 weeks ago

I just opened an issue in the parking_lot repo.

What CPU architecture do you have?

Can you please post the output of cargo --version and rustc --version?

bjorn3 commented 3 weeks ago

Do you have binutils installed from brew? If so try uninstalling it. It contains a broken strip which generated corrupt binaries for Apple Silicon.

jfroffice commented 3 weeks ago

I just opened an issue in the parking_lot repo.

What CPU architecture do you have?

Can you please post the output of cargo --version and rustc --version?

$ rustc --version
rustc 1.80.1 (3f5fd8dd4 2024-08-06
$ cargo --version
cargo 1.80.1 (376290515 2024-07-16)
mo8it commented 3 weeks ago

@jfroffice Did you try what bjorn3 suggested? Can you please post the output of the command which strip?

mo8it commented 2 weeks ago

Closing because of missing response. I hope that it worked for you then @jfroffice :)

jfroffice commented 2 weeks ago

@jfroffice Did you try what bjorn3 suggested? Can you please post the output of the command which strip?

$ which strip
/usr/local/bin/strip
jfroffice commented 2 weeks ago

@mo8it

Sorry for the delayed answer but I was trying to update my system without success.

it looks like my system is stuck on update

==> Fetching binutils
==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/7dcf45cad4fdd88a1156e626c213a26d914e8794/Formula/b/binutils.rb
################################################################################################################################################### 100.0%
==> Downloading https://ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.bz2
Already downloaded: /Users/jfroffice/Library/Caches/Homebrew/downloads/ac89f4527fe5321764cf15b217b24374c62ccaa7413bd2117f02aff99cc08d3b--binutils-2.43.1.tar.bz2
==> Upgrading binutils
  2.36.1 -> 2.43.1
Error: Xcode alone is not sufficient on Big Sur.
Install the Command Line Tools:
  xcode-select --install

and the command xcode-select --install is stuck

image

I will look forward after an update if I can make it working properly.