Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"support not compiled" : missing libjpeg, libpng, libtiff and libgif at compile time #39

Open
geonanorch opened this issue Feb 18, 2020 · 0 comments

Comments

@geonanorch
Copy link

I came accross cwebp-bin come from webpack's plugin image-webpack-loader. Once I enabled WEBP in that plugin, I started getting errors such as:

Error: PNG support not compiled. Please install the libpng development package before building.
Error: JPEG support not compiled. Please install the libjpeg development package before building.

Those errors come from the cwebp binary located in the cwebp-bin/vendor folder.

When cwebp-bin installed, the pre-build check failed and compilation took place --successfully. Looking at the install script cwebp-bin/lib/install.js, I can see that it just calls configure and make on the source distribution. As stated, this works; but it does not help a lot, since it builds a binary without support for any legacy file format (png, jpeg, tiff, gif): The WEBP documentation states:

Preparing the Platform

Linux
Install the libjpeg, libpng, libtiff and libgif packages, needed to convert between JPEG, PNG, TIFF, GIF and WebP image formats.

Package management varies by Linux distribution. On Ubuntu and Debian, the following command will install the needed packages:

sudo apt-get install libjpeg-dev libpng-dev libtiff-dev libgif-dev

Complete the installation (see below).

Mac OS X
. . . . . . . . . .

Trying to automate the compilation for all platforms sounds like a drag. How about replacing the build process with a simple fetch + extract of the appropriate binary package? Or even better include the binaries in the cwebp-bin repo to remove the direct dependency to Google?

We would then hit issues #11 on platforms where dynamic linking is used for precompiled binaries. I am not sure why that issue was closed: imho cwebp-bin should at the very least document the dependency in the README and warn during the installation that it is not met (when applicable, i.e. when NOT compiling from source AND when dynamic linking is used).

Finally, I think that issue #27 would also be addressed with the above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant