-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2011-07-13 09:00, IOhannes m zmoelnig wrote:
though given that autobuild has the same problems [1], i'll try to figure it out.
uha, that was nasty: the problem is that ImageMagick changed the API for GetMimeList from: GetMimeList(const char *,unsigned long *,ExceptionInfo *) to: GetMimeList(const char *,size_t *,ExceptionInfo *)
now, "size_t" and "unsigned long" are usually virtually identical; unfortunately modern gcc ignores this and (rightly) claims that using "size_t*" instead of "unsigned long*" is non-standard-conformant and refuses to compile.
luckily, ImageMagick has some nice macro definitions for API-versions so we can conditionally use "unsigned long*" or "size_t*" for the second parameter, depending on the value of these defines.
unfortunately, ImageMagick changed the API between versions 6.6.2-0 and 6.6.2-1, and the bugfix version ("addendum" in magick speak) is not represented in those nifty defines mentioned above. so we canNOT use the correct type based on those defines.
even more unfortunate, ubuntu/natty comes with a imagemagick of the 6.6.2 family!
given the widespread use of ubuntu and the fact that there are ten releases in 6.6.2 (ranging from 6.6.2-0 to 6.6.2-9), nine of which adhere to the new API and only one of which uses the old one, i have tightened the check to use the new API for all releases above (and including) 6.6.2;
this will fail to compile on any machine that has 6.6.2-0 installed. (i don't know whether there are any distributions shipping that version)
if you (anybody) happen(s) to have this exact version installed, a simple workaround is to pass the "-fpermissive" flag to CXXFLAGS (assuming you are using gcc), which will allow the nonconformant code to compile. then you only have to pray that "size_t" and "unsigned int" are truely identical.
if it doesn't work, upgrade your ImageMagick installation.
fgamsdr IOhannes