jiaxibei2008 / mitlm

Automatically exported from code.google.com/p/mitlm
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

mitlm Fedora 12 compilation errpr #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Doenload mitlm.0.4. and extract it
2. goto the mitlm.0.4 dir
3. run make -j 

What is the expected output? What do you see instead?

Succesful compilation of the tool
What version of the product are you using? On what operating system?
mitlm0.4 
Os - fedora12

Please provide any additional information below.
error
src/vector/VectorOps.h:168: error: expected primary-expression before ‘>’ 
token
src/vector/VectorOps.h:168: error: no matching function for call to ‘min()’
In file included from src/NgramModel.h:42,
                 from src/NgramModel.cpp:43:
src/Vocab.h: In member function ‘VocabIndex Vocab::Find(const char*) const’:
src/Vocab.h:78: error: ‘strlen’ was not declared in this scope
src/Vocab.h: In member function ‘VocabIndex Vocab::Add(const char*)’:
src/Vocab.h:80: error: ‘strlen’ was not declared in this scope
src/NgramModel.cpp: In member function ‘void
NgramModel::LoadCorpus(std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > >&, ZFile&, bool)’:
src/NgramModel.cpp:93: error: ‘strncmp’ was not declared in this scope
src/NgramModel.cpp:93: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp: In member function ‘void
NgramModel::LoadLM(std::vector<DenseVector<double>,
std::allocator<DenseVector<double> > >&, std::vector<DenseVector<double>,
std::allocator<DenseVector<double> > >&, ZFile&)’:
src/NgramModel.cpp:264: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp:297: error: ‘strlen’ was not declared in this scope
src/NgramModel.cpp:323: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp:344: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp: In member function ‘void
NgramModel::LoadEvalCorpus(std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > >&, std::vector<DenseVector<int>,
std::allocator<DenseVector<int> > >&, BitVector&, ZFile&, size_t&, size_t&)
const’:
src/NgramModel.cpp:478: error: ‘strncmp’ was not declared in this scope
src/NgramModel.cpp:478: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp: In member function ‘void
NgramModel::LoadComputedFeatures(std::vector<DenseVector<double>,
std::allocator<DenseVector<double> > >&, const char*, size_t) const’:
src/NgramModel.cpp:586: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp:611: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp: In member function ‘void
NgramModel::_LoadFrequency(std::vector<DenseVector<double>,
std::allocator<DenseVector<double> > >&, ZFile&, size_t) const’:
src/NgramModel.cpp:858: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp:870: error: ‘strncmp’ was not declared in this scope
src/NgramModel.cpp: In member function ‘void
NgramModel::_LoadEntropy(std::vector<DenseVector<double>,
std::allocator<DenseVector<double> > >&, ZFile&, size_t) const’:
src/NgramModel.cpp:937: error: ‘strcmp’ was not declared in this scope
src/NgramModel.cpp:951: error: ‘strncmp’ was not declared in this scope
make: *** [src/NgramModel.o] 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/RefCounter.h:38,
                 from src/util/SharedPtr.h:38,
                 from src/NgramLM.h:39,
                 from src/KneserNeySmoothing.cpp:37:
/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 src/vector/DenseVector.tcc:40,
                 from src/vector/DenseVector.h:144,
                 from src/Types.h:40,
                 from src/NgramLM.h:41,
                 from src/KneserNeySmoothing.cpp:38:
src/util/FastIO.h: In function ‘bool getline(FILE*, char*, size_t)’:
src/util/FastIO.h:111: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h: In function ‘bool getline(FILE*, char*, size_t, 
size_t*)’:
src/util/FastIO.h:123: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h: In function ‘void WriteHeader(FILE*, const char*)’:
src/util/FastIO.h:184: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h: In function ‘void VerifyHeader(FILE*, const char*)’:
src/util/FastIO.h:237: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h:239: error: ‘strncmp’ was not declared in this scope
In file included from src/Types.h:42,
                 from src/NgramLM.h:41,
                 from src/KneserNeySmoothing.cpp:38:
