moses-smt / mosesdecoder

Moses, the machine translation system
http://www.statmt.org/moses
GNU Lesser General Public License v2.1
1.58k stars 775 forks source link

Compilation fails when OxLM enabled #113

Closed michaelhutt closed 9 years ago

michaelhutt commented 9 years ago

Commit dcb8e5d3e0 seems to have broken OxLM support (--with-oxlm option). The error (icc) is:

  moses/LM/oxlm/OxLM.cpp(181): error: no suitable user defined conversion from "boost::shared_ptr<Moses::InputType>" to "const Moses::InputType" exists

moses/LM/oxlm/SourceOxLM.cpp has the same issue on line 106 (and also should change ttasksptr to ttask). Line 107 passes two parameters to BilingualLM::InitializeForInput, which can only accept one parameter.

If I use gcc, the error is: moses/LM/oxlm/OxLM.cpp:181:34: error: invalid use of incomplete type 'class Moses::TranslationTask'.

ugermann commented 9 years ago

That was a missing #include in OxLM.cpp. Fixed.

michaelhutt commented 9 years ago

New error:

moses/LM/oxlm/OxLM.cpp:182:46: error: invalid initialization of reference of type 'const Moses::InputType&' from expression of type 'boost::shared_ptr<moses::InputType>'

Plus the same aforementioned problems in SourceOxLM.cpp.

ugermann commented 9 years ago

I got duped into believing that --with-oxlm was sufficient because the brilliant bjam setup doesn't actually check correctness of command line arguments, so if you just provide --with-oxlm bjam just ploughs through (including all the regression tests without ever complaining). Yes, bjam is clearly the best build system ever! End of rant. Should work now.

On Thu, May 21, 2015 at 5:40 PM, Michael Hutt notifications@github.com wrote:

New error:

moses/LM/oxlm/OxLM.cpp:182:46: error: invalid initialization of reference of type 'const Moses::InputType&' from expression of type 'boost::shared_ptrmoses::InputType'

Plus the same aforementioned problems in SourceOxLM.cpp.

— Reply to this email directly or view it on GitHub https://github.com/moses-smt/mosesdecoder/issues/113#issuecomment-104348168 .

Ulrich Germann Senior Researcher School of Informatics University of Edinburgh