From 9f2f92095db8b951da9fa451e697dea2ae22119f Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Sat, 20 Feb 2021 19:40:40 +0000 Subject: [PATCH] Skip prebuilt binaries for musl >=1.2.0 #2570 --- docs/install.md | 2 +- install/libvips.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 7ad034f63..c40785acb 100644 --- a/docs/install.md +++ b/docs/install.md @@ -18,7 +18,7 @@ Ready-compiled sharp and libvips binaries are provided for use with Node.js v10+ on the most common platforms: * macOS x64 (>= 10.13) -* Linux x64 (glibc >= 2.17, musl >= 1.1.24) +* Linux x64 (glibc >= 2.17, musl >=1.1.24 <1.2.0) * Linux ARM64 (glibc >= 2.29) * Windows x64 * Windows x86 diff --git a/install/libvips.js b/install/libvips.js index 6b3385f26..8c0f4a6b4 100644 --- a/install/libvips.js +++ b/install/libvips.js @@ -82,6 +82,11 @@ try { throw new Error(`Use with glibc ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`); } } + if (detectLibc.family === detectLibc.MUSL && detectLibc.version) { + if (!semver.satisfies(detectLibc.version, '>=1.1.24 <1.2.0')) { + throw new Error(`Use with musl ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`); + } + } const supportedNodeVersion = process.env.npm_package_engines_node || require('../package.json').engines.node; if (!semver.satisfies(process.versions.node, supportedNodeVersion)) {