Closed ryansdwilson closed 7 months ago
@ryansdwilson How did you manage to fix the issue? (I'm assuming you managed to do so given that you've closed the issue relatively quickly). I'm also getting a yjit/target/release/libyjit.a Abort trap: 6
error.
Brew reinstall rust
thanks @ryansdwilson, I've tried that but didn't seem to solve the problem. I'll keep debugging (and may open another ticket if this one cannot be re-opened)
Reopening this since it still seems to be an issue. brew install rust
results in LLVM 18 being installed, but Ruby (or Rust?) seem to prefer LLVM 17.
I was able to work around this by explicitly running brew install llvm@17
.
Upon further inspection, this looks like it might be a Homebrew bug. The rust
Homebrew formula explicitly depends on llvm@17
, but brew install rust
for me resulted in LLVM 18 being installed but not LLVM 17. According to what I can reconstruct from Homebrew output, Homebrew first installed rust
which was satisfied by LLVM 17 already being installed, but then it allowed the upgrade LLVM 17 → 18, and in the end it deleted LLVM 17 as part of its cleanup process (which should not have happened per rust
formula dependency).
I am not going to report this to the Homebrew project because I cannot reproduce it anymore, i.e. because the bug depends on a certain state of my system that I am now unable to get back to and therefore unable to explain to the Homebrew team.
Thanks @mislav, explicitly installing llvm@17
worked like a charm.
==> Installing ruby-3.3.1...
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
-> ./configure "--prefix=$HOME/.rbenv/versions/3.3.1" --with-openssl-dir=/opt/homebrew/opt/openssl@3 --enable-shared --with-libyaml-dir=/opt/homebrew/opt/libyaml --with-gmp-dir=/opt/homebrew/opt/gmp --with-ext=openssl,psych,+ --enable-yjit
-> make -j 10
-> make install
==> Installed ruby-3.3.1 to /Users/attila/.rbenv/versions/3.3.1
FYI: https://github.com/rust-lang/cargo/issues/13795 This issue caused by Homebrew's rust/cargo .
Discussed in https://github.com/rbenv/ruby-build/discussions/2371
3.3.1 fails to build on Mac OS
ruby-build.20240425093458.4257.log