ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> image-sig
image-sig
[Image-SIG] Compiling PIL on the MacBook Pro
by Mauro Cherubini other posts by this author
Apr 20 2006 7:08AM messages near this date
1 | Re: [Image-SIG] Compiling PIL on the MacBook Pro
Dear All,

sorry for posting this, maybe, silly request but my knowledge of gcc  
(et al) is close to zero.
I am trying to compile PIL (Python Imaging Library) on my new machine.
I tried at first to use the standard way to call the build process  
with no luck. Then, looking around I found the latest post of this  
list where it was possible to specify the compiler to use. So I did  
but again with no luck.
Please see below for the transcripts.

I have a clean install of OS X 10.4.6 which runs by default Python  
2.3.5, and I am trying to install PIL 1.1.5.
Any advice will be greatly appreciated.
Thanks a lot in advance


Mauro


-----------------------------
tsf-wpa-1-217:~/Desktop/python/Imaging-1.1.5 mauro$ python setup.py  
build      running build
running build_py
running build_ext
--- using frameworks at /System/Library/Frameworks
building '_imaging' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused- 
madd -fno-common -dynamic -DNDEBUG -g -O3 -Wall -Wstrict-prototypes - 
DHAVE_LIBJPEG -DHAVE_LIBZ -IlibImaging -I/System/Library/Frameworks/ 
Tk.framework/Headers -I/usr/local/include -I/usr/include -I/System/ 
Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 -c  
libImaging/Unpack.c -o build/temp.darwin-8.6.1-i386-2.3/libImaging/ 
Unpack.o
In file included from libImaging/Imaging.h:14,
                  from libImaging/Unpack.c:33:
