Compiling Python API in Linux Mint

Submitted by elruben on Tue, 09/19/2017 - 20:28
Forums

Hi,
Trying to compile the API for Python of Freeling 4.0 (latest from git) and I get this error when I run "make":

g++ -shared -o _freeling.so freeling_pythonAPI.cxx -lfreeling -I/usr/local/include -L/usr/local/lib -I/usr/include/python3.5m -fPIC -std=gnu++0x
freeling_pythonAPI.cxx: In function ‘PyObject* _wrap_mention_subsumed_with_no_verb__SWIG_0(PyObject*, PyObject*)’:
freeling_pythonAPI.cxx:76268:11: error: ‘class freeling::mention’ has no member named ‘subsumed_with_no_verb’
(arg1)->subsumed_with_no_verb(arg2);
^
freeling_pythonAPI.cxx: In function ‘PyObject* _wrap_mention_subsumed_with_no_verb__SWIG_1(PyObject*, PyObject*)’:
freeling_pythonAPI.cxx:76289:11: error: ‘class freeling::mention’ has no member named ‘subsumed_with_no_verb’
(arg1)->subsumed_with_no_verb();
^
freeling_pythonAPI.cxx: In function ‘PyObject* _wrap_mention_is_subsumed_with_no_verb(PyObject*, PyObject*)’:
freeling_pythonAPI.cxx:76634:53: error: ‘const class freeling::mention’ has no member named ‘is_subsumed_with_no_verb’
result = (bool)((freeling::mention const *)arg1)->is_subsumed_with_no_verb();
^
Makefile:11: recipe for target '_freeling.so' failed
make: *** [_freeling.so] Error 1

Linux: Mint 18.2 Sonya
gcc version 5.4.0 20160609
SWIG Version 3.0.8
Python 3.5.2

Any help will be very much appreciated.

Ruben

The APIs to languages other than C++ are not updated constantly, but only when a stable release is launched.

However, you are lucky: a few hours ago I pulled in a fix to this issue contributed by @diegodlh in GitHub. If you pull git again, you should be able to compile it.