Git Product home page Git Product logo

Comments (26)

tomekd avatar tomekd commented on August 20, 2024

Hi!
What is the last commit in git?

git log | head -n 1

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

It says:

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

from marian.

shuoyangd avatar shuoyangd commented on August 20, 2024

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

from marian.

emjotde avatar emjotde commented on August 20, 2024

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

from marian.

shuoyangd avatar shuoyangd commented on August 20, 2024

4.9.2 for me.

from marian.

emjotde avatar emjotde commented on August 20, 2024

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.

from marian.

shuoyangd avatar shuoyangd commented on August 20, 2024

Sure. Will let you know when I do.

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

I tried 5.4 but still no luck.

from marian.

hieuhoang avatar hieuhoang commented on August 20, 2024

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

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_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 to TranslationTask(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

from marian.

emjotde avatar emjotde commented on August 20, 2024

What linux distribution is this?

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

14.04
Boost 1.54,
gcc/++ 5.4
Python 2.7

from marian.

hieuhoang avatar hieuhoang commented on August 20, 2024

i've just checked in a change
9e69523
can you please try again

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

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(size_t 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 ‘size_t 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

from marian.

emjotde avatar emjotde commented on August 20, 2024

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

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

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::vectorstd::string& 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<size_t>("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 to TranslationTask(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 to TranslationTask(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

from marian.

emjotde avatar emjotde commented on August 20, 2024

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?

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

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

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

FYI
Commit 3a548b3 works with me as well

from marian.

shuoyangd avatar shuoyangd commented on August 20, 2024

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

from marian.

shuoyangd avatar shuoyangd commented on August 20, 2024

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

from marian.

hieuhoang avatar hieuhoang commented on August 20, 2024

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

from marian.

shuoyangd avatar shuoyangd commented on August 20, 2024

Everything works for me now. Thanks!

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

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

from marian.

mehmedes avatar mehmedes commented on August 20, 2024

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

from marian.

emjotde avatar emjotde commented on August 20, 2024

Great, thank you for bringing this to our attention.

from marian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.