[pypy-dev] Compiling for pypy

Jan Riechers janpeterr at freenet.de
Fri Jul 20 11:35:28 CEST 2012


On 20.07.2012 11:36, Maciej Fijalkowski wrote:> On Fri, Jul 20, 2012 at 
10:11 AM, Jan Riechers <janpeterr at freenet.de
 > <mailto:janpeterr at freenet.de>> wrote:
 >
 >     I caused some trouble by having also greenlet and eventlet
 >     installed, seems that those did not like to come along and 
causing the:
 >     "Fatal Python error: PyThreadState_Get: no current thread" error
 >
 >     Actually I also use pil besides eventlet and greenlet, but this time
 >     I can't get pil compiled correctly and raises me a compiler error
 >     during start of the c module compilation. But this is another topic
 >     I guess plus I haven't searched for any answer yet.
 >
 >     But if you have any information in matter of the above modules - PIL
 >     is assumed to work with Pypy it states in the wiki, please let me 
know!
 >
 >
 >     Thank you in advance,
 >     Jan
 >
 >
 > Indeed, PIL should work, what's the error? Are you using recent PyPy?
 >
 > Cheers,
 > fijal

Hi,

yes, I assume I use the most recent version 1.9, but official windows 
build, not a own compilation. I saw there was already a similiar issue 
posted here (for reference, my error below):
http://www.mail-archive.com/pypy-dev@python.org/msg02117.html

I receive a quite long error message from command prompt, I shorted
the "copy" statements of the build as they run fine so:

---- SNIP -----------------------

D:\pypy-1.9\bin>pypy pip-2.7-script.py install pil

Downloading/unpacking pil
   Downloading PIL-1.1.7.tar.gz (506Kb): 506Kb downloaded
   Running setup.py egg_info for package pil
     WARNING: '' not a valid package name; please use only.-separated 
package names in setup.py

Installing collected packages: pil
   Running setup.py install for pil
     WARNING: '' not a valid package name; please use only.-separated 
package names in setup.py
     building '_imaging' extension
     D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 
/GS- /DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tc_imaging.c 
/Fobuild\temp.win32-2.7\Release\_imaging.obj
     _imaging.c
     _imaging.c(1230) : warning C4133: 'function' : incompatible types - 
from 'PyStringObject *' to 'PyObject *'
     _imaging.c(1384) : warning C4996: 'strcpy': This function or 
variable may be unsafe. Consider using strcpy_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See o
nline help for details.
     _imaging.c(1412) : warning C4996: 'strcpy': This function or 
variable may be unsafe. Consider using strcpy_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See o
nline help for details.
     _imaging.c(1550) : warning C4996: 'strcpy': This function or 
variable may be unsafe. Consider using strcpy_s instead. To disable 
deprecation, use _CRT_SECURE_NO_WARNINGS. See o
nline help for details.
     D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 
/GS- /DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tcdecode.c 
/Fobuild\temp.win32-2.7\Release\decode.obj
     decode.c
     D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 
/GS- /DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tcencode.c 
/Fobuild\temp.win32-2.7\Release\encode.obj
     encode.c
     encode.c(161) : warning C4996: 'write': The POSIX name for this 
item is deprecated. Instead, use the ISO C++ conformant name: _write. 
See online help for details.
             D:\Microsoft Visual Studio 9.0\VC\INCLUDE\io.h(322) : see 
declaration of 'write'
     D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 
/GS- /DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tcmap.c 
/Fobuild\temp.win32-2.7\Release\map.obj
     map.c
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(76) 
: warning C4114: same type qualifier used more than once
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(76) 
: error C2632: 'char' followed by 'char' is illegal
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(76) 
: error C2059: syntax error : ','
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(77) 
: error C2632: 'short' followed by 'short' is illegal
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(77) 
: error C2059: syntax error : ','
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(80) 
: warning C4114: same type qualifier used more than once
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(80) 
: error C2632: 'char' followed by 'char' is illegal
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(80) 
: error C2059: syntax error : ','
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(81) 
: warning C4114: same type qualifier used more than once
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(81) 
: error C2632: 'short' followed by 'short' is illegal
     C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(81) 
