Compilando um kit de ferramentas de reconhecimento de fala no Ubuntu Gnome

1

Eu tentei compilar o kit de ferramentas SHoUT LVCSR no meu Ubuntu Gnome e recebi os erros abaixo:

aclocal
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
autoheader
automake
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:4: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info, see:
configure.in:4: http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTOMAKE-invocation
src/Makefile.am:1: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
automake: warning: autoconf input should be named 'configure.ac', not 'configure.in'
autoconf
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/namely/release-2010-version-0-3/missing: Unknown '--is-lightweight' option
Try '/home/namely/release-2010-version-0-3/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: executing depfiles commands
make  all-recursive
make[1]: Entering directory '/home/namely/release-2010-version-0-3/release'
Making all in src
make[2]: Entering directory '/home/namely/release-2010-version-0-3/release/src'
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT gaussian.o -MD -MP -MF .deps/gaussian.Tpo -c -o gaussian.o ../../src/gaussian.cc
mv -f .deps/gaussian.Tpo .deps/gaussian.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT languagemodel.o -MD -MP -MF .deps/languagemodel.Tpo -c -o languagemodel.o ../../src/languagemodel.cpp
mv -f .deps/languagemodel.Tpo .deps/languagemodel.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT lexicaltree.o -MD -MP -MF .deps/lexicaltree.Tpo -c -o lexicaltree.o ../../src/lexicaltree.cpp
../../src/lexicaltree.cpp: In member function ‘void LexicalTree::touchWLRpath(WLRType*)’:
../../src/lexicaltree.cpp:2513:42: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       w->nBest[NBEST_DEPTH] = ((WLRType*)timeStamp);
                                          ^
../../src/lexicaltree.cpp: In member function ‘void LexicalTree::processVector_administrationCleanup()’:
../../src/lexicaltree.cpp:2886:45: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     if(ww->nBest[NBEST_DEPTH] != ((WLRType*)timeStamp))
                                             ^
mv -f .deps/lexicaltree.Tpo .deps/lexicaltree.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT mixgaussian.o -MD -MP -MF .deps/mixgaussian.Tpo -c -o mixgaussian.o ../../src/mixgaussian.cc
mv -f .deps/mixgaussian.Tpo .deps/mixgaussian.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT phonemodel.o -MD -MP -MF .deps/phonemodel.Tpo -c -o phonemodel.o ../../src/phonemodel.cpp
mv -f .deps/phonemodel.Tpo .deps/phonemodel.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT vector.o -MD -MP -MF .deps/vector.Tpo -c -o vector.o ../../src/vector.cc
mv -f .deps/vector.Tpo .deps/vector.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT hash.o -MD -MP -MF .deps/hash.Tpo -c -o hash.o ../../src/hash.cpp
mv -f .deps/hash.Tpo .deps/hash.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT phonefilereader.o -MD -MP -MF .deps/phonefilereader.Tpo -c -o phonefilereader.o ../../src/phonefilereader.cpp
mv -f .deps/phonefilereader.Tpo .deps/phonefilereader.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT featurepool.o -MD -MP -MF .deps/featurepool.Tpo -c -o featurepool.o ../../src/featurepool.cpp
mv -f .deps/featurepool.Tpo .deps/featurepool.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT featureextraction.o -MD -MP -MF .deps/featureextraction.Tpo -c -o featureextraction.o ../../src/featureextraction.cpp
mv -f .deps/featureextraction.Tpo .deps/featureextraction.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT FFTReal.o -MD -MP -MF .deps/FFTReal.Tpo -c -o FFTReal.o ../../src/FFTReal.cpp
mv -f .deps/FFTReal.Tpo .deps/FFTReal.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT multimixgaussian.o -MD -MP -MF .deps/multimixgaussian.Tpo -c -o multimixgaussian.o ../../src/multimixgaussian.cpp
mv -f .deps/multimixgaussian.Tpo .deps/multimixgaussian.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT shout_misc.o -MD -MP -MF .deps/shout_misc.Tpo -c -o shout_misc.o ../../src/shout_misc.cpp
mv -f .deps/shout_misc.Tpo .deps/shout_misc.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT shoutconfig.o -MD -MP -MF .deps/shoutconfig.Tpo -c -o shoutconfig.o ../../src/shoutconfig.cpp
mv -f .deps/shoutconfig.Tpo .deps/shoutconfig.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT stringlookup.o -MD -MP -MF .deps/stringlookup.Tpo -c -o stringlookup.o ../../src/stringlookup.cpp
mv -f .deps/stringlookup.Tpo .deps/stringlookup.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT trainphonemodel.o -MD -MP -MF .deps/trainphonemodel.Tpo -c -o trainphonemodel.o ../../src/trainphonemodel.cpp
mv -f .deps/trainphonemodel.Tpo .deps/trainphonemodel.Po
rm -f libshout_basics.a
ar cru libshout_basics.a gaussian.o languagemodel.o lexicaltree.o mixgaussian.o phonemodel.o vector.o hash.o phonefilereader.o featurepool.o featureextraction.o FFTReal.o multimixgaussian.o shout_misc.o shoutconfig.o stringlookup.o trainphonemodel.o 
ar: 'u' modifier ignored since 'D' is the default (see 'U')
ranlib libshout_basics.a
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT whisper.o -MD -MP -MF .deps/whisper.Tpo -c -o whisper.o ../../src/whisper.cpp
mv -f .deps/whisper.Tpo .deps/whisper.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT shout_maketrainset.o -MD -MP -MF .deps/shout_maketrainset.Tpo -c -o shout_maketrainset.o ../../src/shout_maketrainset.cpp
mv -f .deps/shout_maketrainset.Tpo .deps/shout_maketrainset.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT adapt_am_treenode.o -MD -MP -MF .deps/adapt_am_treenode.Tpo -c -o adapt_am_treenode.o ../../src/adapt_am_treenode.cpp
mv -f .deps/adapt_am_treenode.Tpo .deps/adapt_am_treenode.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT segmenter.o -MD -MP -MF .deps/segmenter.Tpo -c -o segmenter.o ../../src/segmenter.cpp
mv -f .deps/segmenter.Tpo .deps/segmenter.Po
g++ -DHAVE_CONFIG_H -I. -I../../src -I..     -O3 -funroll-loops -mfpmath=sse -msse -msse2 -MT articulatorystream.o -MD -MP -MF .deps/articulatorystream.Tpo -c -o articulatorystream.o ../../src/articulatorystream.cpp
mv -f .deps/articulatorystream.Tpo .deps/articulatorystream.Po
g++  -O3 -funroll-loops -mfpmath=sse -msse -msse2  -lpthread -o shout whisper.o shout_maketrainset.o adapt_am_treenode.o segmenter.o articulatorystream.o ../src/libshout_basics.a 
../src/libshout_basics.a(lexicaltree.o): In function 'LexicalTree::LexicalTree(_IO_FILE*)':
lexicaltree.cpp:(.text+0xd77): undefined reference to 'pthread_create'
../src/libshout_basics.a(lexicaltree.o): In function 'LexicalTree::setTreeStartEndMatrix()':
lexicaltree.cpp:(.text+0x2a61): undefined reference to 'pthread_create'
../src/libshout_basics.a(lexicaltree.o): In function 'LexicalTree::LexicalTree(_IO_FILE*, _IO_FILE*, bool)':
lexicaltree.cpp:(.text+0x3c45): undefined reference to 'pthread_create'
../src/libshout_basics.a(lexicaltree.o): In function 'LexicalTree::~LexicalTree()':
lexicaltree.cpp:(.text+0xb7da): undefined reference to 'pthread_join'
collect2: error: ld returned 1 exit status
Makefile:633: recipe for target 'shout' failed
make[2]: *** [shout] Error 1
make[2]: Leaving directory '/home/namely/release-2010-version-0-3/release/src'
Makefile:353: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/namely/release-2010-version-0-3/release'
Makefile:294: recipe for target 'all' failed
make: *** [all] Error 2
    
