asdf-vm / asdf-vm/asdf-ruby

Installing Ruby 2.6 on macOS 12.6 Fails

Open
#301 18 comments 30 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
734
Forks
156
Avg merge
17h 6m
Merged PRs (30d)
1

Description

Alternate title: _Installing Ruby 2.6, when Xcode 14 is Installed, Fails_

(If you're having problems with Ruby 2.7 or Ruby 3, you might try [these env variables](https://github.com/asdf-vm/asdf-ruby/issues/285))

---

Updated to macOS **12.6** and Ruby 2.6.5, 2.6.6, 2.6.9, and 2.6.10 no longer install.

Someone's gonna find a better solution (**thank you in advance!**), but this works for now:

1. Remove Xcode (version 14): `sudo rm -rf /Library/Developer/CommandLineTools`
2. Go to Xcode's download page: https://developer.apple.com/download/all/?q=Xcode
3. Create an account if necessary
4. Download Xcode **13.4.1**
5. Install Xcode
6. Tell your terminal where Xcode lives now: (Mine ended up in my Downloads folder)
In a terminal tab, `sudo xcode-select --switch "$HOME/Downloads/Xcode.app"` (**but replace that path with the correct one for you**)
7. [Install Ruby with these flags](https://github.com/asdf-vm/asdf-ruby/issues/285)

---

What kinds of errors was I seeing:

```
BUILD FAILED (macOS 12.6 using ruby-build 20220630)

Inspect or clean up the working tree at /var/folders/4y/df7znl5n0nx_39q3rpr9dfmc0000gq/T/ruby-build.20220914224941.69763.pnUSK4
Results logged to /var/folders/4y/df7znl5n0nx_39q3rpr9dfmc0000gq/T/ruby-build.20220914224941.69763.log

Last 10 log lines:
transform_mjit_header: SKIPPED to transform __inline_isfinitel
transform_mjit_header: SKIPPED to transform __inline_isfinited
transform_mjit_header: SKIPPED to transform __inline_isfinitef
transform_mjit_header: SKIPPED to transform __darwin_fd_clr
transform_mjit_header: SKIPPED to transform __darwin_fd_set
transform_mjit_header: SKIPPED to transform __darwin_fd_isset
transform_mjit_header: SKIPPED to transform __darwin_check_fd_set
transform_mjit_header: SKIPPED to transform __sputc
transdb.h updated
ln -sf ../../../.ext/include/-darwin21/rb_mjit_min_header-2.6.6.h include/ruby-2.6.0/-darwin21/rb_mjit_min_header-2.6.6.h
```

```
linking shared-library libruby.2.6.dylib
Undefined symbols for architecture arm64:
"__mh_execute_header", referenced from:
_rb_dump_backtrace_with_lines in addr2line.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libruby.2.6.dylib] Error 1
make: *** Waiting for unfinished jobs....
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.