[Image-SIG] Re: Compile errors
doug
doug at pop.nsacom.net
Fri May 30 23:07:17 EDT 2003
I am having the same problem as Jeff (see thread below). I saw Frederic's answer:
------------------wisdom-----------------
the Tk folks have changed the Tk_PhotoPutBlock interface in 8.4.x.
to fix this, you have to add a TK_PHOTO_COMPOSITE_OVERLAY parameter
to all three Tk_PhotoPutBlock calls in tkImaging.c.
----------------wisdom-------------------
Unfortunately I cannot for the life of me figure out where to put the
TK_PHOTO_COMPOSITE_OVERLAY parameter. Can someone please give more explicit
directions for the C-Ignorant?
Thanks!
d
----------original thread ---------------------
Jeff Hodges wrote:
> When I attempt to install PIL on my box it fails on compilation. I'm
> running gcc 3.2.2 glibc 2.3.2, tcl/tk 8.4.2 and python 2.2 (of course).
> Here are the errors.
>
> building '_imagingtk' extension
> Tk/tkImaging.c: In function `PyImagingPhoto':
> Tk/tkImaging.c:165: too few arguments to function `Tk_PhotoPutBlock'
> Tk/tkImaging.c:175: too few arguments to function `Tk_PhotoPutBlock'
> Tk/tkImaging.c:182: too few arguments to function `Tk_PhotoPutBlock'
> Tk/tkImaging.c: In function `TkImaging_Init':
> Tk/tkImaging.c:192: warning: passing arg 3 of `Tcl_CreateCommand' from
> incompatible pointer type
> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging
> -I/usr/include/python2.2 -c _imagingtk.c -o
> build/temp.linux-i686-2.2/_imagingtk.o -O3 -mcpu=athlon-tbird
> -march=athlon-tbird -funroll-loops
> gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging
> -I/usr/include/python2.2 -c Tk/tkImaging.c -o
> build/temp.linux-i686-2.2/tkImaging.o -O3 -mcpu=athlon-tbird
> -march=athlon-tbird -funroll-loops
> error: command 'gcc' failed with exit status 1
>
> What the heck did i do wrong? :) all it did was python setup.py
> install. Thanks!
the Tk folks have changed the Tk_PhotoPutBlock interface in 8.4.x.
to fix this, you have to add a TK_PHOTO_COMPOSITE_OVERLAY parameter
to all three Tk_PhotoPutBlock calls in tkImaging.c.
to make it work under older versions as well, change all
Tk_PhotoPutBlock(...);
calls to
Tk_PhotoPutBlock(...
#if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8)
, TK_PHOTO_COMPOSITE_OVERLAY
#endif
);
(untested)
alternatively (but also untested), you can add a
#define USE_COMPOSITELESS_PHOTO_PUT_BLOCK
to the top of the file (before including the Tcl and Tk libraries)
</F>
More information about the Image-SIG
mailing list