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

macOS El Capitan :: gatsby develop :: "Illegal instruction: 4" #9500

Closed
josebrito opened this issue Oct 28, 2018 · 5 comments
Closed

macOS El Capitan :: gatsby develop :: "Illegal instruction: 4" #9500

josebrito opened this issue Oct 28, 2018 · 5 comments
Labels
type: question or discussion Issue discussing or asking a question about Gatsby

Comments

@josebrito
Copy link

Description

Hi there, i'm trying out Gatsby in my personal macOS system. However when running gatsby develop or gatsby build I run into the following error:

success open and validate gatsby-config — 0.010 s
success load plugins — 0.491 s
⠁ Illegal instruction: 4

I was able to drill down the root cause to the gatsby-transformer-sharp which depends on the sharp lib. After a bit of investigation I found this thread which seems to be related to this issue: lovell/sharp#1402

A suggested workaround is this: lovell/sharp#1402 (comment) which I've tried with no success, because I run into a new problem which is being unable to install vips using homebrew:

$ brew install vips --build-from-source

==> Installing dependencies for vips: python@2, gobject-introspection, cmake, rust, libtiff, gdk-pixbuf, libcroco, fribidi, graphite2, harfbuzz, pango, librsvg, little-cms2, orc, webp, gmp, isl, mpfr, libmpc, gcc, fftw, jasper, libtool, graphicsmagick, nspr, nss, openjpeg and poppler
==> Installing vips dependency: python@2
==> Downloading https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz

curl: (35) Unknown SSL protocol error in connection to www.python.org:-36
Error: An exception occurred within a child process:
  DownloadError: Failed to download resource "python@2"
Download failed: https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tar.xz

In this case it seems that Python 2.7.15 is no longer supported for OSX El Capitan (no homebrew bottle for this OS): https://formulae.brew.sh/formula/python@2

I'm just posting this to find out if:

  1. Is there any alternative to get Gatsby to work with OSX El Capitan using gatsby-transformer-sharp
  2. ... or to be able to install vips using homebrew.

Appreciate any help that you can provide!

Steps to reproduce

  1. Run gatsby develop in OSX El Capitan, you'll get the aforementioned error;

  2. Commenting gatsby-transformer-sharp in gatsby-config.js and removing Image component from image.js no longer throws the error.

Environment

  System:
    OS: OS X El Capitan 10.11.6
    CPU: x64 Intel(R) Core(TM)2 Duo CPU     E8135  @ 2.66GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.6.0 - /usr/local/bin/node
    Yarn: 1.7.0 - /usr/local/bin/yarn
    npm: 6.1.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 70.0.3538.77
    Firefox: 46.0
    Safari: 11.1.1
  npmPackages:
    gatsby: ^2.0.19 => 2.0.19 
    gatsby-image: ^2.0.15 => 2.0.15 
    gatsby-plugin-manifest: ^2.0.5 => 2.0.5 
    gatsby-plugin-offline: ^2.0.5 => 2.0.5 
    gatsby-plugin-react-helmet: ^3.0.0 => 3.0.0 
    gatsby-plugin-sharp: ^2.0.8 => 2.0.8 
    gatsby-plugin-styled-components: ^3.0.0 => 3.0.0 
    gatsby-source-filesystem: ^2.0.4 => 2.0.4 
    gatsby-transformer-sharp: ^2.1.4 => 2.1.4 
@hexrcs
Copy link
Contributor

hexrcs commented Oct 28, 2018

That's a bummer. 😕 Have you tried using an older version of gatsby-transformer-sharp? Its sharp dependency seems to have been updated just recently.

Try npm i [email protected] for a temporary fix while waiting for sharp devs to fix the issue! 🙂

@kakadiadarpan kakadiadarpan added status: awaiting author response Additional information has been requested from the author type: question or discussion Issue discussing or asking a question about Gatsby labels Oct 29, 2018
@josebrito
Copy link
Author

@hexrcs for sure I will try that approach, the thing is I'll be away from that setup for the next 2 weeks, so I won't be able to provide feedback until then. If you could keep this issue open for that period it would be highly appreciated. It would also give someone else the chance to chime in, if that's the case.

On a side note: I am aware that this is an issue with my particular setup, so it will probably affect a very very small number of people. I would probably find a workaround if I updated from El Capitan to a most recent version, however that's not an option due to compatibility constraints of other software running in that machine.

On another note: I've tested Gatsby in an Ubuntu environment and everything worked fine (as it was expected :) ).

Thanks for the feedback!

@hexrcs hexrcs removed the status: awaiting author response Additional information has been requested from the author label Oct 29, 2018
@lovell
Copy link
Contributor

lovell commented Nov 1, 2018

@josebrito This has been fixed upstream - see lovell/sharp#1402 (comment)

@DSchau
Copy link
Contributor

DSchau commented Nov 1, 2018

Awesome. Thanks @lovell for the fix and noting it here, as well 💜

Closing this out, @josebrito feel free to re-open as needed! Thank you!

@DSchau DSchau closed this as completed Nov 1, 2018
@josebrito
Copy link
Author

@DSchau @hexrcs As promised, I'm back to provide some feedback and can confirm that the issue no longer occurs, even in El Capitan.

Thanks guys, hats off to @lovell !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question or discussion Issue discussing or asking a question about Gatsby
Projects
None yet
Development

No branches or pull requests

5 participants