-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
OS X, illegal hardware instruction with 0.21.0 #1402
Comments
Hello, are you using the pre-built binaries for both sharp and libvips? What CPU(s) does this occur on? What is the output of The pre-built binaries are created using Travis CI's OS X environment. v0.21.0 involved an upgrade from |
This could also be related to #1213 - does adding |
I've just hit this too (or possibly another issue with 0.21.0) in CI when running my test suite under
|
Thanks @mceachen, this is very useful information. The CPU described here is an Intel Westmere from circa 2010 that lacks AVX intrinsics. Travis probably updated their OS X machines recently to use Sandy Bridge or later which do. Two possible solutions:
As a workaround for now you can install vips from source via homebrew, which will compile for the relevant CPU. |
Thanks (always) for your help, sir! That was absolutely the issue. Given how user-hostile Apple has been lately with their hardware (like soldering both the RAM and the hard drive to the motherboard), you may find more and more people are running on antiques. How much performance are you leaving on the table by disabling AVX extensions? For the homebrew-uninitiated (like me), the magick incantation was
|
@lovell thanks again for you help. When sharp is compiled against brew libraries, do you know if there is a magic option/param/env I can set to tell |
@mceachen You'll probably want to adapt https://github.com/lovell/package-libvips-darwin for your purposes. |
I happen to run the same setup as @mceachen After installing vips from source via homebrew as advised here, the installation of the sharp package and build via node-gyp caused a number of warnings, the package is running smoothly, however, much faster than jimp. Leaving the issue open for now, as the approach requires special steps and is more of a workaround than a resolution. Please do, however, close as you see fit. |
Here's an OS X tarball that has (hopefully) been compiled without AVX instructions - see commit lovell/package-libvips-darwin@f37bd2c libvips-8.7.0-darwin-x64.tar.gz Are you able to test? If so, please save it to your local |
Sorry, still results in illegal hardware instruction |
@bmatzner Thanks for checking, I'll have another think about what can be done. |
Commit lovell/package-libvips-darwin@2c84f3a takes advantage of a side effect of the The result of this is libvips-8.7.0-darwin-x64.tar.gz Are you able to test again? If so, you'll need to remove |
Thanks @lovell your latest build of libvips fixed also for me the issue with illegal instructions |
Thanks for confirming, this is now the "official" tarball served for v8.7.0. Anyone else experiencing this problem on OS X with non-AVX Intel CPUs should remove the |
Confirmed working with the published tarball, thanks again, @lovell |
Hi, I know this issue has been closed but I am still seeing it: I followed the steps above, removed the libvips 8.7.4 tarball and placed the 8.7.0 version into the ~/.npm/_libvips directory as described above. Then: The install process seems to pull down the 8.7.4 version of libvips again and I get the error: info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.7.4/libvips-8.7.4-darwin-x64.tar.gz |
@tommygrealy The 8.7.4 binaries should be OK as-is. What CPU is this with? |
Thanks @lovell - I got it working via the following steps: (with the libvips-8.7.0-darwin-x64.tar.gz file already stored in ~/.npm/_libvips directory)
Now it's working :) Thanks FYI - CPU is 2.4 GHz Intel Core 2 Duo (this is an OLD mac :) ) |
@tommygrealy Thanks, I think homebrew defaults to Nehalem as the "oldest" CPU now, so you'll need a CPU with at least support for SSE4.2 intrinsics. |
In a nuxt application, using sharp as adapter with responsive-loader, on MacOS, v0.21.0 causes "illegal hardware instruction", while 0.20.8 was working fine. Not sure what other installation details might be helpful…
The text was updated successfully, but these errors were encountered: