Closed mehmedes closed 7 years ago
Hi! What is the last commit in git?
git log | head -n 1
It says:
/amunmt/build$
git log | head -n 1
commit 64491e75c6d330bd0af6cbe91225a1516672bc5d
Hi,
I got exactly the same problem, and falling back to commit 3a548b3aa09f6d17db5383575fd24090688a610f
solves the problem.
Does look like a bug to me because in path/to/amunmt/src/python/amunmt.cpp:35
, a Sentence
type is passed, while Decode
function actually asks for Sentences
type.
Shuoyang
Hm, cannot reproduce this. Which g++ version exactly are you using?
4.9.2 for me.
Do you have the possibility to try a higher version? We can confirm that for instance 5.4 works perfectly. I will try to experiment with 4.9.2 later today.
Sure. Will let you know when I do.
I tried 5.4 but still no luck.
try these commands, in this order: git pull make clean make If you have problems, please paste the exact error message
Hieu Hoang http://moses-smt.org/
On 20 January 2017 at 00:24, Mehmed Sariyildiz notifications@github.com wrote:
I tried 5.4 but still no luck.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/emjotde/amunmt/issues/22#issuecomment-273941323, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqOFEdDMQzbsd6n5nKZ--jS6OrseTCjks5rT_6vgaJpZM4Lm_BI .
Did as instructed but still:
[ 81%] Linking CXX executable ../bin/amun
CMakeFiles/amun.dir/common/decoder_main.cpp.o: In function std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<std::reference_wrapper<std::_Bind<main::{lambda()#2} ()> > ()>, void> >::_M_invoke(std::_Any_data const&)': decoder_main.cpp:(.text+0x9c9): undefined reference to
TranslationTask(God&, boost::shared_ptrstd::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<std::reference_wrapper<std::_Bind<main::{lambda()#1} ()> > ()>, void> >::_M_invoke(std::_Any_data const&)': decoder_main.cpp:(.text+0xb09): undefined reference to
TranslationTask(God&, boost::shared_ptr
What linux distribution is this?
14.04 Boost 1.54, gcc/++ 5.4 Python 2.7
i've just checked in a change https://github.com/emjotde/amunmt/commit/9e6952383ee5fc9e52652bfab8c8a786d9c7d315 can you please try again
Just tried:
[ 88%] Building CXX object src/CMakeFiles/libcommon.dir/common/processor/bpe.cpp.o
In file included from /home/sariyildiznureddin/amunmt/src/common/sentence.cpp:2:0:
/home/sariyildiznureddin/amunmt/src/common/sentence.h:25:26: error: ‘shared_ptr’ i n namespace ‘std’ does not name a template type
using SentencePtr = std::shared_ptr
This last error was a missing include. Fixed now, please try again.
This is what I get now. I'm so sorry for the inconveniencies I'm causing!!
[ 97%] Building CXX object src/CMakeFiles/amunmt.dir/common/loader_factory.cpp.o
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp: In function ‘History TranslationTask(const string&, size_t)’:
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:31:42: error: no matching function for call to ‘Search::Search(size_t&)’
search.reset(new Search(taskCounter));
^
In file included from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:0:
/home/sariyildiznureddin/amunmt/src/./common/search.h:12:5: note: candidate: Search::Search(God&, size_t)
Search(God &god, size_t threadId);
^
/home/sariyildiznureddin/amunmt/src/./common/search.h:12:5: note: candidate expects 2 arguments, 1 provided
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:35:49: error: no matching function for call to ‘Sentence::Sentence(size_t&, const string&)’
return search->Decode(Sentence(taskCounter, in));
^
In file included from /home/sariyildiznureddin/amunmt/src/./common/scorer.h:7:0,
from /home/sariyildiznureddin/amunmt/src/./common/loader.h:6,
from /home/sariyildiznureddin/amunmt/src/./common/god.h:7,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:8:
/home/sariyildiznureddin/amunmt/src/./common/sentence.h:13:5: note: candidate: Sentence::Sentence(God&, size_t, const std::vector<std::basic_stringstd::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<std::reference_wrapper<std::_Bind<main::{lambda()#1} ()> > ()>, void> >::_M_invoke(std::_Any_data const&)': decoder_main.cpp:(.text+0xed4): undefined reference to
TranslationTask(God&, std::shared_ptrstd::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<std::reference_wrapper<std::_Bind<main::{lambda()#2} ()> > ()>, void> >::_M_invoke(std::_Any_data const&)': decoder_main.cpp:(.text+0x1004): undefined reference to
TranslationTask(God&, std::shared_ptr
No reason to apologise. These look like legitimate bugs. Hieu, this looks like your changes are causing this, also can we make the python libs optional?
Thank you for your understanding. Your work is much appreciated!
FYI Commit 3a548b3aa09f6d17db5383575fd24090688a610f works with me as well
FYI I'm on commit c96b2f2
and I'm able to compile on Debian 3.16.36.
Boost 1.55 gcc/++ 4.9 cmake 3.5.1 Python 2.7
compiling commit 3e5a5f2
(current) yields the following error:
In file included from /home/shuoyangd/nmt/amunmt/src/./common/hypothesis.h:4:0, from /home/shuoyangd/nmt/amunmt/src/./common/scorer.h:6, from /home/shuoyangd/nmt/amunmt/src/./common/loader.h:6, from /home/shuoyangd/nmt/amunmt/src/./common/god.h:7, from /home/shuoyangd/nmt/amunmt/src/common/filter.cpp:12: /home/shuoyangd/nmt/amunmt/src/./common/soft_alignment.h:7:32: fatal error: thrust/host_vector.h: No such file or directory
^
compilation terminated. src/CMakeFiles/libcommon.dir/build.make:134: recipe for target 'src/CMakeFiles/libcommon.dir/common/filter.cpp.o' failed make[2]: [src/CMakeFiles/libcommon.dir/common/filter.cpp.o] Error 1 CMakeFiles/Makefile2:215: recipe for target 'src/CMakeFiles/libcommon.dir/all' failed make[1]: [src/CMakeFiles/libcommon.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
we've made more changes. git pull and make again
Everything works for me now. Thanks!
This sounds great. I'll test it myself asap and keep you updated!
It's working!!! Thank you!!! I was able to build upon the latest commit.
Great, thank you for bringing this to our attention.
Make crashes when linking CXX executable ../bin/amun
I use CMake 3.5.1, GCC/G++ 4.9, Boost 1.54
Do you have any idea what this could be related to? I'm very sorry for this newbie question!
[ 98%] Linking CXX executable ../bin/amun /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp: In function ‘History Tran slationTask(const string&, size_t)’: /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:35:50: error: no matching function for call to ‘Search::Decode(Sentence)’ return search->Decode(Sentence(taskCounter, in)); ^ /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:35:50: note: candidate is: In file included from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:0 : /home/sariyildiznureddin/amunmt/src/./common/search.h:14:34: note: boost::shared _ptr Search::Decode(const Sentences&)
boost::shared_ptr Decode(const Sentences& sentences);
^
/home/sariyildiznureddin/amunmt/src/./common/search.h:14:34: note: no known co nversion for argument 1 from ‘Sentence’ to ‘const Sentences&’
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/home/sariyildiznureddin/amunmt/src/./common/history.h: In lambda function:
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: error: ‘History::Hi story(const History&)’ is private
History(const History &) = delete;
^
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:65:48: error: within this context
[=]{ return TranslationTask(s, i); }
^
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:65:48: error: use of delet ed function ‘History::History(const History&)’
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: note: declared here
History(const History &) = delete;
^
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp: In function ‘boost::pytho n::list translate(boost::python::list&)’:
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:44: error: no matching function for call to ‘Printer(History, size_t, std::stringstream&)’
Printer(result.get(), lineCounter++, ss);
^
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:44: note: candidates ar e:
In file included from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:12:0 :
/home/sariyildiznureddin/amunmt/src/./common/printer.h:12:6: note: template void Printer(const History&, OStream&)
void Printer(const History& history, OStream& out) {
^
/home/sariyildiznureddin/amunmt/src/./common/printer.h:12:6: note: template ar gument deduction/substitution failed:
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:44: note: candidate e xpects 2 arguments, 3 provided
Printer(result.get(), lineCounter++, ss);
^
In file included from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:12:0 :
/home/sariyildiznureddin/amunmt/src/./common/printer.h:65:6: note: template void Printer(const Histories&, OStream&)
void Printer(const Histories& histories, OStream& out) {
^
/home/sariyildiznureddin/amunmt/src/./common/printer.h:65:6: note: template ar gument deduction/substitution failed:
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:44: note: cannot conv ert ‘std::future<_Res>::get() [with _Res = History]()’ (type ‘History’) to type ‘const Histories&’
Printer(result.get(), lineCounter++, ss);
^
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/usr/include/c++/4.9/future: In instantiation of ‘_Res std::future<_Res>::get() [with _Res = History]’:
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:24: required from her e
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: error: ‘History::Hi story(const History&)’ is private
History(const History &) = delete;
^
In file included from /home/sariyildiznureddin/amunmt/src/./common/threadpool.h: 35:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:10:
/usr/include/c++/4.9/future:700:58: error: within this context
return std::move(this->_M_get_result()._M_value());
^
/usr/include/c++/4.9/future:700:58: error: use of deleted function ‘History::His tory(const History&)’
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: note: declared here
History(const History &) = delete;
^
In file included from /home/sariyildiznureddin/amunmt/src/./common/threadpool.h: 35:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:10:
/usr/include/c++/4.9/future: In instantiation of ‘static std::future_base::_Ta sk_setter<_Res_ptr> std::future_base::_S_task_setter(_Res_ptr&, _BoundFn&&) [w ith _Res_ptr = std::unique_ptr<std::future_base::_Result, std::__futu re_base::_Result_base::_Deleter>; _BoundFn = std::_Bind_simple<std::reference_wr apper<std::Bind<translate(boost::python::list&)::<lambda()>()> >()>; typename Res_ptr::element_type::result_type = History]’:
/usr/include/c++/4.9/future:1318:70: required from ‘void std:: futurebase:: Task_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run(_Args ...) [with _Fn = std::_Bi nd<translate(boost::python::list&)::<lambda()>()>; _Alloc = std::allocator; _Res = History; _Args = {}]’
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:85:1: required from here
/usr/include/c++/4.9/future:539:57: error: could not convert ‘std::ref(_Tp&) [wi th _Tp = std::_Bind_simple<std::reference_wrapper<std::_Bind<translate(boost::py thon::list&)::<lambda()>()> >()>]()’ from ‘std::reference_wrapper<std::_Bind_sim ple<std::reference_wrapper<std::_Bind<translate(boost::python::list&)::<lambda() >()> >()> >’ to ‘std::function<History()>’
return _Task_setter<_Res_ptr>{ ptr, std::ref(call) };
^
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/usr/include/c++/4.9/functional: In instantiation of ‘_Res std::function<_Res(_A rgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = History; _ArgTypes = {}]’:
/usr/include/c++/4.9/future:1241:6: required from ‘_Ptr_type std::future_bas e::_Task_setter<_Res_ptr, _Res>::operator()() [with _Ptr_type = std::unique_ptr< std::future_base::_Result, std:: future_base::_Result_base::_Deleter >; _Res = History]’
/usr/include/c++/4.9/functional:2024:10: required from ‘static _Res std::_Func tion_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _A rgTypes ...) [with _Res = std::unique_ptr<std::__future_base::_Result_base, std: :future_base::_Result_base::_Deleter>; _Functor = std::future_base::_Task_se tter<std::unique_ptr<std::future_base::_Result, std::futurebase:: Result_base::_Deleter>, History>; _ArgTypes = {}]’
/usr/include/c++/4.9/functional:2428:19: required from ‘std::function<_Res(_Ar gTypes ...)>::function(_Functor) [with _Functor = std::future_base::_Task_sett er<std::unique_ptr<std::future_base::_Result, std::future_base::_Re sult_base::_Deleter>, History>; = void; _Res = std::uni que_ptr<std:: future_base::_Result_base, std:: future_base::_Result_base::_Del eter>; _ArgTypes = {}]’
/usr/include/c++/4.9/future:1319:2: required from ‘void std::future_base::_T ask_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run(_Args ...) [with _Fn = std::_Bin d<translate(boost::python::list&)::<lambda()>()>; _Alloc = std::allocator; _Res = History; _Args = {}]’
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:85:1: required from here
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: error: ‘History::Hi story(const History&)’ is private
History(const History &) = delete;
^
In file included from /usr/include/boost/system/error_code.hpp:23:0,
from /usr/include/boost/chrono/detail/system.hpp:12,
from /usr/include/boost/chrono/system_clocks.hpp:64,
from /usr/include/boost/chrono/chrono.hpp:13,
from /usr/include/boost/timer/timer.hpp:14,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:4:
/usr/include/c++/4.9/functional:2440:71: error: within this context
return _M_invoker(_M_functor, std::forward<_ArgTypes>( args)...);
^
/usr/include/c++/4.9/functional:2440:71: error: use of deleted function ‘History ::History(const History&)’
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: note: declared here
History(const History &) = delete;
^
/usr/include/c++/4.9/future: In instantiation of ‘void std::future_base::_Resu lt<_Res>::_M_set(_Res&&) [with _Res = History]’:
/usr/include/c++/4.9/future:1241:6: required from ‘_Ptr_type std::__future_bas e::_Task_setter<_Res_ptr, _Res>::operator()() [with _Ptr_type = std::unique_ptr< std::future_base::_Result, std::future_base::_Result_base::_Deleter >; _Res = History]’
/usr/include/c++/4.9/functional:2024:10: required from ‘static _Res std::_Func tion_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _A rgTypes ...) [with _Res = std::unique_ptr<std::future_base::_Result_base, std: :future_base::_Result_base::_Deleter>; _Functor = std::future_base::_Task_se tter<std::unique_ptr<std::future_base::_Result, std::__futurebase:: Result_base::_Deleter>, History>; _ArgTypes = {}]’
/usr/include/c++/4.9/functional:2428:19: required from ‘std::function<_Res(_Ar gTypes ...)>::function(_Functor) [with _Functor = std:: future_base::_Task_sett er<std::unique_ptr<std::future_base::_Result, std:: future_base::_Re sult_base::_Deleter>, History>; = void; _Res = std::uni que_ptr<std::future_base::_Result_base, std::__future_base::_Result_base::_Del eter>; _ArgTypes = {}]’
/usr/include/c++/4.9/future:1319:2: required from ‘void std::future_base::_T ask_state<_Fn, _Alloc, _Res(_Args ...)>::_M_run(_Args ...) [with _Fn = std::_Bin d<translate(boost::python::list&)::<lambda()>()>; _Alloc = std::allocator; _Res = History; _Args = {}]’
/home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:85:1: required from here
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: error: ‘History::Hi story(const History&)’ is private
In file included from /home/sariyildiznureddin/amunmt/src/./common/threadpool.h: 35:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:10:
/usr/include/c++/4.9/future:238:4: error: within this context
::new (_M_storage._M_addr()) _Res(std::move(__res));
^
/usr/include/c++/4.9/future:238:4: error: use of deleted function ‘History::Hist ory(const History&)’
In file included from /home/sariyildiznureddin/amunmt/src/./common/search.h:8:0,
from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:11:
/home/sariyildiznureddin/amunmt/src/./common/history.h:20:5: note: declared here
History(const History &) = delete;
^
make[2]: [src/CMakeFiles/amunmt.dir/python/amunmt.cpp.o] Error 1
make[1]: [src/CMakeFiles/amunmt.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/tmp/ccwELx9c.ltrans1.ltrans.o: In function `std::_Function_handler<void (), std ::reference_wrapper<std::_Bind_simple<std::reference_wrapper<std::_Bind<main::{l ambda()#2} ()> > ()> > >::_M_invoke(std::_Any_data const&) [clone .lto_priv.954] ':