1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cargo install が通らない

Posted at

起こった問題

intel macで、spotify-tuiやevcxr_jupyterをinstallしようと思ったらエラーが出た。下のエラーはspotify-tuiのものだけど、evcxr_jupyterでもほぼ同じエラーがでた。

error: failed to run custom build command for `slab v0.4.9`

Caused by:
  process didn't exit successfully: `/var/folders/62/0sg6zx7s1k300g9mgy_z34rc0000gn/T/cargo-installVO4DD6/release/build/slab-c6cf3c38167b30da/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `proc-macro2 v1.0.85`

Caused by:
  process didn't exit successfully: `/var/folders/62/0sg6zx7s1k300g9mgy_z34rc0000gn/T/cargo-installVO4DD6/release/build/proc-macro2-cafeadadbf3212d9/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `proc-macro2 v0.4.30`

Caused by:
  process didn't exit successfully: `/var/folders/62/0sg6zx7s1k300g9mgy_z34rc0000gn/T/cargo-installVO4DD6/release/build/proc-macro2-884607e92c38728a/build-script-build` (signal: 9, SIGKILL: kill)
error: failed to run custom build command for `syn v1.0.109`

Caused by:
  process didn't exit successfully: `/var/folders/62/0sg6zx7s1k300g9mgy_z34rc0000gn/T/cargo-installVO4DD6/release/build/syn-6fc95c86ff5427c2/build-script-build` (signal: 6, SIGABRT: process abort signal)
  --- stderr
  dyld[43888]: section __got overflows indirect symbol table
error: failed to run custom build command for `libc v0.2.155`

Caused by:
  process didn't exit successfully: `/var/folders/62/0sg6zx7s1k300g9mgy_z34rc0000gn/T/cargo-installVO4DD6/release/build/libc-a009542d493b35e3/build-script-build` (signal: 6, SIGABRT: process abort signal)
  --- stderr
  dyld[43890]: section __got overflows indirect symbol table
error: failed to compile `spotify-tui v0.25.0`, intermediate artifacts can be found at `/var/folders/62/0sg6zx7s1k300g9mgy_z34rc0000gn/T/cargo-installVO4DD6`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

解決法

Homebrewのgccを入れていたからっぽい。
~/.cargo/config.tomlを作成して、以下を記入。

[target.x86_64-apple-darwin]
linker = "gcc-13"
rustflags = ["-C", "link-arg=-fuse-ld=lld"]

[build]
target = "x86_64-apple-darwin"

gccのバージョン(上記だと13)は適宜変える。
これでうまくbuildが通った。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?