Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple silicon not working? #916

Closed
dborstelmann opened this issue Nov 11, 2021 · 5 comments
Closed

Apple silicon not working? #916

dborstelmann opened this issue Nov 11, 2021 · 5 comments
Labels

Comments

@dborstelmann
Copy link

dborstelmann commented Nov 11, 2021

npm install -g @apollo/rover

Installs fine. Then run rover --version

Error: spawnSync /usr/local/lib/node_modules/@apollo/rover/node_modules/binary-install/bin/rover Unknown system error -86
    at Object.spawnSync (node:internal/child_process:1083:20)
    at spawnSync (node:child_process:812:24)
    at Binary.run (/usr/local/lib/node_modules/@apollo/rover/node_modules/binary-install/index.js:84:20)
    at run (/usr/local/lib/node_modules/@apollo/rover/binary.js:92:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/@apollo/rover/run.js:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  errno: -86,
  code: 'Unknown system error -86',
  syscall: 'spawnSync /usr/local/lib/node_modules/@apollo/rover/node_modules/binary-install/bin/rover',
  path: '/usr/local/lib/node_modules/@apollo/rover/node_modules/binary-install/bin/rover',
  spawnargs: [ '--version' ]
}

New M1 Max Macbook Pro running Montery 12.0.1.

@dborstelmann dborstelmann added bug 🐞 triage issues and PRs that need to be triaged labels Nov 11, 2021
@EverlastingBugstopper
Copy link
Contributor

Hey @dborstelmann thanks for the report - very strange you're running into this error! I'm unable to reproduce this on my own M1 machine. Could you perhaps attempt to install with the curl installer instead of npm with curl -sSL https://rover.apollo.dev/nix/v0.4.0 | sh and let me know if that works fine?

@dborstelmann
Copy link
Author

curl -sSL https://rover.apollo.dev/nix/v0.4.0 | sh

downloading rover from https://github.com/apollographql/rover/releases/download/v0.4.0/rover-v0.4.0-x86_64-apple-darwin.tar.gz
sh: line 87: /var/folders/6w/q3bkl6bx2xq6xybhhvnc5llh0000gn/T/tmp.xvfRCwdD/rover: Bad CPU type in executable

New M1 Max/M1 Pro different than M1? I'm out of my depth here

@EverlastingBugstopper
Copy link
Contributor

EverlastingBugstopper commented Nov 12, 2021

Hmmmm - after doing some research it looks like Apple may be removing Rosetta 2 from some regions? https://www.macrumors.com/2021/03/02/rosetta-macos-11-3-strings/

We only build Rover for x86_64 Apple machines since (afaik) there isn't a good way to create native ARM binaries with CircleCI, and the new M1 machines come with Rosetta 2 which should allow you to run x86_64 binaries on an ARM device. This page has instructions on installing Rosetta 2 manually, but it kinda sucks you have to do this on your own.

If installation doesn't work,the easiest way for you to get unblocked here is going to be to build and install from source:

# install rustup
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# clone the repo
$ git clone [email protected]:apollographql/rover.git

# change directories to the repo
$ cd rover

# compile rover from source for your architecture and run the installation command
$ cargo run --release -- install

Sorry for the inconvenience here - we may need to do some investigation into building native ARM binaries if this affects a ton of new mac users.

EDIT: fixed some links to Rosetta 2 stuff

@dborstelmann
Copy link
Author

Thanks for the quick response. I did this workaround and I'm back up and running. Is the long term solution here to wait on CircleCI to allow you to build for ARM?

@EverlastingBugstopper
Copy link
Contributor

Yeah I think so - I've reopened #260 since we want the experience for newer machines to work smoothly, going to close this since you're unblocked and you can track the longer term solution there. For now you should be able to just git pull && cargo run --release -- install when new versions come out.

@abernix abernix removed the triage issues and PRs that need to be triaged label Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants