Cannot build ImageMagick-6.5.3-10 on MinGW
Cannot build ImageMagick-6.5.3-10 on MinGW
Hi,
I've been able to build successfully ImageMagick-6.5.2-7 on MinGW stable release (gcc-3.4.5) + MSYS-1.0.11-rc1 on Windows XP.
Unfortunately, I cannot build IM anymore with recent versions (e.g. 6.5.3-10). Here is the result :
/bin/sh ./libtool --silent --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONF
IG_H -I. -I./config -I./ltdl -I./ltdl -I/mingw/include/freetype2 -I/mingw/incl
ude -IC:/opt/gtk+-2.16.1/include -D_LIB -D_MT -g -O2 -Wall -W -MT coders/magick
_libMagickCore_la-avi.lo -MD -MP -MF coders/.deps/magick_libMagickCore_la-avi.Tp
o -c -o coders/magick_libMagickCore_la-avi.lo `test -f 'coders/avi.c' || echo '.
/'`coders/avi.c
In file included from c:/mingw/include/jpeglib.h:26,
from coders/avi.c:78:
c:/mingw/include/jmorecfg.h:227: error: conflicting types for 'boolean'
c:/mingw/include/rpcndr.h:52: error: previous declaration of 'boolean' was here
make[1]: *** [coders/magick_libMagickCore_la-avi.lo] Error 1
make[1]: Leaving directory `/c/HOME/mingw/ImageMagick-6.5.3-10'
make: *** [all] Error 2
The options I used for building zlib-1.2.3 :
./configure --prefix=/mingw
The options I used for building the delegates (freetype-2.3.9, libpng-1.2.35, jpegsrc.v6b, tiff-3.8.2) :
./configure --prefix=/mingw --disable-shared
The options I used for ImageMagick :
./configure --prefix=/mingw --without-perl --without-magick-plus-plus --disable-shared --with-quantum-depth=8
Again, the build works fine with ImageMagick-6.5.2-7.
Thanks.
I've been able to build successfully ImageMagick-6.5.2-7 on MinGW stable release (gcc-3.4.5) + MSYS-1.0.11-rc1 on Windows XP.
Unfortunately, I cannot build IM anymore with recent versions (e.g. 6.5.3-10). Here is the result :
/bin/sh ./libtool --silent --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONF
IG_H -I. -I./config -I./ltdl -I./ltdl -I/mingw/include/freetype2 -I/mingw/incl
ude -IC:/opt/gtk+-2.16.1/include -D_LIB -D_MT -g -O2 -Wall -W -MT coders/magick
_libMagickCore_la-avi.lo -MD -MP -MF coders/.deps/magick_libMagickCore_la-avi.Tp
o -c -o coders/magick_libMagickCore_la-avi.lo `test -f 'coders/avi.c' || echo '.
/'`coders/avi.c
In file included from c:/mingw/include/jpeglib.h:26,
from coders/avi.c:78:
c:/mingw/include/jmorecfg.h:227: error: conflicting types for 'boolean'
c:/mingw/include/rpcndr.h:52: error: previous declaration of 'boolean' was here
make[1]: *** [coders/magick_libMagickCore_la-avi.lo] Error 1
make[1]: Leaving directory `/c/HOME/mingw/ImageMagick-6.5.3-10'
make: *** [all] Error 2
The options I used for building zlib-1.2.3 :
./configure --prefix=/mingw
The options I used for building the delegates (freetype-2.3.9, libpng-1.2.35, jpegsrc.v6b, tiff-3.8.2) :
./configure --prefix=/mingw --disable-shared
The options I used for ImageMagick :
./configure --prefix=/mingw --without-perl --without-magick-plus-plus --disable-shared --with-quantum-depth=8
Again, the build works fine with ImageMagick-6.5.2-7.
Thanks.
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
The problem is a conflict in header files under MinGW and has little to do with ImageMagick. You could disable JPEG support with
./configure --without-jpeg
or patch the conflicting header files. Otherwise you will need to post a bug report to the MinGW developers to get the problem fixed.
./configure --without-jpeg
or patch the conflicting header files. Otherwise you will need to post a bug report to the MinGW developers to get the problem fixed.
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
>The problem is a conflict in header files under MinGW and has little to do with ImageMagick.
>You could disable JPEG support with
>...
Disabling JPEG is a workaround but is not really usable in my case (I need JPEG).
And as I indicated in my initial post, with the same environment, the build of ImageMagick-6.5.2-7 with the JPEG support works fine.
>Otherwise you will need to post a bug report to the MinGW developers to get the problem fixed.
I'm quite confused. I've posted this bug report on the 'Developers' forum. So where should I post the bug report ?
Thanks.
>You could disable JPEG support with
>...
Disabling JPEG is a workaround but is not really usable in my case (I need JPEG).
And as I indicated in my initial post, with the same environment, the build of ImageMagick-6.5.2-7 with the JPEG support works fine.
>Otherwise you will need to post a bug report to the MinGW developers to get the problem fixed.
I'm quite confused. I've posted this bug report on the 'Developers' forum. So where should I post the bug report ?
Thanks.
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
Post it to the MinGW bugs forum. The conflict is in the MinGW headers which the ImageMagick developers have no control over.where should I post the bug report
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
The problem doesn't seem to come from MinGW headers. I've built ImageMagick-6.5.2-7 successfully.magick wrote:Post it to the MinGW bugs forum. The conflict is in the MinGW headers which the ImageMagick developers have no control over.where should I post the bug report
It seems more related with the "configure script" used by recent versions of ImageMagick.
Indeed, I've just noticed from the changelog that the automake / autoconf scripts have been rebuilt as of ImageMagick-6.5.2-9 :
2009-05-25 6.5.2-9 Cristy <quetzlzacatenango@image...>
# Do not change opacity value for the -alpha background option.
# Rebuild automake / autoconf scripts.
I've just tried to build ImageMagick-6.5.2-9 and I have the same problem as for 6.5.3-x versions.
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
- In file included from c:/mingw/include/jpeglib.h:26,
from coders/avi.c:78:
c:/mingw/include/jmorecfg.h:227: error: conflicting types for 'boolean'
c:/mingw/include/rpcndr.h:52: error: previous declaration of 'boolean' was here
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
Are you building IM from MSYS or Cygwin ?magick wrote:We build ImageMagick under MinGW for each new release and we do not get this error. Not sure why you are getting it.
Could you please provide me the options you use for configure ?
I'm using the following for zlib, freetype, libpng, jpeg and tiff :
* for building zlib-1.2.3 :
./configure --prefix=/mingw
* options for the delegates freetype-2.3.9, libpng-1.2.35, jpegsrc.v6b, tiff-3.8.2 :
./configure --prefix=/mingw --disable-shared
* options for ImageMagick :
./configure --prefix=/mingw --without-perl --without-magick-plus-plus --disable-shared --with-quantum-depth=8
Thanks.
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
We build under MnGW and Cygwin before a release. Unfortunately the build environment is at a remote location and we won't have access to it for several days. We do have a few preferred configure options but ImageMagick has built without any command line options on both these systems.
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
I know this is an old thread, but I recently tried to build ImageMagick-6.6.9-6 on MinGW and it still came up with the same error.
I noticed that in the JPEGLIB header 'jmorecfg.h' declared 'boolean' as 'int',
while the ImageMagick source file 'coders/jpeg.c' pre-declared 'boolean' as 'unsigned char'
As a workaround, I commented out the typedef statement in the 'coders/jpeg.c' file.
Compiled successfully with
Command-line binaries (convert, etc.) worked, too.
I noticed that in the JPEGLIB header 'jmorecfg.h' declared 'boolean' as 'int',
Code: Select all
/*
* On a few systems, type boolean and/or its values FALSE, TRUE may appear
* in standard header files. Or you may have conflicts with application-
* specific header files that you want to include together with these files.
* Defining HAVE_BOOLEAN before including jpeglib.h should make it work.
*/
#ifndef HAVE_BOOLEAN
typedef int boolean;
#endif
Code: Select all
#if defined(__MINGW32__)
# define XMD_H 1 /* Avoid conflicting typedef for INT32 */
typedef unsigned char boolean;
#endif
Code: Select all
#if defined(__MINGW32__)
# define XMD_H 1 /* Avoid conflicting typedef for INT32 */
//typedef unsigned char boolean; /*<-- COMMENTED OUT this line */
#endif
Code: Select all
--configure --prefix=/mingw --enable-static --disable-shared
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
Compiling on mingw then trying to generate a jpeg, I was getting "JPEG parameter struct mismatch: library thinks size is 432, caller expects 416". Getting rid of "typedef unsigned char boolean;" in jpeg.c seems to have fixed the parameter mismatch.
#if defined(__MINGW32__)
# define XMD_H 1 /* Avoid conflicting typedef for INT32 */
/* fix JPEG parameter struct mismatch on mingw */
// typedef unsigned char boolean;
// #define HAVE_BOOLEAN
#endif
Moses
#if defined(__MINGW32__)
# define XMD_H 1 /* Avoid conflicting typedef for INT32 */
/* fix JPEG parameter struct mismatch on mingw */
// typedef unsigned char boolean;
// #define HAVE_BOOLEAN
#endif
Moses
Re: Cannot build ImageMagick-6.5.3-10 on MinGW
We'll get a patch into the next point release of ImageMagick. Thanks.