[redland] SegFault with python interface
Dave Beckett
dave.beckett at bristol.ac.uk
Thu Aug 9 18:07:17 BST 2001
>>>andreasharth at yahoo.com said:
> I'm new to the RDF arena and wanted to play around with the
> technology. Google found redland, and the package seems quite
> interesting, especially the python interface. Anyways, after compiling
> and installing the stuff I get SegFaults when I try to run the Python
> test program.
>
> ~/redland-0.9.9/python/test$ python2 test.py
[..]
> Segmentation fault
> Python 2.0.1 on a debian box:
>
> ~/redland-0.9.9/python/test$ python2
> Python 2.0.1 (#0, Jun 23 2001, 23:50:30)
> [GCC 2.95.4 20010319 (Debian prerelease)] on linux2
> Type "copyright", "credits" or "license" for more information.
> >>>
>
> Installation seemed to work smoothly, but maybe I am missing
> something...
I tried out a debian box I have (unstable dist) and I can't duplicate
it. It works with the Python 1.5 binary called python, although you
aren't using that.
With Python 2.0.1 installed as binary python2, the distutils are
missing so setup.py won't run. You must have added them? So I just
added them myself (V1.0.2) and it works fine:
----------------------------------------------------------------------
debian$ tar xfpz redland-0.9.9.tar.gz
debian$ cd redland-0.9.9
debian$ PYTHON=python2 ./configure
[...]
debian$ make
[...]
debian$ cd python
debian$ make test-python
PACKAGE=Redland VERSION=0.9.9 TOP_SRCDIR=.. python2 setup.py build
Using top_srcdir .. in package Redland
running build
running build_py
creating build
creating build/lib.linux-i586-2.0
copying RDF.py -> build/lib.linux-i586-2.0
running build_ext
building 'Redland' extension
creating build/temp.linux-i586-2.0
gcc -g -O2 -Wall -Wstrict-prototypes -fPIC -fPIC -DHAVE_CONFIG=1 -I.. -I/usr/include/python2.0 -c Redland_wrap.c -o build/temp.linux-i586-2.0/Redland_wrap.o
Redland_wrap.c: In function `SWIG_ConvertPtr':
Redland_wrap.c:361: warning: suggest explicit braces to avoid ambiguous `else'
Redland_wrap.c:364: warning: suggest explicit braces to avoid ambiguous `else'
Redland_wrap.c:380: warning: suggest explicit braces to avoid ambiguous `else'
Redland_wrap.c: At top level:
Redland_wrap.c:147: warning: `SWIG_TypeQuery' defined but not used
gcc -shared -lc build/temp.linux-i586-2.0/Redland_wrap.o -L.. -lrdf -ldb -o build/lib.linux-i586-2.0/Redland.so
Using python build dir build/lib.linux-i586-2.0
PYTHONPATH=build/lib.linux-i586-2.0 python2 test/test.py
found statement: {[http://purl.org/net/dajobe/], [http://purl.org/dc/elements/1.1/creator], "Dave Beckett"}
debian$ python2
Python 2.0.1 (#0, Jun 23 2001, 23:50:30)
[GCC 2.95.4 20010319 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>>
----------------------------------------------------------------------
Not sure what to do now - I really need to be able to duplicate it.
Can you email me the output of this:
make clean; ./configure; make; cd python; make test-python
Dave
More information about the redland-dev
mailing list