question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom libvips - undefined symbol: _ZNK4vips6VImage7gifsaveEPKcPNS_7VOption

See original GitHub issue

Possible bug

Is this a possible bug in a feature of sharp, unrelated to installation?

  • Running node -e "require('sharp')" completes without error.
  • Running npm install sharp completes without error.

Are you using the latest version of sharp?

  • I am using the latest version of sharp as reported by npm view sharp dist-tags.latest.

What is the output of running npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp?


  System:
    OS: Linux 4.9 Debian GNU/Linux 9 (stretch) 9 (stretch)
    CPU: (4) x64 Westmere E56xx/L56xx/X56xx (IBRS update)
    Memory: 431.97 MB / 3.86 GB
    Container: Yes
    Shell: 4.4.12 - /bin/bash
  Binaries:
    Node: 14.19.0 - /usr/bin/node
    npm: 8.5.1 - /home/main~/servokio.net/server/node_modules/.bin/npm
  npmPackages:
    sharp: ^0.30.2 => 0.30.2


What are the steps to reproduce?

Build libvips-8.12.2 with prebuilded cgif and libimagequant or quantizr (just for test) and install

## File format support
JPEG load/save with libjpeg:            yes (pkg-config)
JXL load/save with libjxl:              no (dynamic module: no)
JPEG2000 load/save with libopenjp2:     no
 (requires libopenjp2 2.4 or later)
PNG load with libspng:                  yes
 (requires libspng-0.6 or later)
PNG load/save with libpng:              yes (pkg-config libpng >= 1.2.9)
 (requires libpng-1.2.9 or later)
quantisation to 8 bit:                  yes
 (requires libimagequant)
TIFF load/save with libtiff:            yes (pkg-config libtiff-4)
image pyramid save:                     no
 (requires libgsf-1 1.14.26 or later)
HEIC/AVIF load/save with libheif:       yes (dynamic module: no)
WebP load/save with libwebp:            yes
 (requires libwebp, libwebpmux, libwebpdemux 0.6.0 or later)
PDF load with PDFium:                   no
PDF load with poppler-glib:             no (dynamic module: no)
 (requires poppler-glib 0.16.0 or later)
SVG load with librsvg-2.0:              no
 (requires librsvg-2.0 2.34.0 or later)
EXR load with OpenEXR:                  no
OpenSlide support:                      no (dynamic module: no)
 (requires openslide-3.3.0 or later)
Matlab load with matio:                 no
NIfTI load/save with niftiio:           no
FITS load/save with cfitsio:            no
GIF save with cgif:                     yes
 (requires cgif, libimagequant)
Magick package:                         none (dynamic module: no)
Magick major API version:               none
load with libMagickCore:                no
save with libMagickCore:                no

Edit package.json and set "libvips": "8.12.2" Then npm install sharp

What is the expected behaviour?

Normal work with GIF files

Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem

const image = sharp(`image.gif`);
image.toFormat('gif').toFile('output.jpg', (err, info) => {
    if(err) return console.error(err);
});

Error

node: symbol lookup error: /home/main/root/servokio.net/server/node_modules/sharp/build/Release/sharp-linux-x64.node: undefined symbol: _ZNK4vips6VImage7gifsaveEPKcPNS_7VOptionE

Please provide sample image(s) that help explain this problem

Any GIF image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ServOKiocommented, Apr 25, 2022

@ServOKio Were you able to make any progress with this?

Yes, on version ^0.30.3 everything works fine

1reaction
lovellcommented, Mar 9, 2022

Please can either of you create a Dockerfile or similar that allows someone else to reproduce.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation - High performance Node.js image processing
Custom libvips. To use a custom, globally-installed version of libvips instead of the provided binaries, make sure it is at least the version...
Read more >
Installing on macOS with homebrew - libvips
A fast image processing library with low memory needs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found