Cython Memoryview编译错误

时间:2013-01-18 19:26:19

标签: ubuntu python-2.7 cython memoryview

我试图在Memoryview(Ubuntu 11.10 64位)上获得类型Cython的好处,但即使在this textbook example中也会遇到编译错误。不使用Memoryview生成的代码似乎编译好了。我在Sage上使用Python 2.7工作,并得到如下错误:

gcc -fno-strict-aliasing -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/sergey/Python/sage-5.5/local/include/csage -I/home/sergey/Python/sage-5.5/local/include -I/home/sergey/Python/sage-5.5/local/include/python2.7 -I/home/sergey/Python/sage-5.5/local/lib/python/site-packages/numpy/core/include -I/home/sergey/Python/sage-5.5/devel/sage/sage/ext -I/home/sergey/Python/sage-5.5/devel/sage -I/home/sergey/Python/sage-5.5/devel/sage/sage/gsl -I/home/sergey/.sage/sage_notebook.sagenb/home/admin/1/code -I/home/sergey/Python/sage-5.5/local/include/python2.7 -c _home_sergey__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx_0.c -o build/temp.linux-x86_64-2.7/_home_sergey__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx_0.o -w -O2

_home_sergey__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx_0.c:2259:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘.’ token _home_sergey__sage_sage_notebook_sagenb_home_admin_1_code_sage2_spyx_0.c:2261:44: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘.’ token

建议修正:

import os
os.environ['LDFLAGS'] = '-march=i486'
os.environ['CFLAGS'] = '-march=i486'

没有帮助 - 它给出了一个错误,我的处理器不支持这样的指令。

提前致谢, 塞吉

0 个答案:

没有答案