[SRILM User List] SRILM-1.7.1 compile error

Andreas Stolcke stolcke at icsi.berkeley.edu
Mon Oct 17 16:53:12 PDT 2016


Emily,

It looks like there is something wrong with your iconv library setup.   
Have you by any chance installed your own version of this library (the 
name of the undefined symbols indicates you might be using the GNU 
libiconv).   When I remove the -liconv library from the link line I get 
a different set of undefined symbols (_iconv, _iconv_close, _iconv_open).
So I recommend removing any third-party version and making sure you have 
the MacOS version of libiconv installed in /usr/lib:

/usr/lib/libiconv.2.4.0.dylib
/usr/lib/libiconv.2.dylib
/usr/lib/libiconv.dylib

If you cannot get it to work, build SRILM without iconv support:

make NO_ICONV=X ...

(make cleanest first).

Andreas


On 10/13/2016 11:01 AM, Emily Cody wrote:
>
> Hi,
>
> Thanks for the response.  This is the output:
>
> *mkdir -p include lib bin*
>
> *make init*
>
> *make[1]: Entering directory '/Users/ecody/src/srilm'*
>

> **
>
> *make[2]: Entering directory '/Users/ecody/src/srilm/lm/src'*
>
> *c++ -Wall -Wno-unused-variable -Wno-uninitialized 
> -Wno-overloaded-virtual -DINSTANTIATE_TEMPLATES -I/usr/include -I. 
> -I../../include -DHAVE_ZOPEN   -c -g -O2 -fno-common -o 
> ../obj/macosx/ngram.o ngram.cc*
>
> *c++ -Wall -Wno-unused-variable -Wno-uninitialized 
> -Wno-overloaded-virtual -DINSTANTIATE_TEMPLATES -I/usr/include -I. 
> -I../../include -DHAVE_ZOPEN   -u _matherr -L../../lib/macosx  -g -O2 
> -fno-common -o ../bin/macosx/ngram ../obj/macosx/ngram.o 
> ../obj/macosx/liboolm.a  ../../lib/macosx/libflm.a 
> ../../lib/macosx/libdstruct.a ../../lib/macosx/libmisc.a 
> ../../lib/macosx/libz.a -L/usr/lib -ltcl -lm  -liconv 2>&1 | c++filt*
>
> *Undefined symbols for architecture x86_64:*
>
> *  "_libiconv", referenced from:*
>
> *File::fgetsUTF8(char*, int) in libmisc.a(File.o)*
>
> *  "_libiconv_close", referenced from:*
>
> *      File::~File() in libmisc.a(File.o)*
>
> *File::reopen(char const*, char const*) in libmisc.a(File.o)*
>
> *File::reopen(char const*) in libmisc.a(File.o)*
>
> *File::reopen(char const*, unsigned long, int) in libmisc.a(File.o)*
>
> *File::reopen(std::__1::basic_string<char, 
> std::__1::char_traits<char>, std::__1::allocator<char> >&, int) in 
> libmisc.a(File.o)*
>
> *  "_libiconv_open", referenced from:*
>
> *File::fgetsUTF8(char*, int) in libmisc.a(File.o)*
>
> *ld: symbol(short) not found for architecture x86_64*
>
> *clang: error: linker command failed with exit code 1 (use -void to 
> see invocation)*
>
> *test -f ../bin/macosx/ngram*
>
> *make[2]: *** 
> [/Users/ecody/src/srilm/common/Makefile.common.targets:118: 
> ../bin/macosx/ngram] Error 1*
>
> *make[2]: Leaving directory '/Users/ecody/src/srilm/lm/src'*
>
> *make[1]: *** [Makefile:109: release-programs] Error 1*
>
> *make[1]: Leaving directory '/Users/ecody/src**/srilm'*
>
> *make: *** [Makefile:61: World] Error 2*
>
> *From: *Andreas Stolcke <stolcke at icsi.berkeley.edu>
> *Date: *Thursday, October 13, 2016 at 1:46 PM
> *To: *Emily Cody <ecody at adobe.com>
> *Subject: *Re: [SRILM User List] SRILM-1.7.1 compile error
>
> On 10/13/2016 10:24 AM, Emily Cody wrote:
>
>     Hello,
>
>     I’ve seen a post addressing the exact problem I am having, but it
>     did not appear to have any responses.  It is dated July 16, 2106
>     and titled  “srilm 1.7.1 Installation error”.  Upon compiling on a
>     macoxs I am given the following errors:
>
>     clang: error: linker command failed with exit code 1 (use -void to
>     see invocation)
>
>     test -f ../bin/macosx/ngram
>
>     make[2]: ***
>     [/Users/ecody/desktop/srilm-1.7.1/common/Makefile.common.targets:118:
>     ../bin/macosx/ngram] Error 1
>
>     make[2]: Leaving directory '/Users/ecody/Desktop/srilm-1.7.1/lm/src'
>
>     make[1]: *** [Makefile:109: release-programs] Error 1
>
>     make[1]: Leaving directory '/Users/ecody/Desktop/srilm-1.7.1'
>
>     make: *** [Makefile:61: World] Error 2
>
>     Has this issue been addressed before?  If so what was the fix?
>
> You have to include the entire output from the make command so we can 
> tell what the problem might be.
>
> Andreas
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.speech.sri.com/pipermail/srilm-user/attachments/20161017/6485761a/attachment.html>


More information about the SRILM-User mailing list