diff --git a/binding.js b/binding.js index 93eb9e37..4752000c 100644 --- a/binding.js +++ b/binding.js @@ -61,12 +61,16 @@ module.exports.download_vips = function() { if (process.arch === 'ia32') { error('Intel Architecture 32-bit systems require manual installation - please see http://sharp.dimens.io/en/stable/install/'); } - // Ensure libc >= 2.15 + // Ensure glibc >= 2.15 var lddVersion = process.env.LDD_VERSION; if (lddVersion) { - var libcVersion = lddVersion ? lddVersion.split(/\n/)[0].split(' ').slice(-1)[0].trim() : ''; - if (libcVersion && semver.lt(libcVersion + '.0', '2.13.0')) { - error('libc version ' + libcVersion + ' requires manual installation - please see http://sharp.dimens.io/en/stable/install/'); + if (/glibc/i.test(lddVersion)) { + var glibcVersion = lddVersion ? lddVersion.split(/\n/)[0].split(' ').slice(-1)[0].trim() : ''; + if (glibcVersion && semver.lt(glibcVersion + '.0', '2.13.0')) { + error('glibc version ' + glibcVersion + ' requires manual installation - please see http://sharp.dimens.io/en/stable/install/'); + } + } else { + error(lddVersion.split(/\n/)[0] + ' requires manual installation - please see http://sharp.dimens.io/en/stable/install/'); } } // Arch/platform-specific .tar.gz diff --git a/docs/changelog.md b/docs/changelog.md index 812cd033..8ec4d2d1 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -37,6 +37,10 @@ [#351](https://github.com/lovell/sharp/pull/351) [@joelmukuthu](https://github.com/joelmukuthu) +* Check for glibc before downloading pre-compiled binaries. + [#354](https://github.com/lovell/sharp/issues/354) + [@download13](https://github.com/download13) + * Small optimisation when reducing by an integral factor to favour shrink over affine. * Add support for gamma correction of images with an alpha channel. diff --git a/docs/index.md b/docs/index.md index ae4287ee..6a321ae0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,8 +4,8 @@ The typical use case for this high speed Node.js module is to convert large images of many formats to smaller, web-friendly JPEG, PNG and WebP images of varying dimensions. -Resizing an image is typically 4x faster than using -the quickest ImageMagick and GraphicsMagick settings. +Resizing an image is typically 4x faster than using the +quickest ImageMagick and GraphicsMagick settings. Colour spaces, embedded ICC profiles and alpha transparency channels are all handled correctly. Bicubic interpolation with Lanczos anti-alias filtering ensures quality is not sacrificed for speed. @@ -13,7 +13,7 @@ Bicubic interpolation with Lanczos anti-alias filtering ensures quality is not s As well as image resizing, operations such as rotation, extraction, compositing and gamma correction are available. -64-bit Windows and recent Linux systems do not require +Most Windows (x64), Linux and ARMv6+ systems do not require the installation of any external runtime dependencies. Use with OS X is as simple as running `brew install homebrew/science/vips` diff --git a/docs/install.md b/docs/install.md index d52abdab..9bf8862e 100644 --- a/docs/install.md +++ b/docs/install.md @@ -17,7 +17,7 @@ npm install sharp libvips and its dependencies are fetched and stored within `node_modules/sharp` during `npm install`. This involves an automated HTTPS download of approximately 6MB. -Most recent Linux-based operating systems running on x64 and ARMv6+ CPUs should "just work", e.g.: +Most recent Linux-based operating systems with glibc running on x64 and ARMv6+ CPUs should "just work", e.g.: * Debian 7, 8 * Ubuntu 12.04, 14.04, 14.10, 15.04, 15.10