libImaging/ImPlatform.h:10:20: error: Python.h: No such file or  
directory
libImaging/ImPlatform.h:14:2: error: #error Sorry, this library  
requires support for ANSI prototypes.
libImaging/ImPlatform.h:17:2: error: #error Sorry, this library  
requires ANSI header files.
libImaging/ImPlatform.h:55:2: error: #error Cannot find required 32- 
bit integer type
In file included from libImaging/Unpack.c:33:
libImaging/Imaging.h:90: error: parse error before 'INT32'
libImaging/Imaging.h:90: warning: no semicolon at end of struct or union
libImaging/Imaging.h:102: error: parse error before '}' token
libImaging/Imaging.h:263: error: parse error before 'INT32'
libImaging/Imaging.h:263: warning: no semicolon at end of struct or  
union
libImaging/Imaging.h:263: warning: type defaults to 'int' in  
declaration of 'pixel'
libImaging/Imaging.h:263: warning: data definition has no type or  
storage class
libImaging/Imaging.h:263: warning: type defaults to 'int' in  
declaration of 'ImagingColorItem'
libImaging/Imaging.h:263: warning: data definition has no type or  
storage class
libImaging/Imaging.h:264: error: parse error before '*' token
libImaging/Imaging.h:265: warning: type defaults to 'int' in  
declaration of 'ImagingGetColors'
libImaging/Imaging.h:265: warning: data definition has no type or  
storage class
libImaging/Imaging.h:391: error: parse error before 'ImagingCRC32'
libImaging/Imaging.h:391: error: parse error before 'crc'
libImaging/Imaging.h:391: warning: type defaults to 'int' in  
declaration of 'ImagingCRC32'
libImaging/Imaging.h:391: warning: function declaration isn't a  
prototype
libImaging/Imaging.h:391: warning: data definition has no type or  
storage class
libImaging/Unpack.c: In function 'copy1':
libImaging/Unpack.c:667: warning: implicit declaration of function  
'memcpy'
libImaging/Unpack.c:667: warning: incompatible implicit declaration  
of built-in function 'memcpy'
libImaging/Unpack.c: In function 'copy2':
libImaging/Unpack.c:674: warning: incompatible implicit declaration  
of built-in function 'memcpy'
libImaging/Unpack.c: In function 'copy4':
libImaging/Unpack.c:681: warning: incompatible implicit declaration  
of built-in function 'memcpy'
libImaging/Unpack.c: In function 'unpackI8':
libImaging/Unpack.c:709: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:709: error: (Each undeclared identifier is  
reported only once
libImaging/Unpack.c:709: error: for each function it appears in.)
libImaging/Unpack.c:709: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:709: error: parse error before ')' token
libImaging/Unpack.c: In function 'unpackI8S':
libImaging/Unpack.c:710: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:710: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:710: error: parse error before ')' token
libImaging/Unpack.c: In function 'unpackI16':
libImaging/Unpack.c:711: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:711: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:711: error: parse error before ')' token
libImaging/Unpack.c:711: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI16S':
libImaging/Unpack.c:712: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:712: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:712: error: parse error before ')' token
libImaging/Unpack.c:712: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI16B':
libImaging/Unpack.c:713: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:713: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:713: error: parse error before ')' token
libImaging/Unpack.c:713: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI16BS':
libImaging/Unpack.c:714: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:714: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:714: error: parse error before ')' token
libImaging/Unpack.c:714: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI16N':
libImaging/Unpack.c:715: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:715: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:715: error: parse error before ')' token
libImaging/Unpack.c:715: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI16NS':
libImaging/Unpack.c:716: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:716: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:716: error: parse error before ')' token
libImaging/Unpack.c:716: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI32':
libImaging/Unpack.c:717: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:717: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:717: error: parse error before ')' token
libImaging/Unpack.c:717: error: nested functions are not supported on  
MacOSX
libImaging/Unpack.c:717: error: syntax error before 'tmp_'
libImaging/Unpack.c:717: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:717: error: parse error before 'INT32'
libImaging/Unpack.c:717: warning: value computed is not used
libImaging/Unpack.c:717: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI32S':
libImaging/Unpack.c:718: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:718: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:718: error: parse error before ')' token
libImaging/Unpack.c:718: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:718: warning: value computed is not used
libImaging/Unpack.c:718: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI32B':
libImaging/Unpack.c:719: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:719: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:719: error: parse error before ')' token
libImaging/Unpack.c:719: error: nested functions are not supported on  
MacOSX
libImaging/Unpack.c:719: error: syntax error before 'tmp_'
libImaging/Unpack.c:719: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:719: error: parse error before 'INT32'
libImaging/Unpack.c:719: warning: value computed is not used
libImaging/Unpack.c:719: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI32BS':
libImaging/Unpack.c:720: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:720: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:720: error: parse error before ')' token
libImaging/Unpack.c:720: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:720: warning: value computed is not used
libImaging/Unpack.c:720: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI32N':
libImaging/Unpack.c:721: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:721: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:721: error: parse error before ')' token
libImaging/Unpack.c:721: error: nested functions are not supported on  
MacOSX
libImaging/Unpack.c:721: error: syntax error before 'tmp_'
libImaging/Unpack.c:721: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:721: error: parse error before 'INT32'
libImaging/Unpack.c:721: warning: value computed is not used
libImaging/Unpack.c:721: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackI32NS':
libImaging/Unpack.c:722: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:722: error: 'out' undeclared (first use in this  
function)
libImaging/Unpack.c:722: error: parse error before ')' token
libImaging/Unpack.c:722: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:722: warning: value computed is not used
libImaging/Unpack.c:722: error: parse error before 'tmp_'
libImaging/Unpack.c: In function 'unpackF32':
libImaging/Unpack.c:732: error: nested functions are not supported on  
MacOSX
libImaging/Unpack.c:732: error: syntax error before 'tmp_'
libImaging/Unpack.c:732: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:732: error: parse error before 'INT32'
libImaging/Unpack.c:732: warning: value computed is not used
libImaging/Unpack.c: In function 'unpackF32S':
libImaging/Unpack.c:733: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:733: error: parse error before 'tmp_'
libImaging/Unpack.c:733: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:733: warning: value computed is not used
libImaging/Unpack.c: In function 'unpackF32B':
libImaging/Unpack.c:734: error: nested functions are not supported on  
MacOSX
libImaging/Unpack.c:734: error: syntax error before 'tmp_'
libImaging/Unpack.c:734: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:734: error: parse error before 'INT32'
libImaging/Unpack.c:734: warning: value computed is not used
libImaging/Unpack.c: In function 'unpackF32BS':
libImaging/Unpack.c:735: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:735: error: parse error before 'tmp_'
libImaging/Unpack.c:735: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:735: warning: value computed is not used
libImaging/Unpack.c: In function 'unpackF32N':
libImaging/Unpack.c:736: error: nested functions are not supported on  
MacOSX
libImaging/Unpack.c:736: error: syntax error before 'tmp_'
libImaging/Unpack.c:736: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:736: error: parse error before 'INT32'
libImaging/Unpack.c:736: warning: value computed is not used
libImaging/Unpack.c: In function 'unpackF32NS':
libImaging/Unpack.c:737: error: 'INT32' undeclared (first use in this  
function)
libImaging/Unpack.c:737: error: parse error before 'tmp_'
libImaging/Unpack.c:737: error: 'tmp_' undeclared (first use in this  
function)
libImaging/Unpack.c:737: warning: value computed is not used
libImaging/Unpack.c: At top level:
libImaging/Unpack.c:1006: error: 'NULL' undeclared here (not in a  
function)
libImaging/Unpack.c: In function 'ImagingFindUnpacker':
libImaging/Unpack.c:1017: warning: implicit declaration of function  
'strcmp'
libImaging/Unpack.c:1026: warning: return from incompatible pointer type
error: command 'gcc' failed with exit status 1
tsf-wpa-1-217:~/Desktop/python/Imaging-1.1.5 mauro$
--------------------------

tsf-wpa-1-217:~/Desktop/python/Imaging-1.1.5 mauro$ python setup.py  
build --compiler=gcc
running build
running build_py
running build_ext
error: don't know how to compile C/C++ code on platform 'posix' with  
'gcc' compiler


_______________
Mauro Cherubini  |  Research Associate
Centre de Recherche et d'Appui pour la Formation et ses Technologies  
(CRAFT) / Center for Research and Support of Training and its  
Technologies

Ecole Polytechnique Fédérale de Lausanne (EPFL) / Swiss Federal  
Institute of Technology Lausanne
Address: CE 1.631 (Bâtiment CE), Station 1, EPFL, CH - 1015 Lausanne,  
Switzerland
Téléphone:  +41 (0)21/693.27.05 -- Fax:  +41 (0)21/693.60.70 --  
Mobile:  +41 (0)78/ 913.50.11
web: http://craft.epfl.ch -- blog: http://www.i-cherubini.it/mauro/blog/


_______________________________________________
Image-SIG maillist  -  Image-SIG@[...].org
http://mail.python.org/mailman/listinfo/image-sig
Thread:
Mauro Cherubini
Fredrik Lundh

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved