[Reasonablepy-users] Question regarding compiling reasonablepython.
Status: Alpha
Brought to you by:
mschatte
From: Andrew J. D. <and...@fr...> - 2014-03-11 03:20:38
|
To whom it may concern, I am working on a Perl interface for Flora-2. Given that I'm not familiar enough with C++ or SWIG, I decided to write an Inline::Python wrapper for ReasonablePython. I was wondering if this project is still going? When I try to compile it on amd64, I get some errors. After tweaking with the location of the XSB .h files, ------------------------ # platform = 'i686-pc-linux-gnu-deb' platform = 'x86_64-unknown-linux-gnu' ------------------------ I get a lot of conflicting type errors regarding ptoc_int and ctop_int and other such wrapper functions. ------------------------ In file included from rp/xsb_swig/swig_xsb_wrap.c:2346:0: rp/xsb_swig/swig_xsb.h:48:13: error: conflicting types for ‘ptoc_int’ extern int ptoc_int(int); ^ In file included from rp/xsb_swig/swig_xsb.h:25:0, from rp/xsb_swig/swig_xsb_wrap.c:2346: /var/lib/xsb/emu/cinterf.h:219:39: note: previous declaration of ‘ptoc_int’ was here DllExport extern prolog_int call_conv ptoc_int(CTXTdeclc reg_num); ^ In file included from rp/xsb_swig/swig_xsb_wrap.c:2346:0: rp/xsb_swig/swig_xsb.h:58:15: error: conflicting types for ‘ctop_int’ ------------------------ So at first I tried to remove the "conflicting" definitions by removing the "extern ..." declarations in xsb_swig.{c,h}. Then it compiles, but when loading it with interface, it segfaults. ------------------------ andrewdo@ai:/var/lib/myfrdcsa/sandbox/reasonablepy-20140309/reasonablepy-20140309$ python Python 2.7.6 (default, Feb 26 2014, 00:34:35) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path.append("/var/lib/myfrdcsa/sandbox/reasonablepy-20140309/reasonablepy-20140309") sys.path.append("/var/lib/myfrdcsa/sandbox/reasonablepy-20140309/reasonablepy-20140309/build/lib.linux-x86_64-2.7/rp/xsb_swig/") >>> >>> from rp import * >>> f = interface.Flora2(); Segmentation fault ------------------------ I also tried "correcting" the extern declarations to the ones from the latest xsb swig, but that also compiles then segfaults. Best Regards, Andrew Dougherty |