diff --git a/binding.gyp b/binding.gyp index 4e472cc6..0c271296 100644 --- a/binding.gyp +++ b/binding.gyp @@ -193,6 +193,11 @@ '-Wno-cast-function-type' ] }], + ['target_arch == "arm"', { + 'cflags_cc': [ + '-Wno-psabi' + ] + }], ['OS == "win"', { 'msvs_settings': { 'VCCLCompilerTool': { diff --git a/install/libvips.js b/install/libvips.js index 8128f838..06c932d3 100644 --- a/install/libvips.js +++ b/install/libvips.js @@ -14,6 +14,12 @@ const agent = require('../lib/agent'); const libvips = require('../lib/libvips'); const platform = require('../lib/platform'); +const minimumGlibcVersionByArch = { + arm: '2.28', + arm64: '2.29', + x64: '2.17' +}; + const { minimumLibvipsVersion, minimumLibvipsVersionLabelled } = libvips; const distBaseUrl = process.env.npm_config_sharp_dist_base_url || process.env.SHARP_DIST_BASE_URL || `https://github.com/lovell/sharp-libvips/releases/download/v${minimumLibvipsVersionLabelled}/`; @@ -64,8 +70,7 @@ try { throw new Error(`BSD/SunOS systems require manual installation of libvips >= ${minimumLibvipsVersion}`); } if (detectLibc.family === detectLibc.GLIBC && detectLibc.version) { - const minimumGlibcVersion = arch === 'arm64' ? '2.29.0' : '2.17.0'; - if (semver.lt(`${detectLibc.version}.0`, minimumGlibcVersion)) { + if (semver.lt(`${detectLibc.version}.0`, `${minimumGlibcVersionByArch[arch]}.0`)) { throw new Error(`Use with glibc ${detectLibc.version} requires manual installation of libvips >= ${minimumLibvipsVersion}`); } } diff --git a/package.json b/package.json index 3df2555a..830f7057 100644 --- a/package.json +++ b/package.json @@ -118,15 +118,15 @@ "tunnel-agent": "^0.6.0" }, "devDependencies": { - "async": "^3.1.1", + "async": "^3.2.0", "cc": "^2.0.1", "decompress-zip": "^0.3.2", "documentation": "^12.1.4", "exif-reader": "^1.0.3", "icc": "^1.0.0", "license-checker": "^25.0.1", - "mocha": "^7.0.1", - "mock-fs": "^4.10.4", + "mocha": "^7.1.0", + "mock-fs": "^4.11.0", "nyc": "^15.0.0", "prebuild": "^10.0.0", "prebuild-ci": "^3.1.0", @@ -135,7 +135,7 @@ }, "license": "Apache-2.0", "config": { - "libvips": "8.9.1-alpha1" + "libvips": "8.9.1-alpha2" }, "engines": { "node": ">=10.16.0" diff --git a/test/fixtures/expected/blur-0.3.jpg b/test/fixtures/expected/blur-0.3.jpg index e982f561..db992900 100644 Binary files a/test/fixtures/expected/blur-0.3.jpg and b/test/fixtures/expected/blur-0.3.jpg differ diff --git a/test/unit/beforeEach.js b/test/unit/beforeEach.js index 7fc0b9f2..e2fe4fcb 100644 --- a/test/unit/beforeEach.js +++ b/test/unit/beforeEach.js @@ -5,7 +5,10 @@ const sharp = require('../../'); const usingCache = detectLibc.family !== detectLibc.MUSL; const usingSimd = !process.env.G_DEBUG; -const concurrency = detectLibc.family === detectLibc.MUSL ? 1 : undefined; +const concurrency = + detectLibc.family === detectLibc.MUSL || process.arch === 'arm' + ? 1 + : undefined; beforeEach(function () { sharp.cache(usingCache); diff --git a/test/unit/platform.js b/test/unit/platform.js index 52f0a599..06b61a20 100644 --- a/test/unit/platform.js +++ b/test/unit/platform.js @@ -43,7 +43,10 @@ describe('Platform-detection', function () { it('Defaults to ARMv6 for 32-bit', function () { process.env.npm_config_arch = 'arm'; + const armVersion = process.config.variables.arm_version; + delete process.config.variables.arm_version; assert.strictEqual('armv6', platform().split('-')[1]); + process.config.variables.arm_version = armVersion; delete process.env.npm_config_arch; });