In case anyone else is trying to install the PIL on x86_64 and gets the same problems:

I am running fedora c2, first I had to edit the Makefile in libImaging to inculde -fPIC compiler flag then, during python setup.py build:

root@quaoar:/usr/local/Imaging-1.1.4$ python setup.py build
running build
running build_py
running build_ext
building '_imaging' extension
gcc -pthread -shared build/temp.linux-x86_64-2.3/_imaging.o build/temp.linux-x86_64-2.3/decode.o build/temp.linux-x86_64-2.3/encode.o build/temp.linux-x86_64-2.3/map.o build/temp.linux-x86_64-2.3/display.o build/temp.linux-x86_64-2.3/outline.o build/temp.linux-x86_64-2.3/path.o -LlibImaging -lImaging -ljpeg -lz -o build/lib.linux-x86_64-2.3/_imaging.so
building '_imagingtk' extension
creating build/temp.linux-x86_64-2.3/Tk
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging -I/usr/local/include/python2.3 -c _imagingtk.c -o build/temp.linux-x86_64-2.3/_imagingtk.o
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging -I/usr/local/include/python2.3 -c Tk/tkImaging.c -o build/temp.linux-x86_64-2.3/Tk/tkImaging.o
Tk/tkImaging.c: In function `TkImaging_Init':
Tk/tkImaging.c:198: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type
gcc -pthread -shared build/temp.linux-x86_64-2.3/_imagingtk.o build/temp.linux-x86_64-2.3/Tk/tkImaging.o -LlibImaging -lImaging -ltk8.4 -ltcl8.4 -o build/lib.linux-x86_64-2.3/_imagingtk.so
building '_imagingft' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -IlibImaging -I/usr/include/freetype2 -I/usr/local/include/python2.3 -c _imagingft.c -o build/temp.linux-x86_64-2.3/_imagingft.o
In file included from _imagingft.c:18:
/usr/include/freetype2/freetype/freetype.h:20:2: #error "`ft2build.h' hasn't been included yet!"
/usr/include/freetype2/freetype/freetype.h:21:2: #error "Please always use macros to include FreeType header files."
/usr/include/freetype2/freetype/freetype.h:22:2: #error "Example:"
/usr/include/freetype2/freetype/freetype.h:23:2: #error " #include <ft2build.h>"
/usr/include/freetype2/freetype/freetype.h:24:2: #error " #include FT_FREETYPE_H"
error: command 'gcc' failed with exit status 1

fixed by adding:

#include <ft2build.h>"
#include FT_FREETYPE_H

into _imagingft.c before other include directives

Search Discussions

  • Jim Tittsler at Jan 8, 2005 at 2:30 am

    On Fri, Jan 07, 2005 at 02:59:43PM -0500, Burlen wrote:
    In case anyone else is trying to install the PIL on x86_64 and
    gets the same problems:

    #include <ft2build.h>"
    #include FT_FREETYPE_H
    I think you are the second person to report that this week. It
    is in the errata for 1.1.4:

    If I were you, I'd just skip straight to the beta versions of
    1.1.5. It has a new setup.py that streamlines the build

    Jim Tittsler http://www.OnJapan.net/ GPG: 0x01159DB6
    Python Starship http://Starship.Python.net/
    Ringo MUG Tokyo http://www.ringo.net/rss.html

Related Discussions

Discussion Navigation
viewthread | post

2 users in discussion

Jim Tittsler: 1 post Burlen: 1 post



site design / logo © 2015 Grokbase