Skip to content

Commit

Permalink
Install: add support for Linux with glibc patch version #3423
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Dec 9, 2022
1 parent 89e204d commit 0f1e7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions docs/changelog.md
Expand Up @@ -9,6 +9,9 @@ Requires libvips v8.13.3
* Expose `interFrameMaxError` and `interPaletteMaxError` GIF optimisation properties.
[#3401](https://github.com/lovell/sharp/issues/3401)

* Allow installation on Linux with glibc patch versions e.g. Fedora 38.
[#3423](https://github.com/lovell/sharp/issues/3423)

* Expand range of existing `sharpen` parameters to match libvips.
[#3427](https://github.com/lovell/sharp/issues/3427)

Expand Down
3 changes: 2 additions & 1 deletion install/libvips.js
Expand Up @@ -138,7 +138,8 @@ try {
const libcFamily = detectLibc.familySync();
const libcVersion = detectLibc.versionSync();
if (libcFamily === detectLibc.GLIBC && libcVersion && minimumGlibcVersionByArch[arch]) {
if (semverLessThan(`${libcVersion}.0`, `${minimumGlibcVersionByArch[arch]}.0`)) {
const libcVersionWithoutPatch = libcVersion.split('.').slice(0, 2).join('.');
if (semverLessThan(`${libcVersionWithoutPatch}.0`, `${minimumGlibcVersionByArch[arch]}.0`)) {
handleError(new Error(`Use with glibc ${libcVersion} requires manual installation of libvips >= ${minimumLibvipsVersion}`));
}
}
Expand Down

0 comments on commit 0f1e7ef

Please sign in to comment.