Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cimport cython.view array as cvarray - compilation error

I get a compilation error if I try something even as simple as:

from cython.view cimport array as cvarray
cdef arraytest():
    pass

I get the same error using the notebook and on loading from the sage command line. I have installed a fresh copy of cython.spkg to no avail.

I must be missing something obvious, but what?

Sage version 5.11; gcc version 4.7.3; running on ubuntu 13.04

This is the error:

  File "/home/martin/sage-5.9/devel/sagenb/sagenb/misc/support.py", line 533, in cython_import_all
    create_local_c_file=create_local_c_file)
  File "/home/martin/sage-5.9/devel/sagenb/sagenb/misc/support.py", line 510, in cython_import
    create_local_c_file=create_local_c_file)
  File "/home/martin/sage-5.9/local/lib/python2.7/site-packages/sage/misc/cython.py", line 535, in cython
    raise RuntimeError, "Error compiling %s:\n%s\n%s"%(filename, log, err)
RuntimeError: Error compiling /home/martin/nbfiles.sagenb/home/admin/10/code/sage4.spyx:
running build
running build_ext
building '_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/martin/sage-5.9/local/include/csage -I/home/martin/sage-5.9/local/include -I/home/martin/sage-5.9/local/include/python2.7 -I/home/martin/sage-5.9/local/lib/python/site-packages/numpy/core/include -I/home/martin/sage-5.9/devel/sage/sage/ext -I/home/martin/sage-5.9/devel/sage -I/home/martin/sage-5.9/devel/sage/sage/gsl -I/home/martin/nbfiles.sagenb/home/admin/10/code -I/home/martin/sage-5.9/local/include/python2.7 -c _home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c -o build/temp.linux-x86_64-2.7/_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.o -w -O2

_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2068:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2070:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2529:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2531:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2592:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2594:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2655:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2657:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2865:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2867:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2950:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:2952:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:3533:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:3535:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:3733:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:3735:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:4915:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:4917:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:5886:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:5888:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:5954:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:5956:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:6049:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:6051:44: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:6123:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:6189:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:6255:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:6341:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:11575:90: error: '__pyx_doc_15View' undeclared here (not in a function)
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:11778:93: error: request for member 'MemoryView_5array_6__getattr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:11778:3: error: initializer element is not constant
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:11778:3: error: (near initialization for '__pyx_methods_array[0].ml_doc')
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c: In function 'init_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0':
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12533:7: error: '__pyx_wrapperbase_15View' undeclared (first use in this function)
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12533:7: note: each undeclared identifier is reported only once for each function it appears in
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12533:31: error: request for member 'MemoryView_10memoryview_4__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12534:31: error: request for member 'MemoryView_10memoryview_4__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12534:68: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12534:91: error: request for member 'MemoryView_10memoryview_4__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12535:76: error: request for member 'MemoryView_10memoryview_4__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12543:31: error: request for member 'MemoryView_10memoryview_6__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12544:31: error: request for member 'MemoryView_10memoryview_6__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12544:68: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12544:91: error: request for member 'MemoryView_10memoryview_6__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12545:76: error: request for member 'MemoryView_10memoryview_6__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12553:31: error: request for member 'MemoryView_10memoryview_10__len__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12554:31: error: request for member 'MemoryView_10memoryview_10__len__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12554:65: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12554:88: error: request for member 'MemoryView_10memoryview_10__len__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12555:76: error: request for member 'MemoryView_10memoryview_10__len__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12563:31: error: request for member 'MemoryView_10memoryview_12__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12564:31: error: request for member 'MemoryView_10memoryview_12__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12564:66: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12564:89: error: request for member 'MemoryView_10memoryview_12__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12565:76: error: request for member 'MemoryView_10memoryview_12__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12573:31: error: request for member 'MemoryView_10memoryview_14__str__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12574:31: error: request for member 'MemoryView_10memoryview_14__str__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12574:65: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12574:88: error: request for member 'MemoryView_10memoryview_14__str__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12575:76: error: request for member 'MemoryView_10memoryview_14__str__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12586:31: error: request for member 'MemoryView_5array_6__getattr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12587:31: error: request for member 'MemoryView_5array_6__getattr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12587:62: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12587:85: error: request for member 'MemoryView_5array_6__getattr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12588:76: error: request for member 'MemoryView_5array_6__getattr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12596:31: error: request for member 'MemoryView_5array_8__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12597:31: error: request for member 'MemoryView_5array_8__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12597:62: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12597:85: error: request for member 'MemoryView_5array_8__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12598:76: error: request for member 'MemoryView_5array_8__getitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12606:31: error: request for member 'MemoryView_5array_10__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12607:31: error: request for member 'MemoryView_5array_10__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12607:63: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12607:86: error: request for member 'MemoryView_5array_10__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12608:76: error: request for member 'MemoryView_5array_10__setitem__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12618:31: error: request for member 'MemoryView_4Enum___init__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12619:31: error: request for member 'MemoryView_4Enum___init__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12619:57: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12619:80: error: request for member 'MemoryView_4Enum___init__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12620:76: error: request for member 'MemoryView_4Enum___init__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12628:31: error: request for member 'MemoryView_4Enum_2__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12629:31: error: request for member 'MemoryView_4Enum_2__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12629:58: error: request for member 'doc' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12629:81: error: request for member 'MemoryView_4Enum_2__repr__' in something not a structure or union
_home_martin_nbfiles_sagenb_home_admin_10_code_sage4_spyx_0.c:12630:76: error: request for member 'MemoryView_4Enum_2__repr__' in something not a structure or union
error: command 'gcc' failed with exit status 1