Need some help with compiling boost-dependent program

Dmitry Sivachenko demon at FreeBSD.org
Sun Aug 31 16:39:31 UTC 2014


Hello Boost maintainers!

I am trying to port mosesdecoder program (http://www.statmt.org/moses/) to FreeBSD-10/stable.
It uses Boost heavily and depends on other libraries which are built using gcc-4.7.

On some stage it fails to link with reasons unknown to me.

I suspect this may be because Boost is built with clang, I build mosesdecoder with clang and other libraries were built using gcc (4.7).  May be I am wrong.

The error is the following:

moses/bin/clang-linux-3.4.1/release/debug-symbols-on/threading-multi/libmoses.so
: undefined reference to `randlm::Vocab::getWordID(std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> > const&)'
moses/bin/clang-linux-3.4.1/release/debug-symbols-on/threading-multi/libmoses.so
: undefined reference to `lmContainer::CreateLanguageModel(std::__1::basic_strin
g<char, std::__1::char_traits<char>, std::__1::allocator<char> >, float, float)'
moses/bin/clang-linux-3.4.1/release/debug-symbols-on/threading-multi/libmoses.so
: undefined reference to `randlm::RandLM::initRandLM(std::__1::basic_string<char
, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, int)'
clang++: error: linker command failed with exit code 1 (use -v to see invocation
)

though linking command includes -lRandLM explicitly.

You can get tarball for unfinished port so you can easily reproduce this here:
http://people.freebsd.org/~demon/mosesdecoder.tar.gz

Any help would be greatly appreciated.
Build log is redirected to ${WRKSRC}/build.log to simplify analysis.

Thanks in advance!



More information about the freebsd-office mailing list