I'm trying to build PIL from sources on Windows, and I'm stuck. I hope someone will have a nugget of info that will get me going again.

The README in the PIL tarball says to download three prerequisites from GnuWin32: zlib, jpeg, and freetype, so I downloaded the -bin and -lib for each of those.

I added the GnuWin32 directories to the setup.py, and run it to build the extension. The PIL setup.py tries to sniff out the libraries it needs, and disables features that need missing libraries. It decides that zlib is present, but that jpeg and freetype are not.

Debugging through the setup.py code, it's finding libz.a in the GnuWin32 lib directory. There is no libjpeg.a or libfreetype.a, so it claims they are not available. In fact, it looks for any of these names for jpeg: libjpeg.dylib, jpeg.dll, libjpeg.a, liblibjpeg.dylib, libjpeg.dll, or liblibjpeg.a. None of these are present.

In the bin directory, I have freetype6.dll and jpeg62.dll, but it won't know to look for those numeric suffixes. Just copying files around and renaming them seems like the wrong way to go.

Searching for information, I find many cryptic pages discussing a2dll, o2dll, dlltool, and so on. I don't understand them. Each time I try a new set of instructions, it points me to another piece of software I don't think I have, and don't know how to get. I feel like a total n00b. Can someone help?

tagged: , » 3 reactions

Comments

[gravatar]
Bill Mill 3:36 PM on 3 Feb 2008

here's a good page with general info on building on windows (with 2.5; I wrote about how to do it in 2.4).

I remember having issues like this, but not what they were; it was a while ago.

[gravatar]
Dirk Rothe 4:12 PM on 3 Feb 2008

Have done this some months ago, since I needed tiff g4 support. I have followed these steps: http://www.wiredfool.com/2005/10/29/how-to-build-the-python-imaging-library-for-windows/

maybe that helps.

[gravatar]
Larry 11:18 PM on 4 Feb 2008

Ned, after much frustration, here is how I got my Windows DLLs.
http://buggywhip.blogspot.com/2007/07/making-simple-dlls-simply.html

YMMV but best of luck, Larry

Add a comment:

name
email
Ignore this:
not displayed and no spam.
Leave this empty:
www
not searched.
 
Name and either email or www are required.
Don't put anything here:
Leave this empty:
URLs auto-link and some tags are allowed: <a><b><i><p><br><pre>.