por Y.Patrick 14.04.2016 / 18:35

1 resposta

0

A compilação funciona aqui com um pequeno ajuste:

sudo apt-get install build-essential automake
mkdir $HOME/shout_build && cd $HOME/shout_build 
wget http://downloads.sourceforge.net/project/shout-toolkit/release-2010-version-0-3.tar.gz
tar xvf release-2010-version-0-3.tar.gz && cd release-2010-version-0-3
sed -i_bak 's/LDFLAGS="-lpthread"/LDFLAGS="-pthread"/' configure-make.sh
./configure-make.sh

Isso deixa os executáveis construídos em $HOME/shout_build/release-2010-version-0-3/release/src , pois não há um destino de instalação gravado. Você teria que transferi-los manualmente para alguma parte do seu PATH, como /usr/local/bin ou $HOME/bin . Isso pode ser um pouco feio:

cd $HOME/shout_build/release-2010-version-0-3/release/src
sudo mv -v \
shout shout_maketrainset shout_preprocess shout_train_mmi \
shout_adapt_am shout_merge_am shout_segment shout_train_model \
shout_avgEnergy shout_merge_trainset shout_spkrec shout_update_version \
shout_cluster shout_normalize_am shout_spkrec_stats shout_vtln \
shout_dct2lextree shout_online shout_train_finish \
shout_lm2bin shout_prepare_adapt shout_train_finish_sat \
/usr/local/bin

Mas isso funcionou bem no meu sistema e pode ser facilmente revertido:

cd /usr/local/bin
sudo rm -v \
shout shout_maketrainset shout_preprocess shout_train_mmi \
shout_adapt_am shout_merge_am shout_segment shout_train_model \
shout_avgEnergy shout_merge_trainset shout_spkrec shout_update_version \
shout_cluster shout_normalize_am shout_spkrec_stats shout_vtln \
shout_dct2lextree shout_online shout_train_finish \
shout_lm2bin shout_prepare_adapt shout_train_finish_sat

As bibliotecas geradas pelo processo de construção permanecem na pasta src ...

    
por andrew.46 15.04.2016 / 01:27