Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Support for Apple Silicon (arm64-darwin21) #319

Closed
tbolender opened this issue Nov 10, 2021 · 1 comment
Closed

Support for Apple Silicon (arm64-darwin21) #319

tbolender opened this issue Nov 10, 2021 · 1 comment

Comments

@tbolender
Copy link

I am running on the latest MacBook Pro with Apple M1 Pro. Having installed ruby via rbenv, I am now struggling to install libv8 and receive and error during install. I basically end up with the issue of #310 but with a different bundler version and the fact that ruby tells I am on arm (makes sense). Unfortunately, I am therefore not able to apply the copy and rename fix of #318 (comment) for the macOS Monterey issue since there is no base version I can copy.

I am wondering whether arm is the actual issue here since I do not receive errors as described from the ARM issue thread (here and here). Do have any idea how to mitigate the issue, e.g., falling back to x86_64 for the gem? I am happy help to maybe provide some native gem (if possible).

________ running 'vpython third_party/depot_tools/update_depot_tools_toggle.py --disable' in '/Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor'
/Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor/depot_tools/.cipd_bin/vpython: could not resolve options: failed to resolve Python script: stat
/Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor/third_party/depot_tools/update_depot_tools_toggle.py: no such file or directory
Error: Command 'vpython third_party/depot_tools/update_depot_tools_toggle.py --disable' returned non-zero exit status 1 in /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/vendor
Running: gclient root
Running: gclient config --spec 'solutions = [
  {
    "name": "v8",
    "url": "https://chromium.googlesource.com/v8/v8.git",
    "deps_file": "DEPS",
    "managed": False,
    "custom_deps": {},
  },
]
'
Running: gclient sync --with_branch_heads
Subprocess failed with return code 2.
/Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:83:in `block in setup_build_deps!': unable to fetch v8 source (RuntimeError)
	from /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in `chdir'
	from /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:81:in `setup_build_deps!'
	from /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/builder.rb:40:in `build_libv8!'
	from /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0/ext/libv8/location.rb:24:in `install!'
	from extconf.rb:7:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/libv8-8.4.255.0 for inspection.
Results logged to /Users/tim/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/extensions/arm64-darwin-21/2.7.0/libv8-8.4.255.0/gem_make.out

An error occurred while installing libv8 (8.4.255.0), and Bundler cannot continue.
Make sure that `gem install libv8 -v '8.4.255.0'` succeeds before bundling.

Ruby

ruby 2.7.4p191 (2021-07-07 revision a21a3b7d23) [arm64-darwin21]

Bundler

Bundler version 2.1.4

Gemfile.lock

GEM
...
    libv8 (8.4.255.0)
...
PLATFORMS
  ruby
  arm64-darwin-21
@tbolender
Copy link
Author

I close this thing since I noticed we were accidentally stuck to mini_racer 0.3.x for no reason. Updating solved the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant