Closed GoogleCodeExporter closed 9 years ago
I included string.h and limit header in the source code and I am getting the
following error now
gfortran -g -fPIC -fmessage-length=0 -O2 -DNDEBUG -funroll-loops -c -o
src/optimize/lbfgsb.o src/optimize/lbfgsb.f
gfortran -g -fPIC -fmessage-length=0 -O2 -DNDEBUG -funroll-loops -c -o
src/optimize/lbfgs.o src/optimize/lbfgs.f
g++ -g -Wall -fPIC -fmessage-length=0 -Isrc -O2 -DNDEBUG -funroll-loops -c -o
src/estimate-ngram.o src/estimate-ngram.cpp
g++ -g -Wall -fPIC -fmessage-length=0 -Isrc -O2 -DNDEBUG -funroll-loops -c -o
src/interpolate-ngram.o src/interpolate-ngram.cpp
g++ -g -Wall -fPIC -fmessage-length=0 -Isrc -O2 -DNDEBUG -funroll-loops -c -o
src/evaluate-ngram.o src/evaluate-ngram.cpp
In file included from
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/ext/hash_map:
59,
from src/util/CommandOptions.h:36,
from src/evaluate-ngram.cpp:36:
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/backward/back
ward_warning.h:28:2:
warning: #warning This file includes at least one deprecated or antiquated
header
which may be removed without further notice at a future date. Please use a
non-deprecated interface with equivalent functionality instead. For a listing of
replacement headers and interfaces, consult the file backward_warning.h. To
disable
this warning use -Wno-deprecated.
In file included from
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/ext/hash_map:
59,
from src/util/CommandOptions.h:36,
from src/estimate-ngram.cpp:36:
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/backward/back
ward_warning.h:28:2:
warning: #warning This file includes at least one deprecated or antiquated
header
which may be removed without further notice at a future date. Please use a
non-deprecated interface with equivalent functionality instead. For a listing of
replacement headers and interfaces, consult the file backward_warning.h. To
disable
this warning use -Wno-deprecated.
ar rcs libmitlm.a src/util/RefCounter.o src/util/Logger.o
src/util/CommandOptions.o
src/Vocab.o src/NgramVector.o src/NgramModel.o src/NgramLM.o
src/InterpolatedNgramLM.o src/Smoothing.o src/MaxLikelihoodSmoothing.o
src/KneserNeySmoothing.o src/PerplexityOptimizer.o src/WordErrorRateOptimizer.o
src/Lattice.o src/optimize/lbfgsb.o src/optimize/lbfgs.o
g++ src/estimate-ngram.o -o estimate-ngram -L. -lmitlm -lgfortran -O2
-funroll-loops
g++ src/evaluate-ngram.o -o evaluate-ngram -L. -lmitlm -lgfortran -O2
-funroll-loops
./libmitlm.a(NgramLM.o): In function
`NgramLMBase::SetModel(SharedPtr<NgramModel>
const&, DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:121: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:123: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
./libmitlm.a(NgramLM.o): In function `NgramLM::SetModel(SharedPtr<NgramModel>
const&,
DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:369: undefined
reference to `void NgramModel::ApplySort<int>(DenseVector<int> const&,
DenseVector<int>&, unsigned int, int)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:371: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
collect2: ld returned 1 exit status
./libmitlm.a(NgramLM.o): In function
`NgramLMBase::SetModel(SharedPtr<NgramModel>
const&, DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:121: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:123: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
./libmitlm.a(NgramLM.o): In function `NgramLM::SetModel(SharedPtr<NgramModel>
const&,
DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:make: 369:***
[evaluate-ngram] Error 1
undefined reference to `make: *** Waiting for unfinished jobs....
void NgramModel::ApplySort<int>(DenseVector<int> const&, DenseVector<int>&,
unsigned
int, int)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:371: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
collect2: ld returned 1 exit status
make: *** [estimate-ngram] Error 1
In file included from
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/ext/hash_map:
59,
from src/util/CommandOptions.h:36,
from src/interpolate-ngram.cpp:36:
/usr/lib/gcc/i686-redhat-linux/4.4.2/../../../../include/c++/4.4.2/backward/back
ward_warning.h:28:2:
warning: #warning This file includes at least one deprecated or antiquated
header
which may be removed without further notice at a future date. Please use a
non-deprecated interface with equivalent functionality instead. For a listing of
replacement headers and interfaces, consult the file backward_warning.h. To
disable
this warning use -Wno-deprecated.
[jaganadhg@jaganadhg mitlm.0.4]$ ls
libmitlm.a LICENSE Makefile Makefile_old README src
[jaganadhg@jaganadhg mitlm.0.4]$
[jaganadhg@jaganadhg mitlm.0.4]$ make -j
g++ src/estimate-ngram.o -o estimate-ngram -L. -lmitlm -lgfortran -O2
-funroll-loops
g++ src/interpolate-ngram.o -o interpolate-ngram -L. -lmitlm -lgfortran -O2
-funroll-loops
g++ src/evaluate-ngram.o -o evaluate-ngram -L. -lmitlm -lgfortran -O2
-funroll-loops
./libmitlm.a(NgramLM.o): In function
`NgramLMBase::SetModel(SharedPtr<NgramModel>
const&, DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:121: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:123: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
./libmitlm.a(NgramLM.o): In function `NgramLM::SetModel(SharedPtr<NgramModel>
const&,
DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:369: undefined
reference to `void NgramModel::ApplySort<int>(DenseVector<int> const&,
DenseVector<int>&, unsigned int, int)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:371: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
collect2: ld returned 1 exit status
make: *** [evaluate-ngram] Error 1
make: *** Waiting for unfinished jobs....
./libmitlm.a(NgramLM.o): In function
`NgramLMBase::SetModel(SharedPtr<NgramModel>
const&, DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:121: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:123: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
./libmitlm.a(NgramLM.o): In function `NgramLM::SetModel(SharedPtr<NgramModel>
const&,
DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:369: undefined
reference to `void NgramModel::ApplySort<int>(DenseVector<int> const&,
DenseVector<int>&, unsigned int, int)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:371: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
collect2: ld returned 1 exit status
make: *** [estimate-ngram] Error 1
./libmitlm.a(NgramLM.o): In function
`NgramLMBase::SetModel(SharedPtr<NgramModel>
const&, DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:121: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:123: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
./libmitlm.a(NgramLM.o): In function `NgramLM::SetModel(SharedPtr<NgramModel>
const&,
DenseVector<int> const&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > > const&)':
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:369: undefined
reference to `void NgramModel::ApplySort<int>(DenseVector<int> const&,
DenseVector<int>&, unsigned int, int)'
/home/jaganadhg/Desktop/speech-paper/mitlm.0.4/src/NgramLM.cpp:371: undefined
reference to `void NgramModel::ApplySort<double>(DenseVector<int> const&,
DenseVector<double>&, unsigned int, double)'
collect2: ld returned 1 exit status
make: *** [interpolate-ngram] Error 1
Original comment by jagana...@gmail.com
on 17 Jan 2010 at 1:39
Hi, check out the thread about compiling mitlm in ubuntu:
http://code.google.com/p/mitlm/issues/detail?id=14
Original comment by michal.f...@gmail.com
on 18 Jan 2010 at 11:06
All these issues should be fixed now.
Can you confirm? (refers to http://code.google.com/p/mitlm/issues/detail?id=14
for instructions)
Original comment by giuliop...@gmail.com
on 17 Nov 2010 at 11:08
Original comment by giuliop...@gmail.com
on 29 Jan 2013 at 7:13
Hi,
I try to setup mitln0.4, but some error messages are shown as following.
Instead of using Federa, I used window and cygwin with gcc 4.3.4......
Have you ever seen such errors as following......
I have no idea about it :-(
g++ src/estimate-ngram.o -o estimate-ngram -L. -lg2c -lmitlm -O3
-funroll-loops
./libmitlm.a(NgramLM.o):/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/s
rc/NgramLM.cpp:369: undefined reference to `void
NgramModel::ApplySort<int>(DenseVector<int> const&, DenseVector<int>&, unsigned
int, int)'
./libmitlm.a(lbfgs.o): In function `lbfgs_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:246:
undefined reference to `_s_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:246:
undefined reference to `_e_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:411:
undefined reference to `_s_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:411:
undefined reference to `_e_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:477:
undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:477:
undefined reference to `_do_fio'
./libmitlm.a(lbfgs.o):/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src
/optimize/lbfgs.f:477: more undefined references to `_do_fio' follow
./libmitlm.a(lbfgs.o): In function `lb1_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:477:
undefined reference to `_e_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:479:
undefined reference to `_s_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:479:
undefined reference to `_e_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:480:
undefined reference to `_s_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgs.f:480:
undefined reference to `_do_fio'
./libmitlm.a(lbfgsb.o):/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/sr
c/optimize/lbfgsb.f:2650: more undefined references to `_do_fio' follow
./libmitlm.a(lbfgsb.o): In function `prn1lb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
0: undefined reference to `_e_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_s_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_do_fio'
./libmitlm.a(lbfgsb.o):/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/sr
c/optimize/lbfgsb.f:2651: more undefined references to `_do_fio' follow
./libmitlm.a(lbfgsb.o): In function `prn1lb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
1: undefined reference to `_e_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_s_wsfe'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_do_fio'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_do_fio'
./libmitlm.a(lbfgsb.o): In function `lnsrlb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:244
3: undefined reference to `_s_cmp'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:250
5: undefined reference to `_s_cmp'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:250
5: undefined reference to `_s_cmp'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:250
6: undefined reference to `_s_copy'
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:248
9: undefined reference to `_s_copy'
./libmitlm.a(lbfgsb.o): In function `prn1lb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:265
2: undefined reference to `_e_wsfe'
./libmitlm.a(lbfgsb.o): In function `prn2lb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:273
9: undefined reference to `_e_wsfe'
./libmitlm.a(lbfgsb.o): In function `prn3lb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:283
1: undefined reference to `_e_wsfe'
./libmitlm.a(lbfgsb.o): In function `lnsrlb_':
/home/kheangseng/OtherSoftware/Phonetisaurus/mitlm.0.4/src/optimize/lbfgsb.f:251
8: undefined reference to `_s_copy'
collect2: ld returned 1 exit status
make: *** [estimate-ngram] Error 1
Seng...
Original comment by kheangs...@gmail.com
on 14 Feb 2013 at 12:38
Attachments:
[deleted comment]
This issue is unrelated with mitlm not compiling on Fedora 12.
Please open a new issue about mitlm not compiling on cygwin instead.
This said, probably the fix is just in the order of -lg2c and -lmitlm. As far
as I can tell without trying, the correct command line should be:
g++ src/estimate-ngram.o -o estimate-ngram -L. -lmitlm -lg2c -O3 -funroll-loops
Be aware that mitlm has not been tested very much on Windows.
Original comment by giuliop...@gmail.com
on 14 Feb 2013 at 4:10
Original issue reported on code.google.com by
jagana...@gmail.com
on 17 Jan 2010 at 12:26