Hi, Can someone tell me how to compile the PIL so it is accessable from Zope. I have followed the instructions of building it and have test it from the command prompt.
import Image
works BUT looking at the Poll.py file it is trying to import a module PIL. I am trying to configure the Poll Product. Any advice will be much appreciated. Regards Norman
Norman Khine wrote:
Can someone tell me how to compile the PIL so it is accessable from Zope. I have followed the instructions of building it and have test it from the command prompt.
import Image
works
BUT looking at the Poll.py file it is trying to import a module PIL. I am trying to configure the Poll Product.
Copying the contents of the PIL folder from the distro to lib/python/PIL (either in the Zope root or in your Python installation's root) will work. Don't forget _imaging.so, which goes in lib/python. -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
Thanks, I got it partialy working, by-- making sure that I have a dir in the lib/python -- PIL, so now I can see the color boxes for every answer, but not the pie chart? Here is couple of errors I got when compiling PIL o-a-l% make check ./coretest
processing lena.ppm... elapsed time: 4 as far as we tested, everything seems to be ok... xv test.ppm xv:No such file or directory *** Error code 1 (ignored)
cc -shared ./_imaging.o ./decode.o ./encode.o ./map.o ./display.o ./outline.o ./path.o libImaging/libImaging.a -L/usr/home/khine/usr/local/lib -ljpeg -L/usr/home/k hine/usr/local/lib -lz -o ./_imaging.so /usr/libexec/elf/ld: cannot find -ljpeg *** Error code 1 And my config.log file shows the following error configure:876: gcc -o conftest -g -O2 conftest.c -ljpeg 1>&5 /usr/libexec/elf/ld: cannot find -ljpeg configure: failed program was: #line 865 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char jpeg_destroy_compress(); int main() { jpeg_destroy_compress() ; return 0; } I had to map prefix=/usr/home/khine as I am sub-hosting;^( Therefore I don't get the _imaging.so file. Any ideas? Thanks Norman -----Original Message----- From: Behrens Matt - Grand Rapids [mailto:Matt.Behrens@Kohler.Com] Sent: Tuesday, October 16, 2001 1:43 PM To: Norman Khine Cc: Zope Mailing List Subject: Re: [Zope] ZOPE & PIL Norman Khine wrote:
Can someone tell me how to compile the PIL so it is accessable from Zope. I have followed the instructions of building it and have test it from the command prompt.
import Image
works
BUT looking at the Poll.py file it is trying to import a module PIL. I am trying to configure the Poll Product.
Copying the contents of the PIL folder from the distro to lib/python/PIL (either in the Zope root or in your Python installation's root) will work. Don't forget _imaging.so, which goes in lib/python. -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
;; NK = "Norman Khine" <khine@o-a-l.net> said NK> Here is couple of errors I got when compiling PIL NK> o-a-l% make check NK> ./coretest NK> >>> processing lena.ppm... NK> >>> elapsed time: 4 NK> >>> as far as we tested, everything seems to be ok... NK> xv test.ppm NK> xv:No such file or directory NK> *** Error code 1 (ignored) this is not a serious problem, because xv is just only a image viewer. you don't have it in your system. i tried to make a symbolik link from xview to xv then i could see a beatiful woman :-) or replace the other image viewer program in the source code. or get xv (maybe it is share ware). NK> cc -shared ./_imaging.o ./decode.o ./encode.o ./map.o ./display.o NK> ./outline.o ./path.o NK> libImaging/libImaging.a -L/usr/home/khine/usr/local/lib -ljpeg -L/usr/home/k NK> hine/usr/local/lib -lz -o ./_imaging.so NK> /usr/libexec/elf/ld: cannot find -ljpeg NK> *** Error code 1 you don't have libjpeg library or the system don't know where it is. try this one. # find / -name 'libjpeg.*' if you find libjpeg library, check the library directory is written in /etc/ld.so.conf if you don't have the library, get this one from there. http://www.ijg.org/ -- Sumiya Sakoda <sakoda@toyoake.or.jp>
Sumiya Sakoda wrote:
;; NK = "Norman Khine" <khine@o-a-l.net> said
NK> cc -shared ./_imaging.o ./decode.o ./encode.o ./map.o ./display.o NK> ./outline.o ./path.o
NK> libImaging/libImaging.a -L/usr/home/khine/usr/local/lib -ljpeg -L/usr/home/k NK> hine/usr/local/lib -lz -o ./_imaging.so NK> /usr/libexec/elf/ld: cannot find -ljpeg NK> *** Error code 1
you don't have libjpeg library or the system don't know where it is.
Actually, PIL's configure script seems to take an argument to point to jpeg (as well as zlib), but the Makefile ignores it completely when doing the linking. Someday when I have more time, I'll try to submit a fix... or maybe someone else can bug the author? -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
Look at my ill-named ImageTag_hotpatch product, I have instructions on how I did this.
From: "Norman Khine" <khine@o-a-l.net> Date: Tue, 16 Oct 2001 11:32:16 +0100 To: "Zope Mailing List" <zope@zope.org> Subject: [Zope] ZOPE & PIL
Hi, Can someone tell me how to compile the PIL so it is accessable from Zope. I have followed the instructions of building it and have test it from the command prompt.
import Image
works
BUT looking at the Poll.py file it is trying to import a module PIL. I am trying to configure the Poll Product.
Any advice will be much appreciated.
Regards
Norman
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (4)
-
Behrens Matt - Grand Rapids -
marc lindahl -
Norman Khine -
Sumiya Sakoda