AdolfVonKleist / Phonetisaurus

Phonetisaurus G2P
BSD 3-Clause "New" or "Revised" License
454 stars 122 forks source link

Make Error #11

Closed dthomas888 closed 7 years ago

dthomas888 commented 8 years ago

g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -I. -c lib/util.cc -o lib/util.o g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -I. -c lib/LatticePruner.cc -o lib/LatticePruner.o g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -I. -c lib/M2MFstAligner.cc -o lib/M2MFstAligner.o g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -L/usr/local/lib -lfst -ldl -lm -lrt -fopenmp -I/home/pi/Phonetisaurus/src \ lib/util.o lib/LatticePruner.o lib/M2MFstAligner.o \ bin/phonetisaurus-align.cc -DGIT_REVISION=\"09651e-dirty\" \ -o bin/phonetisaurus-align -lfst -ldl -lm -lrt -fopenmp g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -L/usr/local/lib -lfst -ldl -lm -lrt -fopenmp lib/util.o \ -I/home/pi/Phonetisaurus/src bin/phonetisaurus-arpa2wfst.cc -L/usr/local/lib \ -DGIT_REVISION=\"09651e-dirty\" \ -o bin/phonetisaurus-arpa2wfst -lfst -ldl -lm -lrt -fopenmp g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -std=c++0x -I. -lfst -lm -ldl \ -funroll-loops -ffast-math -lm -w -c 3rdparty/rnnlm/rnnlmlib.cpp \ -o lib/rnnlmlib.o g++ -std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -DGNUC -O2 -I3rdparty/utfcpp -I3rdparty/rnnlm -I/usr/local/include -lfst -ldl -lm -lrt -fopenmp -L/usr/local/lib -funroll-loops -I/home/pi/Phonetisaurus/src \ -ffast-math lib/util.o lib/rnnlmlib.o \ -DGIT_REVISION=\"09651e-dirty\" \ bin/phonetisaurus-g2prnn.cc -o bin/phonetisaurus-g2prnn -lfst -ldl -lm -lrt -fopenmp In file included from bin/phonetisaurus-g2prnn.cc:5:0: /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:168:50: error: wrong number of template arguments (3, should be 2) typedef Heap<Token, TokenPointerCompare, false> Queue; ^ In file included from /usr/local/include/fst/vector-fst.h:12:0, from /usr/local/include/fst/cache.h:16, from /usr/local/include/fst/compact-fst.h:14, from /usr/local/include/fst/fstlib.h:34, from bin/phonetisaurus-g2prnn.cc:1: /usr/local/include/fst/fst-decl.h:97:7: error: provided for ‘template<class T, class Compare> class fst::Heap’ class Heap; ^ In file included from bin/phonetisaurus-g2prnn.cc:5:0: /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h: In member function ‘RnnLMDecoder::RawResults RnnLMDecoder::DecodeRaw(const std::vectorstd::basicstring&, int, int, int, double)’: /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:247:18: error: request for member ‘Clear’ in ‘((RnnLMDecoder)this)->RnnLMDecoder::sQueue[i]’, which is of non-class type ‘gnu_cxx::__alloc_traitsstd::allocator::valuetype {aka int}’ sQueue [i].Clear (); ^ /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:256:26: error: request for member ‘Empty’ in ‘((RnnLMDecoder)this)->RnnLMDecoder::sQueue[s]’, which is of non-class type ‘gnu_cxx::alloc_traitsstd::allocator::valuetype {aka int}’ while (!sQueue [s].Empty () && k < kMax && n < nbest) { ^ /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:257:26: error: request for member ‘Pop’ in ‘((RnnLMDecoder)this)->RnnLMDecoder::sQueue[s]’, which is of non-class type ‘__gnu_cxx::alloc_traitsstd::allocator::valuetype {aka int}’ Token top = sQueue [s].Pop (); ^ /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:295:31: error: request for member ‘Insert’ in ‘((RnnLMDecoder_)this)->RnnLMDecoder::sQueue[arc.nextstate]’, which is of non-class type ‘gnu_cxx::__alloc_traitsstd::allocator::valuetype {aka int}’ sQueue [arc.nextstate].Insert (npointer); ^ /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:304:26: error: request for member ‘Insert’ in ‘((RnnLMDecoder)this)->RnnLMDecoder::sQueue[arc.nextstate]’, which is of non-class type ‘gnu_cxx::alloc_traitsstd::allocator::valuetype {aka int}’ sQueue [arc.nextstate].Insert ((Token)&(niterator)); ^ /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h: In member function ‘void RnnLMDecoder::Initialize()’: /home/pi/Phonetisaurus/src/include/RnnLMDecoder.h:326:28: error: request for member ‘Insert’ in ‘((RnnLMDecoder)this)->RnnLMDecoder::sQueue[0]’, which is of non-class type ‘__gnu_cxx::alloc_traitsstd::allocator::valuetype {aka int}’ prev->key = sQueue [0].Insert ((Token)&(_prev)); ^ Makefile:109: recipe for target 'bin/phonetisaurus-g2prnn' failed make: _* [bin/phonetisaurus-g2prnn] Error 1

imrehg commented 8 years ago

Looks like some of the function signatures have changed in OpenFst (at least version 1.5.1 has a two parameter signature, compared to the 3 parameter signature (as used in Phonetisaurus) up to and including version 1.5.0. So I think currently Phonetisaurus does not work with OpenFst 1.5.1 and newer (though trying to figure out the last working version, might be even earlier.

AdolfVonKleist commented 7 years ago

Yes several of the function signatures have changed. I have made openfst version specific branches to resolve these issues for a couple of the major branches, and am now moving to 1.6x for the default. I'm open to a general solution if one exists.