wwaites / py4s

Python bindings via C for 4store
http://pypi.python.org/pypi/py4s
GNU General Public License v3.0
16 stars 8 forks source link

Cannot build py4s on ubuntu jaunty #2

Open okfn opened 14 years ago

okfn commented 14 years ago

First had size_t issue mentioned here: http://www.rufuspollock.org/2010/02/08/howto-install-4store/

But then had:

running build running build_py running build_ext cythoning _py4s.pyx to _py4s.c

Error converting Pyrex file to C:

... RASQAL_LITERAL_UDT, )

cdef _rnode(dict bindings, fs_row row, rasqal_literal l): if l.type == RASQAL_LITERAL_URI: return URIRef(py4s.raptor_uri_as_string(l.value.uri))

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/rnode.pyx:16:41: Cannot convert 'unsigned char *' to Python object

Error converting Pyrex file to C:

...

cdef _rnode(dict bindings, fs_row row, rasqal_literal l): if l.type == RASQAL_LITERAL_URI: return URIRef(py4s.raptor_uri_as_string(l.value.uri)) if l.type == RASQAL_LITERAL_VARIABLE: return _node(row[bindings[l.value.variable.name]])

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/rnode.pyx:18:44: Cannot convert 'unsigned char *' to Python object

Error converting Pyrex file to C:

... if l.type in LITERALS: kw = {} if l.language: kw["lang"] = l.language.lower() if l.datatype: kw["datatype"] = URIRef(py4s.raptor_uri_as_string(l.datatype))

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/rnode.pyx:24:52: Cannot convert 'unsigned char *' to Python object

Error converting Pyrex file to C:

... if l.type in (RASQAL_LITERAL_INTEGER, RASQAL_LITERAL_BOOLEAN): val = l.value.integer elif l.type == (RASQAL_LITERAL_FLOAT, RASQAL_LITERAL_DOUBLE): val = l.value.floating else: val = l.string

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/rnode.pyx:30:10: Cannot convert 'unsigned char *' to Python object

Error converting Pyrex file to C:

... val = l.value.floating else: val = l.string return Literal(val, **kw) if l.type == RASQAL_LITERAL_BLANK: return BNode(l.string) # ???

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/rnode.pyx:33:16: Cannot convert 'unsigned char *' to Python object

Error converting Pyrex file to C:

...

    # silly hoop for unicode data
    py_uquery = query.encode("utf-8")
    self._query = py_uquery

    cdef py4s.raptor_uri *bu = py4s.raptor_new_uri(context)
                                                   ^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/_py4s.pyx:110:56: Cannot convert Python object to 'unsigned char *'

Error converting Pyrex file to C:

... self.transaction(context) transaction = True else: transaction = False data = (n + u" .").encode("utf-8") udata = data

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/_py4s.pyx:154:15: Cannot convert Python object to 'unsigned char *'

Error converting Pyrex file to C:

... transaction = True else: transaction = False data = (n + u" .").encode("utf-8") udata = data py4s.fs_import_stream_data(self._link, udata, len(udata))

^

/home/rgrp/hgroot/pyenv-openbiblio/src/py4s/_py4s.pyx:155:58: Cannot convert 'unsigned char *' to Python object

Error converting Pyrex file to C:

building '_py4s' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LAQRS=1 -DHAVE_RASQAL_WORLD=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/rasqal -I/usr/include/python2.6 -c _py4s.c -o build/temp.linux-i686-2.6/_py4s.o -std=gnu99 _py4s.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. error: command 'gcc' failed with exit status 1

wwaites commented 14 years ago

what version of cython?

wwaites commented 14 years ago

You need version 0.12 of greater of Cython, the version you get with pip or easy_install is fine, the version you get with apt on debian/ubuntu is too old.

okfn commented 14 years ago

Version: 0.10.3-1build1 - standard on on debian?

okfn commented 14 years ago

More errors:

src/frontend/update.c:49: error: expected specifier-qualifier-list before ‘rasqal_update_operation’ src/frontend/update.c: In function ‘error_handler’: src/frontend/update.c:185: error: ‘struct update_context’ has no member named ‘opid’ src/frontend/update.c:187: warning: format not a string literal and no format arguments src/frontend/update.c: In function ‘update_op’: src/frontend/update.c:192: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:193: error: ‘RASQAL_UPDATE_TYPE_UNKNOWN’ undeclared (first use in this function) src/frontend/update.c:193: error: (Each undeclared identifier is reported only once src/frontend/update.c:193: error: for each function it appears in.) src/frontend/update.c:196: error: ‘RASQAL_UPDATE_TYPE_CLEAR’ undeclared (first use in this function) src/frontend/update.c:197: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:199: error: ‘RASQAL_UPDATE_TYPE_CREATE’ undeclared (first use in this function) src/frontend/update.c:201: error: ‘RASQAL_UPDATE_TYPE_DROP’ undeclared (first use in this function) src/frontend/update.c:202: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:204: error: ‘RASQAL_UPDATE_TYPE_LOAD’ undeclared (first use in this function) src/frontend/update.c:205: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:206: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:208: error: ‘RASQAL_UPDATE_TYPE_UPDATE’ undeclared (first use in this function) src/frontend/update.c:212: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:216: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:216: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:217: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:217: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:224: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:228: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:230: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:253: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:259: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:260: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:263: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c: In function ‘fs_update’: src/frontend/update.c:314: error: ‘rasqal_update_operation’ undeclared (first use in this function) src/frontend/update.c:314: error: ‘op’ undeclared (first use in this function) src/frontend/update.c:314: warning: implicit declaration of function ‘rasqal_query_get_update_operation’ src/frontend/update.c:318: error: ‘struct update_context’ has no member named ‘op’ src/frontend/update.c:319: error: ‘struct update_context’ has no member named ‘opid’ error: command 'gcc' failed with exit status 1

wwaites commented 14 years ago

What version of rasqal?

pkg_config rasqal --version rasqal-config --version