Issue 515 in webp: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do

116 views
Skip to first unread message

david… via monorail

unread,
Apr 7, 2021, 12:42:01 PM4/7/21
to webp-d...@webmproject.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 515 by david...@bachtrack.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515

What steps will reproduce the problem?
1. gif2webp 94166.gif -o 94166.webp (see attached file 94166.gif)

What is the expected output? What do you see instead?

Expect a working webp file 94166.webp. Instead, you get the following message:
GIFLib Error 0:
GIF-LIB error: Image EOF detected, before image complete.

What version of the product are you using? On what operating system?
WebP Encoder version: 1.2.0
WebP Mux version: 1.2.0

Please provide any additional information below.

The version on my Mac does not suffer from this problem. It's compiled from the same source, but my Mac has giflib version 4.2.3, as opposed to Centos 7, which has giflib 4.1.6.

If I could find an rpm with giflib version 4.2.3 for Centos 7, I am confident that the problem would be fixed. The trouble is, I can't find an rpm. If I download a source tarball for giflib 4.2.3 and try to compile it on Centos 7, that fails also because it requires developer tools at a version level not available from the standard Centos 7 repositories.

Attachments:
94166.gif 22.7 KB

--
You received this message because:
1. The project was configured to send all issue notifications to this address

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

jz… via monorail

unread,
Apr 7, 2021, 10:59:44 PM4/7/21
to webp-d...@webmproject.org

Comment #1 on issue 515 by jz...@chromium.org: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c1

Thanks for the report. The release binaries [1] are statically linked against what I have around at the time and in this case on Linux used 5.1.9 I believe. Those and a local build fail in the same way for me. I haven't tried other versions of giflib yet, but I don't know if this is an issue with gif2webp specifically.

[1] https://developers.google.com/speed/webp/download

david… via monorail

unread,
Apr 8, 2021, 4:13:09 AM4/8/21
to webp-d...@webmproject.org

Comment #2 on issue 515 by david...@bachtrack.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c2

jzern: I've just rechecked a fresh download of the Linux binary from the link above. It won't run on my Centos 7 instance, giving me the following message:

david@bac-webdb-01 ~/temp 08:11:21> ./gif2webp -version
./gif2webp: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./gif2webp)
david@bac-webdb-01 ~/temp 08:11:31> sudo yum list installed|grep glib
dbus-glib.x86_64 0.100-7.el7 @anaconda
glib2.x86_64 2.56.1-2.el7 @anaconda
glibc.x86_64 2.17-323.el7_9 @updates
glibc-common.x86_64 2.17-323.el7_9 @updates
glibc-devel.x86_64 2.17-323.el7_9 @updates
glibc-headers.x86_64 2.17-323.el7_9 @updates
david@bac-webdb-01 ~/temp 08:11:46>
./gif2webp: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by ./gif2webp)

This is why it seemed necessary to compile from source.

It's quite possible that I've done the wrong thing by including guesswork about libraries in my defect report, so apologies for that. The fact that it fails on my Centos 7 instance but passes on the Mac is definite; whether it's anything to do with the library version was my supposition - it could be something different.

jz… via monorail

unread,
Apr 9, 2021, 10:12:50 PM4/9/21
to webp-d...@webmproject.org

Comment #3 on issue 515 by jz...@google.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c3

Thanks for the update. The binaries are only mostly static at this point so they can end up with newer glibc references that may not resolve on older distros. You're right compiling from source is your best option here. Let me see if I can narrow down the issue, but it does look like a giflib problem given the output.

What did you use to install giflib on your Mac? homebrew, ports or something else?

david… via monorail

unread,
Apr 12, 2021, 3:23:28 AM4/12/21
to webp-d...@webmproject.org

Comment #4 on issue 515 by david...@bachtrack.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c4

The giflib on my Mac is installed via Macports:
iMac ~/temp> port installed|grep giflib
giflib @4.2.3_0+x11 (active)
iMac ~/temp> gif2webp -version

WebP Encoder version: 1.2.0
WebP Mux version: 1.2.0
iMac ~/temp>

Sorry for slow reply!

jz… via monorail

unread,
Apr 22, 2021, 10:21:42 PM4/22/21
to webp-d...@webmproject.org

Comment #5 on issue 515 by jz...@google.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c5

I had 4.2.3 and 5.0.4 source around on Linux and those both work, as does brew's current version of 5.2.1 on Mac. 5.1.9 built from the source archive from Debian [1] does fail, however.
Let me see what can be done for CentOS.

[1] https://packages.debian.org/bullseye/libgif7

jz… via monorail

unread,
Apr 22, 2021, 10:38:56 PM4/22/21
to webp-d...@webmproject.org

Comment #6 on issue 515 by jz...@google.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c6

I'm able to build giflib 4.2.3 using gcc 4.8.5 [1] on CentOS 7. I didn't bother much with configure or trying to install xmlto, but got the core library to build with make -k -j. Using this in the webp build does successfully decode the image from comment #1.

[1] gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)

jz… via monorail

unread,
Apr 22, 2021, 10:43:19 PM4/22/21
to webp-d...@webmproject.org

Comment #7 on issue 515 by jz...@google.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c7

For what it's worth, 5.2.1 builds without error and decodes the image successfully as well.

david… via monorail

unread,
Apr 23, 2021, 12:08:16 PM4/23/21
to webp-d...@webmproject.org

Comment #8 on issue 515 by david...@bachtrack.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c8

Sorry, I’m a newbie at this (or rather an oldie - the last time I compiled Unix stuff was 30+ years ago, when stuff was very different!)

On a Centos 7 system, I’ve compiled a giflib 4.2.3 and verified that libgif.so.7 is safely in /usr/local/lib. I’ve also compiled a current gif2webp. Trouble is, running it gives an error:
lrwxrwxrwx 1 root root 15 Apr 23 15:27 /usr/local/lib/libgif.so -> libgif.so.7.0.0
lrwxrwxrwx 1 root root 15 Apr 23 15:27 /usr/local/lib/libgif.so.7 -> libgif.so.7.0.0
-rwxr-xr-x 1 root root 120584 Apr 23 15:27 /usr/local/lib/libgif.so.7.0.0
sh-4.2# libwebp/examples/gif2webp -version
libwebp/examples/gif2webp: error while loading shared libraries: libgif.so.7: cannot open shared object file: No such file or directory
sh-4.2#

Presumably, I have failed to tell gif2webp where to find its library, but I can’t figure out how...

jz… via monorail

unread,
Apr 23, 2021, 3:40:33 PM4/23/21
to webp-d...@webmproject.org

Comment #9 on issue 515 by jz...@google.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c9

I would have expected libgif.so.4.1.7 for a 4.2.3 build. 7.0.0 sounds like something in the 5.x range, but either way the following should help.

LD_LIBRARY_PATH is one way to handle this. You can check how the libraries will be resolved with ldd. Try ldd libwebp/examples/gif2webp and LD_LIBRARY_PATH=/usr/local/lib ldd libwebp/examples/gif2webp. That's assuming gif2webp is an executable, if you built with configure and didn't specify --disable-shared the file is under examples/.libs, but this step is just for illustrative purposes. Running the binary like 'LD_LIBRARY_PATH=/usr/local/lib libwebp/examples/gif2webp --version' should work.

For something more permanent you can add the path to /etc/ld.so.conf or /etc/ld.so.conf.d/ though this may have unexpected side-effects if you have other things installed in /usr/local. man ld.so and man ldconfig have more details.

david… via monorail

unread,
Apr 23, 2021, 5:49:36 PM4/23/21
to webp-d...@webmproject.org

Comment #10 on issue 515 by david...@bachtrack.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c10

That’s worked! Thanks so much for keeping on it.

D.

jz… via monorail

unread,
Apr 26, 2021, 2:50:29 PM4/26/21
to webp-d...@webmproject.org
Updates:
Labels: v1.2.1
Status: WontFix

Comment #11 on issue 515 by jz...@google.com: gif2webp fails on some files on Centos 7, needs a giflib upgrade which is hard to do
https://bugs.chromium.org/p/webp/issues/detail?id=515#c11

I'm glad it worked for you, thanks for working through it. I'll close this as wontfix, but I'll update the giflib in the prebuilts to avoid the issue and try going with a fully static build so they're easier to use across distributions.
Reply all
Reply to author
Forward
0 new messages