[redland-dev] Cannot Compile Python bindings
Dave Beckett
dave at dajobe.org
Wed Mar 6 00:32:19 EST 2013
On 3/5/13 2:01 PM, Zach Fry wrote:
> I am trying to install the python bindings for Python 2.6 from source on
> Ubuntu 10.04 running the 2.6.32 kernel. I compiled and built raptor2-2.0.9,
> rasqal-0.9.30 and redland-1.0.14 from source with no problems. I am trying
> to install the bindings for version 1.0.14. I am able to run the configure
> script and I can see in the build summary that the Language APIs built
> includes python.
>
> However, when I try to make from the python directory, this is the error
> that I get.
>
> Making all in test
> make[1]: Entering directory
> `/home/fryz/Downloads/redland-bindings-1.0.14.1/python/test'
> make[1]: Nothing to be done for `all'.
> make[1]: Leaving directory
> `/home/fryz/Downloads/redland-bindings-1.0.14.1/python/test'
> make[1]: Entering directory
> `/home/fryz/Downloads/redland-bindings-1.0.14.1/python'
> gcc -DHAVE_CONFIG_H -I. -I./.. -DREDLAND_PRE_I -DREDLAND_POST_I
> -DREDLAND_DECL_I -DREDLAND_TYPEMAP_I -I/usr/local/include
> -I/usr/local/include/raptor2 -I/usr/local/include/rasqal
> -I/usr/include/libxml2 -I/usr/include/python2.6
> -DSWIG_PYTHON_SILENT_MEMLEAK -g -O2 -I/usr/local/include
> -I/usr/local/include/raptor2 -I/usr/local/include/rasqal
> -I/usr/include/libxml2 -DSWIG_PYTHON_SILENT_MEMLEAK -g -O2 -fPIC -DPIC
> ./Redland_wrap.c -c -o Redland_wrap.so
> ./Redland_wrap.c:125:20: error: Python.h: No such file or directory
It is expecting Python.h in /usr/include/python2.6 - which is included in
the compile line. On my debian that's in package python2.6-dev so you need
to sudo apt-get install python2.6-dev and it should appear
> ./Redland_wrap.c:764: error: expected ‘)’ before ‘*’ token
> ./Redland_wrap.c:788: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> ./Redland_wrap.c:814: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> ./Redland_wrap.c:868: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘*’ token
> ./Redland_wrap.c:883: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘lenfunc’
> ./Redland_wrap.c:884: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
> ‘__attribute__’ before ‘ssizeargfunc’
> ....
>
> make[1]: *** [Redland_wrap.so] Error 1
> make[1]: Leaving directory
> `/home/fryz/Downloads/redland-bindings-1.0.14.1/python'
> make: *** [all-recursive] Error 1
>
> Also, when I installed the python bindings using apt-get install
> python-librdf, I get the following error when trying to import RDF:
>
> Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36)
> [GCC 4.4.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import RDF
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.6/dist-packages/RDF.py", line 129, in <module>
> import Redland
> ImportError: /usr/lib/librasqal.so.2: undefined symbol: raptor_iostream_read_eof
>
> Are these two errors related?
That's a different error; it indicates that you've got multiple versions of
raptor or rasqal installed.
On my packaged raptor:
$ strings /usr/lib/libraptor2.so.0|grep raptor_iostream_read_eof
raptor_iostream_read_eof
so it's there...
It might also be due to "symbol versioning" since the system ones may need
to get compiled with that module for debian packaging policy reasons.
Bottom line: stick with the packaged versions, if you can.
Dave
>
> Your help is greatly appreciated.
>
> Thanks,
> Zach
>
>
> _______________________________________________
> redland-dev mailing list
> redland-dev at lists.librdf.org
> http://lists.librdf.org/mailman/listinfo/redland-dev
>
More information about the redland-dev
mailing list