Code Monkey home page Code Monkey logo

py4s's People

Contributors

wwaites avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

py4s's Issues

Cannot build py4s on Ubuntu Lucid

Hi, I have some problems in building py4s on Ubuntu Lucid Lynx LTS.
This is what I've done:

  1. installed Cython with the command >>>sudo easy_install cython
  2. copied the source code of 4store in the same folder where the folder py4s is
  3. build py4s with the command >>>python install.py build

The building process fails and return this error:

cythoning _py4s.pyx to _py4s.c

Error converting Pyrex file to C:
------------------------------------------------------------
...
cdef class _Cursor:
    cdef py4s.fsp_link *_link
    cdef py4s.fs_query_state *_qs
    cdef py4s.fs_query *_qr
    cdef char *_query
    cdef bool _transaction
        ^
------------------------------------------------------------

'bool' is not a type identifier

Could you help me out?

Does not compile :(

Here is what I get when trying to compile py4s :

cgueret@eculture2:~/software/py4s$ python setup.py build
running build
running build_py
running build_ext
cythoning _py4s.pyx to _py4s.c

Error converting Pyrex file to C:

...
fs_row *fs_query_fetch_header_row(fs_query *q)
fs_row *fs_query_fetch_row(fs_query *q)

cdef extern from "frontend/import.h":
int fs_import_stream_start(fsp_link *link, char *model_uri, char *mimetype, int has_o_index, int *count)
int fs_import_stream_data(fsp_link *link, unsigned char *data, size_t count)

^

/home/cgueret/software/py4s/_py4s.pxd:113:71: Expected ')'

Error converting Pyrex file to C:

...
cdef class _Cursor:
cdef py4s.fsp_link *_link
cdef py4s.fs_query_state *_qs
cdef py4s.fs_query *_qr
cdef char *_query
cdef bool _transaction

^

/home/cgueret/software/py4s/_py4s.pyx:72:11: Syntax error in C variable declaration
building '_py4s' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LAQRS=1 -DHAVE_RASQAL_WORLD=1 -DUSE_AVAHI=1 -Isrc -I/home/cgueret/local/include/glib-2.0 -I/home/cgueret/local/lib/glib-2.0/include -I/home/cgueret/local/include -I/home/cgueret/local/include/rasqal -I/usr/include/python2.5 -c _py4s.c -o build/temp.linux-x86_64-2.5/_py4s.o -std=gnu99
gcc: _py4s.c: No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1

Not compatible with cython 0.13. "bool" type identifier

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

Error compiling Cython file:

...
cdef class _Cursor:
cdef py4s.fsp_link *_link
cdef py4s.fs_query_state *_qs
cdef py4s.fs_query *_qr
cdef char *_query
cdef bool _transaction

^

_py4s.pyx:107:9: 'bool' is not a type identifier
building '_py4s' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LAQRS=1 -DHAVE_RASQAL_WORLD=1 -Isrc -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/rasqal -I/usr/local/include/raptor2 -I/usr/local/include/python2.7 -c _py4s.c -o build/temp.linux-ia64-2.7/_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

Need adding a line "from cpython cimport bool" in _py4s.pyx.
See http://wiki.cython.org/FAQ#HowdoIdeclareanobjectoftypebool.3F

Cannot build py4s on ubuntu jaunty

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

Doesn't build with recent versions of 4store (1.1.3)

It seems like some of the includes have been renamed (4s-datatypes.h, 4s-hash.h) and a couple of method signatures changed.

python setup.py build

running build
running build_py
running build_ext
building '_py4s' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DHAVE_LAQRS=1 -DHAVE_RASQAL_WORLD=1 -DUSE_AVAHI=1 -Isrc -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/rasqal -I/usr/include/raptor2 -I/usr/include/python2.6 -c _py4s.c -o build/temp.linux-i686-2.6/_py4s.o -std=gnu99
_py4s.c:158:30: error: common/datatypes.h: No such file or directory
_py4s.c:160:25: error: common/hash.h: No such file or directory
In file included from _py4s.c:163:
src/frontend/import.h:19: warning: function declaration isn't a prototype
_py4s.c: In function 'pyx_pf_5_py4s_7_Cursor___cinit':
_py4s.c:2730: error: too few arguments to function 'fs_query_init'
_py4s.c: In function '__pyx_pf_5_py4s_7_Cursor_execute':
_py4s.c:3259: warning: passing argument 1 of 'raptor_new_uri' from incompatible pointer type
/usr/include/raptor2/raptor.h:1148: note: expected 'struct raptor_world *' but argument is of type 'unsigned char *'
_py4s.c:3259: error: too few arguments to function 'raptor_new_uri'
_py4s.c:3268: error: too few arguments to function 'fs_query_execute'
_py4s.c: In function '__pyx_pf_5_py4s_7_Cursor_update':
_py4s.c:4124: warning: passing argument 1 of 'fs_update' from incompatible pointer type
src/frontend/update.h:13: note: expected 'struct fs_query_state *' but argument is of type 'struct fsp_link *'
error: command 'gcc' failed with exit status 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.