Page 1 of 1

fx.c doesn't compile ImageMagick-6.4.8-7

Posted: 2009-01-20T15:40:38-07:00
by epo001
Make error lines

/bin/sh ./libtool --silent --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I./config -I./ltdl -I./ltdl -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/X11R6/include -I/usr/include/libxml2 -g -O2 -Wall -W -D_THREAD_SAFE -c -o magick/magick_libMagickCore_la-fx.lo `test -f 'magick/fx.c' || echo './'`magick/fx.c
magick/fx.c: In function ‘ApplyEvaluateOperator’:
magick/fx.c:1197: error: invalid operands to binary %
make[1]: *** [magick/magick_libMagickCore_la-fx.lo] Error 1

My config invocation was
/configure --with-quantum-depth=16 --disable-dependency-tracking --with-x=yes --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib/ --without-perl --enable-hdri && make

Ed

Re: fx.c doesn't compile ImageMagick-6.4.8-7

Posted: 2009-01-20T18:31:19-07:00
by magick
Darn. That patch was applied moments before our release. Will have a new release within a day or two that fixes the problem. Thanks.

Re: fx.c doesn't compile ImageMagick-6.4.8-7

Posted: 2009-01-21T19:11:25-07:00
by anthony
yes, I ran into that error myself when I added 'AddModulus' method to -evaluate.
I fixed it so it worked under Fedora, but obviously needed even more type handling.


Cristy... Your change of my original code has BROKEN the handling of a negative constant. This is an easy this to do, but does not generate the intended results.

For Example...

Code: Select all

  convert -size 10x200 gradient: -evaluate AddModulus -30% show:
is clipping the result as both '%' and/or fmod() will leave a negative result if the "value+constant" result is negative.

I'll patch and submit the change, switching from a 'truncated divisor' that % and fmod() uses to a 'floored divisor' method that will always return a positive value.
See Wikipedia, Modulo operation for more details of modulus handling with regards to sign.
ASIDE: This page has been very useful to me when dealing with cyclic values :-)

Re: fx.c doesn't compile ImageMagick-6.4.8-7

Posted: 2009-01-24T13:43:39-07:00
by MrLight
I found out, that the Problem is THE

--> hdri

Without it, it compile without problems.
I use (MacPorts on Mac 10.5.6)

Mr Light
pS: My first Post here ...