src/vector/VectorOps.h: In function ‘typename V::ElementType min(const
Vector<I>&)’:
src/vector/VectorOps.h:159: error: ‘numeric_limits’ is not a member of 
‘std’
src/vector/VectorOps.h:159: error: expected primary-expression before ‘>’ 
token
src/vector/VectorOps.h:159: error: ‘::max’ has not been declared
src/vector/VectorOps.h: In function ‘typename V::ElementType max(const
Vector<I>&)’:
src/vector/VectorOps.h:168: error: ‘numeric_limits’ is not a member of 
‘std’
src/vector/VectorOps.h:168: error: expected primary-expression before ‘>’ 
token
src/vector/VectorOps.h:168: error: no matching function for call to ‘min()’
In file included from src/Vocab.h:41,
                 from src/NgramLM.h:42,
                 from src/KneserNeySmoothing.cpp:38:
src/util/ZFile.h: In member function ‘bool ZFile::endsWith(const char*,
const char*)’:
src/util/ZFile.h:51: error: ‘strlen’ was not declared in this scope
src/util/ZFile.h:54: error: ‘strncmp’ was not declared in this scope
In file included from src/NgramLM.h:42,
                 from src/KneserNeySmoothing.cpp:38:
src/Vocab.h: In member function ‘VocabIndex Vocab::Find(const char*) const’:
src/Vocab.h:78: error: ‘strlen’ was not declared in this scope
src/Vocab.h: In member function ‘VocabIndex Vocab::Add(const char*)’:
src/Vocab.h:80: error: ‘strlen’ was not declared in this scope
In file included from src/vector/DenseVector.h:144,
                 from src/Types.h:40,
                 from src/NgramLM.h:41,
                 from src/KneserNeySmoothing.cpp:38:
src/vector/DenseVector.tcc: In member function ‘void DenseVector<T>::set(T)
[with T = double]’:
src/KneserNeySmoothing.cpp:163:   instantiated from here
src/vector/DenseVector.tcc:366: error: ‘memset’ was not declared in this 
scope
make: *** [src/KneserNeySmoothing.o] 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/RefCounter.h:38,
                 from src/vector/DenseVector.tcc:37,
                 from src/vector/DenseVector.h:143,
                 from src/Types.h:39,
                 from src/Lattice.h:41,
                 from src/Lattice.cpp:41:
/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 src/Lattice.cpp:41:
src/util/FastIO.h: In function ‘bool getline(FILE*, char*, size_t)’:
src/util/FastIO.h:111: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h: In function ‘bool getline(FILE*, char*, size_t, 
size_t*)’:
src/util/FastIO.h:123: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h: In function ‘void WriteHeader(FILE*, const char*)’:
src/util/FastIO.h:184: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h: In function ‘void VerifyHeader(FILE*, const char*)’:
src/util/FastIO.h:237: error: ‘strlen’ was not declared in this scope
src/util/FastIO.h:239: error: ‘strncmp’ was not declared in this scope
In file included from src/Lattice.h:41,
                 from src/Lattice.cpp:42:
src/util/ZFile.h: In member function ‘bool ZFile::endsWith(const char*,
const char*)’:
src/util/ZFile.h:51: error: ‘strlen’ was not declared in this scope
src/util/ZFile.h:54: error: ‘strncmp’ was not declared in this scope
In file included from src/NgramLM.h:42,
                 from src/Lattice.h:43,
                 from src/Lattice.cpp:42:
src/Vocab.h: In member function ‘VocabIndex Vocab::Find(const char*) const’:
src/Vocab.h:78: error: ‘strlen’ was not declared in this scope
src/Vocab.h: In member function ‘VocabIndex Vocab::Add(const char*)’:
src/Vocab.h:80: error: ‘strlen’ was not declared in this scope
src/Lattice.cpp: In member function ‘void Lattice::LoadLattice(ZFile&)’:
src/Lattice.cpp:109: error: ‘strcmp’ was not declared in this scope
src/Lattice.cpp:112: error: ‘strcmp’ was not declared in this scope
make: *** [src/Lattice.o] Error 1

Original issue reported on code.google.com by jagana...@gmail.com on 17 Jan 2010 at 12:26

GoogleCodeExporter commented 8 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago

Original comment by giuliop...@gmail.com on 29 Jan 2013 at 7:13

GoogleCodeExporter commented 8 years ago
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:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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