[SRILM User List] Chaing's python wrapper

Andreas Stolcke stolcke at icsi.berkeley.edu
Wed Jan 4 09:36:27 PST 2012


gholamreza haffari wrote:
> Hi there,
>
> I get an error when I try to compile the following python wrapper (by 
> David Chaing):
> http://www.isi.edu/~chiang/software/psrilm.tgz 
> <http://www.isi.edu/%7Echiang/software/psrilm.tgz>
>
>
> The error is as follows:
>
> /usr/bin/ld: 
> /cs/grad1/ghaffar1/software/srilm/lib/i686-m64/liboolm.a(Vocab.o): 
> relocation R_X86_64_32 against `Vocab::compare(unsigned int, unsigned 
> int)' can not be used when making a shared object; recompile with -fPIC
> /cs/grad1/ghaffar1/software/srilm/lib/i686-m64/liboolm.a: could not 
> read symbols: Bad value
> collect2: ld returned 1 exit status
> error: command 'g++' failed with exit status 1
> make: *** [all] Error 1
>
>
> The srilm version that I use is "1.6.0" and my machine type is "i686-m64".

To build SRILM for use in shared libraries, invoke the build with

       make MAKE_PIC=X   (other arguments)

or put

    ADDITIONAL_CFLAGS += -fPIC
    ADDITIONAL_CXXFLAGS += -fPIC

in the machine-specific makefile  common/Makefile.site.$(MACHINE_TYPE) .
(-fPIC is for gcc-based compilers, other compilers have different 
options to accomplish the same thing.)

Andreas





>
> I appreciate your help.
> cheers,
> -Reza
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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