[SRILM User List] Srilm C++ library compile problem

Andreas Stolcke stolcke at icsi.berkeley.edu
Wed Feb 27 14:19:32 PST 2013


On 2/27/2013 7:42 AM, Yi Yang wrote:
> Hi,
>
> I have a problem when I try to compile my C++ problem with srilm library.
>
> My commend is
>
> g++ srilmTest.cc -I/nethome/yyang319/software/srilm/include/ 
> -L/nethome/yyang319/software/srilm/lib/i686-m64/ -ldstruct -lflm 
> -lmisc -loolm -ldl -lpthread -o srilmTest

Did SRIM itself build correctly?  Have you run '"make test" and did it work?
>
>
> And I got a lot of this kind of errors:
>
> /nethome/yyang319/software/srilm/lm/src/../../include/TLSWrapper.h:50: 
> undefined reference to `srilm_tls_get_key()'
> /nethome/yyang319/software/srilm/lib/i686-m64//liboolm.a(WordMesh.o):/nethome/yyang319/software/srilm/lm/src/../../include/TLSWrapper.h:50: 
> more undefined references to `srilm_tls_get_key()' follow

If you are having trouble with TLS you should try compiling with -DNO_TLS .

>
>
> /nethome/yyang319/software/srilm/lib/i686-m64//liboolm.a(WordMesh.o): 
> In function `LHash<unsigned int, NBestWordInfo>::alloc(unsigned int)':
> /nethome/yyang319/software/srilm/lm/src/../../include/LHash.cc:140: 
> undefined reference to `BM_malloc'
> /nethome/yyang319/software/srilm/lib/i686-m64//liboolm.a(WordMesh.o): 
> In function `LHash<unsigned int, NBestWordInfo>::insert(unsigned int, 
> bool&)':
> /nethome/yyang319/software/srilm/lm/src/../../include/LHash.cc:407: 
> undefined reference to `BM_free'
This strongly indicates that your libraries didn't all build properly 
(hence my question above).
BM_malloc, BM_free are defined in -ldstruct .

Andreas

>
>
> I tried to address it for a long time, but failed.
>
> Does anybody have solutions for this problem?
>
> Thanks a lot!
>
> -- 
> Sincerely,
> Yi Yang
> http://www.cc.gatech.edu/~yyang319/ 
> <http://www.cc.gatech.edu/%7Eyyang319/>
>
>
> _______________________________________________
> SRILM-User site list
> SRILM-User at speech.sri.com
> http://www.speech.sri.com/mailman/listinfo/srilm-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.speech.sri.com/pipermail/srilm-user/attachments/20130227/edfa7f70/attachment.html>


More information about the SRILM-User mailing list