After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 664666 - libgxps fails to build with libpng15 headers
libgxps fails to build with libpng15 headers
Status: RESOLVED FIXED
Product: libgxps
Classification: Platform
Component: general
0.2.x
Other Linux
: Normal normal
: ---
Assigned To: libgxps maintainers
libgxps maintainers
Depends on:
Blocks:
 
 
Reported: 2011-11-23 18:37 UTC by Alexandre Rostovtsev
Modified: 2011-11-25 10:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (752 bytes, patch)
2011-11-23 18:38 UTC, Alexandre Rostovtsev
committed Details | Review

Description Alexandre Rostovtsev 2011-11-23 18:37:41 UTC
Starting with libpng15, png.h no longer #includes zlib.h. As a result, building libgxps-0.2.0 fails:

gxps-png-writer.c: In function ‘gxps_png_writer_image_writer_init’:
gxps-png-writer.c:142:57: error: ‘Z_BEST_COMPRESSION’ undeclared (first use in this function)
gxps-png-writer.c:142:57: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [xpstopng-gxps-png-writer.o] Error 1

Since the only name from zlib.h that libgxps needs is Z_BEST_COMPRESSION, this error can be trivially fixed by #defining Z_BEST_COMPRESSION to its canonical value, 9.

Alternatively, gxps-png-writer.c could #include zlib.h, but that would presumably require adding a configure check for zlib headers.
Comment 1 Alexandre Rostovtsev 2011-11-23 18:38:39 UTC
Created attachment 202018 [details] [review]
proposed patch
Comment 2 Carlos Garcia Campos 2011-11-25 10:14:20 UTC
Review of attachment 202018 [details] [review]:

Pushed to git master, thanks!