[SRILM User List] Python wrapper

Andre Mansikkaniemi ammansik at cis.hut.fi
Mon Feb 14 03:36:53 PST 2011


Hi!
I'm trying to compile a Python wrapper for SRILM as described in [1]. I
run into problems when compiling the Python shared library module:
g++ -shared srilm.o srilm_wrap.o -loolm -ldstruct -lmisc
-L/home/ammansik/srilm-1.5.12/lib/i686-m64 -o _srilm.so
I get the following error messages:
/usr/bin/ld: /home/andre/srilm-1.5.12/lib/i686-m64/liboolm.a(Prob.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
/home/andre/srilm-1.5.12/lib/i686-m64/liboolm.a: could not read symbols:
Bad value
collect2: ld returned 1 exit status
The system I'm using is x86_64 GNU/Linux.
Any ideas how to solve this?
André

[1] Nitin Madnani. Source Code: Querying and Serving N -gram Language
Models with Python



More information about the SRILM-User mailing list