Closed GoogleCodeExporter closed 9 years ago
Z_DEFAULT_COMPRESSION is part of zlib not png, but pngio.c only #includes png
(relying on png headers to (re)declare it or include something else that does).
My png headers don't. Solution is to directly #include the zlib header in the
.c that directly uses its token. Attached patch works for me and is now part of
fink's leptonica package.
Original comment by dma...@gmail.com
on 9 Jul 2011 at 1:19
Attachments:
Thanks for the patch. This will be fixed in 1.69.
We'll also use #if HAVE_LIBPNG && HAVE_LIBZ
in the guard, because both are required for png read/write.
Original comment by dbloomb...@google.com
on 13 Jul 2011 at 4:17
Original comment by dan.bloo...@gmail.com
on 13 Jul 2011 at 4:20
Hi guys,
I'm having a problem with tesseract OCR in OpenKM and I think it is linked to
this problem in leptonica (doesn't include zlib when I build it). I'm using
ubuntu "natty" 11.04 and the above patch didn't work in the command line, so I
opened pngio.c and put the lines
+#ifdef HAVE_LIBZ
+#include "zlib.h"
+#endif
in between #include "png.h" and /* ----------------Set defaults for read/write
options ----------------- */, however the build still won't include zlib.
Any ideas?
Original comment by DigitalP...@gmail.com
on 28 Sep 2011 at 3:40
Scratch that, I'm just a linux n00b. Used sudo patch and it patched fine.
Original comment by DigitalP...@gmail.com
on 28 Sep 2011 at 4:01
Still doesn't build with zlib though...
Original comment by DigitalP...@gmail.com
on 29 Sep 2011 at 5:25
This is fixed in 1.69
Original comment by dan.bloo...@gmail.com
on 5 Jul 2012 at 8:39
Original issue reported on code.google.com by
dma...@gmail.com
on 9 Jul 2011 at 1:12