我尝试在我的Mac OSX Lion上安装Pygame 1.9.1release版本的PyPy。首先使用pypy config.py
,然后使用pypy setup.py install
运行安装程序。由于我看到它正在尝试使用普通Python进行配置(这会安装正确,但会导致导入错误),所以我添加了配置到安装过程中。在安装过程中,会出现许多警告,例如:
src/overlay.c:44:5: warning: implicit declaration of function 'PyObject_Free' is invalid in C99 [-Wimplicit-function-declaration]
PyObject_Free ((PyObject*)self);
^
但是它还提供了2个类似的错误:
In file included from src/scale_mmx.c:33:
src/scale_mmx64.c:424:27: error: invalid instruction mnemonic 'movsxl'
asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ "
^
<inline asm>:1:191: note: instantiated into assembly here
/* MMX code for inner loop of X bilinear filter */ movl -36(%rbp), %ecx; pxor %mm0, %mm0; 1: movsxl (%rdi), ...
^~~~~~
In file included from src/scale_mmx.c:33:
src/scale_mmx64.c:499:27: error: invalid instruction mnemonic 'movsxl'
asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ "
^
<inline asm>:1:191: note: instantiated into assembly here
/* MMX code for inner loop of X bilinear filter */ movl -36(%rbp), %ecx; pxor %mm0, %mm0; 1: movsxl (%rdi), ...
^~~~~~
2 errors generated.
看起来对我而言,PyPy在生成C语言中的块注释时卡住了。为什么它要将注释封装在asm和volatile中,我感到很困惑。但这是提供给我的代码,可以在常规python中运行。那么这是一个错误吗?还是我漏了什么?