[SRILM User List] Python wrapper
Andre Mansikkaniemi
ammansik at cis.hut.fi
Wed Feb 16 00:13:15 PST 2011
Andreas Stolcke wrote:
> Andre Mansikkaniemi wrote:
>> 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?
>>
> PIC compilation should be the default in recent releases.
> Run "make cleanest" , then rebuild and make sure -fPIC appears inn all
> compiler commands. Make sure the PIC_FLAG variable is not modified in
> any in common/Makefile.machine.i686-m64 or Makefile.site.i686-m64 .
>
> Andreas
Hi,
I got it working now.
Many thanks!
André
>
>> André
>>
>> [1] Nitin Madnani. Source Code: Querying and Serving N -gram Language
>> Models with Python
>>
>> _______________________________________________
>> SRILM-User site list
>> SRILM-User at speech.sri.com
>> http://www.speech.sri.com/mailman/listinfo/srilm-user
>>
>>
>
More information about the SRILM-User
mailing list