marian-nmt / marian

Fast Neural Machine Translation in C++
https://marian-nmt.github.io
Other
1.23k stars 230 forks source link

[ 98%] Linking CXX executable ../bin/amun - crash #22

Closed mehmedes closed 7 years ago

mehmedes commented 7 years ago

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] ':

:(.text+0x2ad4): undefined reference to `TranslationTask(boost::shar ed_ptr, unsigned long, unsigned long)' /tmp/ccwELx9c.ltrans1.ltrans.o: In function `std::_Function_handler > ()> > >::_M_invoke(std::_Any_data const&) [clone .lto_priv.952] ': :(.text+0x2b84): undefined reference to `TranslationTask(boost::shar ed_ptr, unsigned long, unsigned long)' collect2: error: ld returned 1 exit status make[2]: *** [bin/amun] Error 1 make[1]: *** [src/CMakeFiles/amun.dir/all] Error 2 make: *** [all] Error 2
tomekd commented 7 years ago

Hi! What is the last commit in git?

git log | head -n 1
mehmedes commented 7 years ago

It says:

/amunmt/build$ git log | head -n 1 commit 64491e75c6d330bd0af6cbe91225a1516672bc5d

shuoyangd commented 7 years ago

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

emjotde commented 7 years ago

Hm, cannot reproduce this. Which g++ version exactly are you using?

shuoyangd commented 7 years ago

4.9.2 for me.

emjotde commented 7 years ago

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.

shuoyangd commented 7 years ago

Sure. Will let you know when I do.

mehmedes commented 7 years ago

I tried 5.4 but still no luck.

hieuhoang commented 7 years ago

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 .

mehmedes commented 7 years ago

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 toTranslationTask(God&, boost::shared_ptr, unsigned long, unsigned long)' 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()#1} ()> > ()>, void> >::_M_invoke(std::_Any_data const&)': decoder_main.cpp:(.text+0xb09): undefined reference toTranslationTask(God&, boost::shared_ptr, unsigned long, unsigned long)' collect2: error: ld returned 1 exit status make[2]: [bin/amun] Error 1 make[1]: [src/CMakeFiles/amun.dir/all] Error 2 make: *** [all] Error 2

emjotde commented 7 years ago

What linux distribution is this?

mehmedes commented 7 years ago

14.04 Boost 1.54, gcc/++ 5.4 Python 2.7

hieuhoang commented 7 years ago

i've just checked in a change https://github.com/emjotde/amunmt/commit/9e6952383ee5fc9e52652bfab8c8a786d9c7d315 can you please try again

mehmedes commented 7 years ago

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; ^ /home/sariyildiznureddin/amunmt/src/common/sentence.h:36:18: error: ‘SentencePtr’ has not been declared void push_back(SentencePtr sentence); ^ /home/sariyildiznureddin/amunmt/src/common/sentence.h:38:3: error: ‘SentencePtr’ d oes not name a type SentencePtr at(sizet id) const { ^ /home/sariyildiznureddin/amunmt/src/common/sentence.h:53:16: error: ‘SentencePtr’ was not declared in this scope std::vector coll; ^ /home/sariyildiznureddin/amunmt/src/common/sentence.h:53:27: error: template argum ent 1 is invalid std::vector coll_; ^ /home/sariyildiznureddin/amunmt/src/common/sentence.h:53:27: error: template argum ent 2 is invalid /home/sariyildiznureddin/amunmt/src/common/sentence.h: In member function ‘sizet Sentences::size() const’: /home/sariyildiznureddin/amunmt/src/common/sentence.h:43:18: error: request for me mber ‘size’ in ‘((const Sentences*)this)->Sentences::coll’, which is of non-class type ‘const int’ return coll_.size(); ^ [ 89%] Building CXX object src/CMakeFiles/libcommon.dir/common/utils.cpp.o /home/sariyildiznureddin/amunmt/src/common/sentence.cpp: At global scope: /home/sariyildiznureddin/amunmt/src/common/sentence.cpp:49:27: error: variable or field ‘push_back’ declared void void Sentences::push_back(SentencePtr sentence) { ^ /home/sariyildiznureddin/amunmt/src/common/sentence.cpp:49:27: error: ‘SentencePt ’ was not declared in this scope [ 91%] Building CXX object src/CMakeFiles/libcommon.dir/common/vocab.cpp.o make[2]: [src/CMakeFiles/libcommon.dir/common/sentence.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... make[1]: [src/CMakeFiles/libcommon.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... [ 91%] Built target cpumode

emjotde commented 7 years ago

This last error was a missing include. Fixed now, please try again.

mehmedes commented 7 years ago

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_string >&) Sentence(God &god, size_t vLineNum, const std::vector& words); ^ /home/sariyildiznureddin/amunmt/src/./common/sentence.h:13:5: note: candidate expects 3 arguments, 2 provided /home/sariyildiznureddin/amunmt/src/./common/sentence.h:12:5: note: candidate: Sentence::Sentence(God&, size_t, const string&) Sentence(God &god, size_t vLineNum, const std::string& line); ^ /home/sariyildiznureddin/amunmt/src/./common/sentence.h:12:5: note: candidate expects 3 arguments, 2 provided /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp: In function ‘void init(const string&)’: /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:39:20: error: cannot call member function ‘God& God::Init(const string&)’ without object God::Init(options); ^ /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp: In function ‘boost::python::list translate(boost::python::list&)’: /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:43:53: error: cannot call member function ‘T God::Get(const string&) [with T = long unsigned int; std::string = std::basic_string]’ without object size_t cpuThreads = God::Get("cpu-threads"); ^ /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); ^ In file included from /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:12:0: /home/sariyildiznureddin/amunmt/src/./common/printer.h:14:6: note: candidate: template void Printer(God&, const History&, OStream&) void Printer(God &god, const History& history, OStream& out) { ^ /home/sariyildiznureddin/amunmt/src/./common/printer.h:14:6: note: template argument deduction/substitution failed: /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:23: note: cannot convert ‘std::future<_Res>::get() [with _Res = History]()’ (type ‘History’) to type ‘God&’ 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:67:6: note: candidate: template void Printer(God&, const Histories&, OStream&) void Printer(God &god, const Histories& histories, OStream& out) { ^ /home/sariyildiznureddin/amunmt/src/./common/printer.h:67:6: note: template argument deduction/substitution failed: /home/sariyildiznureddin/amunmt/src/python/amunmt.cpp:74:23: note: cannot convert ‘std::future<_Res>::get() [with _Res = History]()’ (type ‘History’) to type ‘God&’ Printer(result.get(), lineCounter++, ss); ^ 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.... [ 98%] 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()#1} ()> > ()>, void> >::_M_invoke(std::_Any_data const&)': decoder_main.cpp:(.text+0xed4): undefined reference toTranslationTask(God&, std::shared_ptr, unsigned long, unsigned long)' 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+0x1004): undefined reference toTranslationTask(God&, std::shared_ptr, unsigned long, unsigned long)' collect2: error: ld returned 1 exit status make[2]: [bin/amun] Error 1 make[1]: [src/CMakeFiles/amun.dir/all] Error 2 make: [all] Error 2

emjotde commented 7 years ago

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?

mehmedes commented 7 years ago

Thank you for your understanding. Your work is much appreciated!

mehmedes commented 7 years ago

FYI Commit 3a548b3aa09f6d17db5383575fd24090688a610f works with me as well

shuoyangd commented 7 years ago

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

shuoyangd commented 7 years ago

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

include <thrust/host_vector.h>

                            ^

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

hieuhoang commented 7 years ago

we've made more changes. git pull and make again

shuoyangd commented 7 years ago

Everything works for me now. Thanks!

mehmedes commented 7 years ago

This sounds great. I'll test it myself asap and keep you updated!

mehmedes commented 7 years ago

It's working!!! Thank you!!! I was able to build upon the latest commit.

emjotde commented 7 years ago

Great, thank you for bringing this to our attention.