: error C2059: syntax error : ','
     error: command 'D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' 
failed with exit status 2
     Complete output from command D:\pypy-1.9\pypy.exe -c "import 
setuptools;__file__='D:\\pypy-1.9\\bin\\build\\pil\\setup.py';exec(compile(open(__file__).read().replace('\r\n', 
'\
n'), __file__, 'exec'))" install --single-version-externally-managed 
--record e:\_tmp\pip-zvf7ry-record\install-record.txt:
     WARNING: '' not a valid package name; please use only.-separated 
package names in setup.py

running install
running build
running build_py
creating build
creating build\lib.win32-2.7

a lot of copying like :
copying PIL\ArgImagePlugin.py -> build\lib.win32-2.7
.. (removed) ..
copying PIL\__init__.py -> build\lib.win32-2.7

running build_ext
building '_imaging' extension
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
creating build\temp.win32-2.7\Release\libImaging

D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- 
/DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tc_imaging.c 
/Fobuild\temp.win32-2.7\Release\_imaging.obj

_imaging.c

_imaging.c(1230) : warning C4133: 'function' : incompatible types - from 
'PyStringObject *' to 'PyObject *'

_imaging.c(1384) : warning C4996: 'strcpy': This function or variable 
may be unsafe. Consider using strcpy_s instead. To disable deprecation, 
use _CRT_SECURE_NO_WARNINGS. See onlin
e help for details.

_imaging.c(1412) : warning C4996: 'strcpy': This function or variable 
may be unsafe. Consider using strcpy_s instead. To disable deprecation, 
use _CRT_SECURE_NO_WARNINGS. See onlin
e help for details.

_imaging.c(1550) : warning C4996: 'strcpy': This function or variable 
may be unsafe. Consider using strcpy_s instead. To disable deprecation, 
use _CRT_SECURE_NO_WARNINGS. See onlin
e help for details.

D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- 
/DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tcdecode.c 
/Fobuild\temp.win32-2.7\Release\decode.obj

decode.c

D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- 
/DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tcencode.c 
/Fobuild\temp.win32-2.7\Release\encode.obj

encode.c

encode.c(161) : warning C4996: 'write': The POSIX name for this item is 
deprecated. Instead, use the ISO C++ conformant name: _write. See online 
help for details.

         D:\Microsoft Visual Studio 9.0\VC\INCLUDE\io.h(322) : see 
declaration of 'write'

D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- 
/DNDEBUG -IlibImaging -ID:\pypy-1.9\include /Tcmap.c 
/Fobuild\temp.win32-2.7\Release\map.obj

map.c

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(76) : 
warning C4114: same type qualifier used more than once

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(76) : 
error C2632: 'char' followed by 'char' is illegal

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(76) : 
error C2059: syntax error : ','

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(77) : 
error C2632: 'short' followed by 'short' is illegal

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(77) : 
error C2059: syntax error : ','

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(80) : 
warning C4114: same type qualifier used more than once

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(80) : 
error C2632: 'char' followed by 'char' is illegal

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(80) : 
error C2059: syntax error : ','

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(81) : 
warning C4114: same type qualifier used more than once

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(81) : 
error C2632: 'short' followed by 'short' is illegal

C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\basetsd.h(81) : 
error C2059: syntax error : ','

error: command 'D:\Microsoft Visual Studio 9.0\VC\BIN\cl.exe' failed 
with exit status 2

----------------------------------------
Command D:\pypy-1.9\pypy.exe -c "import 
setuptools;__file__='D:\\pypy-1.9\\bin\\build\\pil\\setup.py';exec(compile(open(__file__).read().replace('\r\n', 
'\n'), __file__, 'exec'))"
install --single-version-externally-managed --record 
e:\_tmp\pip-zvf7ry-record\install-record.txt failed with error code 1 in 
D:\pypy-1.9\bin\build\pil
Storing complete log in 
C:\Users\mydecentusername\AppData\Roaming\pip\pip.log

D:\pypy-1.9\bin>


---- SNAP -----------------------


More information about the pypy-dev mailing list