镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Binary builds for Apple Silicon M1 arm64-darwin-20 #309

Description

@lloeki

I will work on this once I receive M1-based hardware.

Tied to rubyjs/libv8-node#14

Activity

  1. angellozano67 commented on Jan 11, 2021

    @angellozano67

    @lloeki Any luck? 😄

  2. lloeki commented on Jan 12, 2021

    @lloeki
    ContributorAuthor

    Very much so.

    This libv8 is of course a pain because of all the usual reasons (depot-tools and custom clang) but sqreen/ruby-libv8-node 15.0 built right away, and mini_racer (slightly patched to use that instead of this libv8) passes tests with flying colours.

    There is a slight hitch with arm64 vs arm64e that I have not resolved yet and makes me uncomfortable publishing binaries right now.

    I toyed with adding the M1 machine as a self-hosted GH Actions runner over there but without a proper virtualisation solution this means the runner has access to some personal files as well as my LAN.

  3. santostiago commented on Jan 18, 2021

    @santostiago

    Hi @lloeki.
    What's the proper way to install the gem libv8 on a M1 macbook pro?
    I've been struggling to install it with no success so far.

    Thank you 😊

  4. lloeki commented on Jan 18, 2021

    @lloeki
    ContributorAuthor

    There are a couple of snags such as this one (fixed somewhere on upstream v8 and node 15.3).

    I'm doing a rebuild of libv8-node based on 15.5.1 (I know, 15.6.0 is just out), I'll publish that as a beta along with a branch on rubyjs/mini_racer to use that instead of libv8 for people to try.

  5. lloeki commented on Jan 18, 2021

    @lloeki
    ContributorAuthor

    @angellozano67 @santostiago Here goes (no strings attached, use at your own risk), see the PR desc for how to use it: rubyjs/mini_racer#186

  6. changed the title [-]Binary builds for Apple Silicon M1 aarch64-darwin-20[/-] [+]Binary builds for Apple Silicon M1 arm64-darwin-20[/+] on Jan 18, 2021
  7. tisba commented on Apr 3, 2021

    @tisba

    Is this a problem with Apple Silicon, or arm in general, @lloeki?

    In Docker for Mac on Apple Silicon, I get this (indicating on a problem around fetching source?!):

    Installing libv8 7.3.492.27.1 with native extensions
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    
        current directory: /usr/local/bundle/gems/libv8-7.3.492.27.1/ext/libv8
    /usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.7.0 -r ./siteconf20210403-9-8a84ia.rb extconf.rb
    creating Makefile
    Traceback (most recent call last):
      File "/usr/local/bundle/gems/libv8-7.3.492.27.1/vendor/depot_tools/fetch.py", line 23, in <module>
        import json
    ImportError: No module named json
    /usr/local/bundle/gems/libv8-7.3.492.27.1/ext/libv8/builder.rb:83:in `block in setup_build_deps!': unable to fetch v8 source (RuntimeError)
    	from /usr/local/bundle/gems/libv8-7.3.492.27.1/ext/libv8/builder.rb:81:in `chdir'
    	from /usr/local/bundle/gems/libv8-7.3.492.27.1/ext/libv8/builder.rb:81:in `setup_build_deps!'
    	from /usr/local/bundle/gems/libv8-7.3.492.27.1/ext/libv8/builder.rb:40:in `build_libv8!'
    	from /usr/local/bundle/gems/libv8-7.3.492.27.1/ext/libv8/location.rb:24:in `install!'
    	from extconf.rb:7:in `<main>'
    
    extconf failed, exit code 1
    
    Gem files will remain installed in /usr/local/bundle/gems/libv8-7.3.492.27.1 for inspection.
    Results logged to /usr/local/bundle/extensions/aarch64-linux/2.7.0/libv8-7.3.492.27.1/gem_make.out
    
    An error occurred while installing libv8 (7.3.492.27.1), and Bundler cannot continue.
    Make sure that `gem install libv8 -v '7.3.492.27.1' --source 'https://rubygems.org/'` succeeds before bundling.
    
  8. lloeki commented on Apr 6, 2021

    @lloeki
    ContributorAuthor

    @tisba That problem will be solved wit the move to libv8-node. You can try this PR.

  9. tisba commented on Apr 6, 2021

    @tisba

    @tisba That problem will be solved wit the move to libv8-node. You can try this PR.

    yeah, I probably posted that too quickly, it makes no sense what I wrote in this context. Sorry for the noise.

    But thank you, I'm already watching rubyjs/mini_racer#186 very closely! We have some issue which requires to pin mini_racer to an old version (see rubyjs/mini_racer#170). I haven't had the time to fully test rubyjs/mini_racer#186 if it really solves our issue with forking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions