Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 356127 - <media-gfx/pngcrush-1.7.18 bundles copy of libpng
Summary: <media-gfx/pngcrush-1.7.18 bundles copy of libpng
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: bundled-libs
  Show dependency tree
 
Reported: 2011-02-22 20:42 UTC by Hanno Böck
Modified: 2011-10-14 11:33 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pngcrush compilation failure with libpng 1.5 (media-gfx:pngcrush-1.7.10:20110222-204041.log,9.79 KB, text/plain)
2011-02-22 20:43 UTC, Hanno Böck
Details
pngcrush-1.7.17-r1.ebuild (pngcrush-1.7.17-r1.ebuild,747 bytes, text/plain)
2011-10-08 08:55 UTC, Hanno Böck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hanno Böck gentoo-dev 2011-02-22 20:42:58 UTC
Will attach log. Upstream version is at 1.7.14, but that doesn't compile either.
Comment 1 Hanno Böck gentoo-dev 2011-02-22 20:43:51 UTC
Created attachment 263561 [details]
pngcrush compilation failure with libpng 1.5
Comment 2 Matt Turner gentoo-dev 2011-08-02 19:08:40 UTC
Added 1.7.16 to the tree. Maybe it fares better?
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2011-08-02 19:24:49 UTC
>>> Compiling source in /var/tmp/portage/media-gfx/pngcrush-1.7.16/work/pngcrush-1.7.16-nolib ...
make -j9 
x86_64-pc-linux-gnu-gcc -march=core2 -mtune=generic -msse4.1 -msse4.2 -O2 -pipe -I. -Wall -DPNG_USE_PNGGCCRD -DPNG_iCCP_SUPPORTED -DPNG_iTXt_SUPPORTED -DPNG_USE_GLOBAL_ARRAYS -DGAS_VERSION="\"2.21.1\"" -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu  pngcrush.c  -lpng -lz -o pngcrush
pngcrush.c:709:2: error: #error pngcrush-nolib requires libpng-1.4 or earlier
make: *** [pngcrush] Error 1
 * ERROR: media-gfx/pngcrush-1.7.16 failed (compile phase):
Comment 4 Matt Turner gentoo-dev 2011-09-16 16:42:19 UTC
pngcrush-1.7.17 also doesn't work with libpng-1.5.
Comment 5 Carlos Silva 2011-09-18 02:23:11 UTC
This really should be fixed... :/

Same here.
Comment 6 Matt Turner gentoo-dev 2011-09-18 02:36:35 UTC
(In reply to comment #5)
> This really should be fixed... :/
> 
> Same here.

Um, patches welcome? Don't little the report with useless comments please.
Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2011-09-18 08:42:32 UTC
18 Sep 2011; Samuli Suominen <ssuominen@gentoo.org> pngcrush-1.7.17.ebuild:
Error out in pkg_setup() with media-libs/libpng >= 1.5.

It will now print a error that has reference to this bug.

And everyone reading this bug:

media-gfx/optipng has workaround for this same issue, you might want to use optipng until this bug is resolved
Comment 8 Christohper Harrington 2011-09-22 15:33:58 UTC
Is there a reason why we don't simply block on libpng-1.5?
Comment 9 Samuli Suominen (RETIRED) gentoo-dev 2011-09-22 16:35:24 UTC
(In reply to comment #8)
> Is there a reason why we don't simply block on libpng-1.5?

Nothing is allowed to downgrade libpng in the same stabilization level, be it stable or ~arch.
This would show up as 'dependency conflict' and/or users had recompile some 100 other packages against libpng15, just to see pngcrush downgrade it back to libpng14, just to rebuild all the 100 packages all over again? So no...
If needed be, pngcrush will be lastrited instead of adding such block.
Comment 10 Navid Zamani 2011-09-23 22:21:35 UTC
(In reply to comment #7)
> media-gfx/optipng has workaround for this same issue, you might want to use
> optipng until this bug is resolved

A just as simple workaround for everyone who thinks pngcrush will stay alive, is

echo -e '\n# Block libpng 1.5 until pngcrush becomes compatible again.\n=media-libs/libpng-1.5*' >> /etc/portage/package.mask/temp

(In reply to comment #9)
> This would show up as 'dependency conflict' and/or users had recompile some 100
> other packages against libpng15, just to see pngcrush downgrade it back to
> libpng14, just to rebuild all the 100 packages all over again?

Not for those who didn’t emerge @preserved-rebuild or revdep-rebuild before adding the above blockage. In fact it would save them from having to recompile those 100 packages at all. :)

But everyone has to decide this for himself. Gentoo (and open-source software in general) has no “authorities”, no matter how much certain people say otherwise.
Comment 11 Samuli Suominen (RETIRED) gentoo-dev 2011-09-24 05:33:18 UTC
(In reply to comment #10)
> (In reply to comment #7)
> > media-gfx/optipng has workaround for this same issue, you might want to use
> > optipng until this bug is resolved
> 
> A just as simple workaround for everyone who thinks pngcrush will stay alive,
> is
> 
> echo -e '\n# Block libpng 1.5 until pngcrush becomes compatible
> again.\n=media-libs/libpng-1.5*' >> /etc/portage/package.mask/temp

This would break systems as =libpng-1.4.8-r2 would be out of scope from that mask, pulling only libpng14.so.14 from SLOT="1.4" as ABI compat, therefore not installing any headers or pkg-config file at all.

So anyone: Don't do what Comment #10 says, and if you do, you are on your own.
Comment 12 Hanno Böck gentoo-dev 2011-10-08 08:55:20 UTC
Created attachment 289191 [details]
pngcrush-1.7.17-r1.ebuild

Please don't remove pngcrush, it's a valuable tool for many people.

We can do it like we did with optipng: Use the bundled-library-version, which is upstream's default. A first shot for a bundled-libpng ebuild is attached, however upstream makefile seems to lack CFLAGS, CC and LDFLAGS-support. I'll see if I find time later to work on that.

We had our own makefile in the past instead of improving upstream's one, which is probably a bad idea anyway.
Comment 13 Samuli Suominen (RETIRED) gentoo-dev 2011-10-08 10:01:18 UTC
It's not like this came as suprise, with bug dating back to 2011-02-22. 
I'm fine with switching to bundled libpng14 for now, but I'm not going to work on it either. Feel free to unmask once this is worked around, or solved. Then you just have to decide if you want 0day stabilization request for bug 384701 or leave it ~arch only.
Comment 14 Hanno Böck gentoo-dev 2011-10-08 19:12:53 UTC
committed -r1 with fix.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2011-10-08 19:13:47 UTC
no... bundling libpng14 is not a fix
Comment 16 Samuli Suominen (RETIRED) gentoo-dev 2011-10-08 19:33:41 UTC
Also, why did you make pngcrush use bundled zlib? 
The zlib was never a problem, libpng is.
Comment 17 Markos Chandras (RETIRED) gentoo-dev 2011-10-08 19:43:26 UTC
I masked the package once again. Using bundled libs is not a proper fix and your introduces a new problem by using the bundled zlib. Before unmasking contact qa@gentoo.org ( CC me on the email )
Comment 18 Hanno Böck gentoo-dev 2011-10-08 20:15:35 UTC
You're making this really complicated...

I wasn't aware that it's also bundling zlib. Committed -r2 that bundles libpng and unbundles zlib. Okay now?

(yes, I'm well aware that bundling is not a good solution - but removing an important package isn't either)
Comment 19 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-08 20:19:59 UTC
No it's not okay. libpng-1.4 could get another security issue and we'll be screwed.

Have anybody even tried to contact upstream? If they are still alive they'll fix it. Otherwise this is still to be last-rited unless somebody cares to fix it. I can't believe it's so impossible to fix it...
Comment 20 Hanno Böck gentoo-dev 2011-10-08 20:58:17 UTC
Upstream is aware of the issue and alive. He seems to give this low priority as the bundled version is the default.

As I said, I'm all aware of the issues with bundled libraries, but I think if libpng 1.4 has security issues, there will be libpng 1.4 fixes for it and we can apply them (and I volunteer to take care of that). As upstream is alive and active, he'll probably take care of them anyway.

I know bundled libraries suck, but we have them in a lot of places, because upstreams don't care. It's exactly the same solution we have for optipng.
Comment 21 Hanno Böck gentoo-dev 2011-10-09 14:13:06 UTC
Upstream's reply, no big surprise:

>For now use the full version (with the bundled libpng-1.5 and zlib), not
>the "nolib" version.  It uses libpng private functions and therefore won't
>work with a DLL or shared library.

I'll unmask pngcrush again tomorrow if nobody objects. If you object, please suggest a better solution. Removing an important app without an alternative is no solution.
Comment 22 Markos Chandras (RETIRED) gentoo-dev 2011-10-09 14:21:55 UTC
(In reply to comment #21)
> Upstream's reply, no big surprise:
> 
> >For now use the full version (with the bundled libpng-1.5 and zlib), not
> >the "nolib" version.  It uses libpng private functions and therefore won't
> >work with a DLL or shared library.
> 
> I'll unmask pngcrush again tomorrow if nobody objects. If you object, please
> suggest a better solution. Removing an important app without an alternative is
> no solution.

The package is NOT NOT NOT masked for removal but for proper fixing. I keep saying that over and over. So please don't unmask it cause we wont remove it anyway. I already state in the masking message (and in this bug a few comments above) to contact QA (and CC me) if you need to take any further action on this package
Comment 23 Samuli Suominen (RETIRED) gentoo-dev 2011-10-14 11:32:56 UTC
Thanks to upstream, this is now solved in 1.7.18.  Like, _properly solved_.