build broken with zlib 1.2.6

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
jue
Posts: 2
Joined: 2012-01-31T04:48:53-07:00
Authentication code: 8675308

build broken with zlib 1.2.6

Post by jue »

Build of imagemagick is broken with latest version of zlib, 1.2.6. Guess it's because of this change in zlib.h:

Code: Select all

-typedef voidp gzFile;       /* opaque gzip file descriptor */
+typedef struct gzFile_s *gzFile;    /* semi-opaque gzip file descriptor */
I get the following errors:

Code: Select all

  CC     magick/magick_libMagickCore_la-cache.lo
magick/blob.c: In function 'CloseBlob':
magick/blob.c:508:7: warning: passing argument 1 of 'gzerror' from incompatible pointer type
/usr/include/zlib.h:1514:30: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c:549:7: warning: passing argument 1 of 'gzclose' from incompatible pointer type
/usr/include/zlib.h:1489:24: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c: In function 'ReadBlob':
magick/blob.c:2774:11: warning: passing argument 1 of 'gzread' from incompatible pointer type
/usr/include/zlib.h:1291:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c:2779:13: error: 'FILE' has no member named 'have'
magick/blob.c:2779:13: error: 'FILE' has no member named 'have'
magick/blob.c:2779:13: error: 'FILE' has no member named 'pos'
magick/blob.c:2779:13: warning: left-hand operand of comma expression has no effect
magick/blob.c:2779:13: error: 'FILE' has no member named 'next'
magick/blob.c:2779:13: warning: left-hand operand of comma expression has no effect
magick/blob.c:2779:11: warning: passing argument 1 of 'gzgetc_' from incompatible pointer type
/usr/include/zlib.h:1654:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c:2787:13: error: 'FILE' has no member named 'have'
magick/blob.c:2787:13: error: 'FILE' has no member named 'have'
magick/blob.c:2787:13: error: 'FILE' has no member named 'pos'
magick/blob.c:2787:13: warning: left-hand operand of comma expression has no effect
magick/blob.c:2787:13: error: 'FILE' has no member named 'next'
magick/blob.c:2787:13: warning: left-hand operand of comma expression has no effect
magick/blob.c:2787:11: warning: passing argument 1 of 'gzgetc_' from incompatible pointer type
/usr/include/zlib.h:1654:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c: In function 'SeekBlob':
magick/blob.c:3530:7: warning: passing argument 1 of 'gzseek64' from incompatible pointer type
/usr/include/zlib.h:1666:30: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c: In function 'SyncBlob':
magick/blob.c:3794:7: warning: passing argument 1 of 'gzflush' from incompatible pointer type
/usr/include/zlib.h:1390:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c: In function 'TellBlob':
magick/blob.c:3868:7: warning: passing argument 1 of 'gztell64' from incompatible pointer type
/usr/include/zlib.h:1667:30: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c: In function 'WriteBlob':
magick/blob.c:4018:13: warning: passing argument 1 of 'gzwrite' from incompatible pointer type
/usr/include/zlib.h:1319:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c:4023:11: warning: passing argument 1 of 'gzputc' from incompatible pointer type
/usr/include/zlib.h:1363:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
magick/blob.c:4030:11: warning: passing argument 1 of 'gzputc' from incompatible pointer type
/usr/include/zlib.h:1363:21: note: expected 'gzFile' but argument is of type 'struct FILE *'
make[1]: *** [magick/magick_libMagickCore_la-blob.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/tmp/imagemagick/src/ImageMagick-6.7.5-0'
make: *** [all] Error 2
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: build broken with zlib 1.2.6

Post by magick »

Download ImageMagick 6.7.5-0, the current version. It compiles against Zlib 1.2.6.
jue
Posts: 2
Joined: 2012-01-31T04:48:53-07:00
Authentication code: 8675308

Re: build broken with zlib 1.2.6

Post by jue »

Sorry, but it was against 6.7.5, as you can see in my build log, but looks like you've updated the sources without
changing the version. Anyway it works now, thanks for your quick response.
Post Reply