Ekho 6.0 在CentOS5.9 编译出错

发布于 2021-11-25 05:54:17 字数 10492 浏览 521 评论 2

@黄冠能 你好,想跟你请教个问题,我在CentOS5.9中编译Ekho 6.0出错,麻烦帮看一下,信息如下:

linux版本信息:

$ uname -a

Linux yakai.com 2.6.18-348.1.1.el5 #1 SMP Tue Jan 22 16:19:19 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

$ ./configure --enable-festival

.......

checking for GNU libc compatible malloc... yes
checking for working strtod... yes
checking for memset... yes
checking for setlocale... yes
checking for strstr... yes
checking for main in -lsndfile... yes
checking for main in -lpulse... yes
checking for main in -lncurses... yes
checking for main in -lestools... yes
checking for main in -lFestival... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

编译出错:

$make

make  all-am
make[1]: Entering directory `/usr/samgcung/ekho-6.0'
g++ -DHAVE_CONFIG_H -I.    -I./utfcpp/source -I./sonic -D_REENTRANT   -I/usr/include/festival -I/usr/include/speech_tools -I./sr-convert -DOUTPUT16BIT -D_`uname -p` -pthread  -g -O2 -O0 -MT src/libekho_a-libekho.o -MD -MP -MF src/.deps/libekho_a-libekho.Tpo -c -o src/libekho_a-libekho.o `test -f 'src/libekho.cpp' || echo './'`src/libekho.cpp
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/fstream.h:31,
                 from /usr/include/festival/festival.h:43,
                 from src/libekho.cpp:58:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/include/speech_tools/EST.h:46,
                 from /usr/include/festival/festival.h:44,
                 from src/libekho.cpp:58:
/usr/include/speech_tools/EST_String.h:38:35: error: est_string_config.h: No such file or directory
src/phonetic_symbol.h: In member function 'void ekho::PhoneticSymbol::readSndfile(SNDFILE*, SF_INFO)':
src/phonetic_symbol.h:193: error: 'SF_FORMAT_VORBIS' was not declared in this scope
/usr/include/speech_tools/EST_String.h: In member function 'void EST_String::make_updatable()':
/usr/include/speech_tools/EST_String.h:253: error: no matching function for call to 'make_updatable(EST_ChunkPtr&, int)'
/usr/include/speech_tools/ling_class/EST_Item.h: In function 'bool operator!=(const EST_Item&, const EST_Item&)':
/usr/include/speech_tools/ling_class/EST_Item.h:398: error: '::same_item' has not been declared
/usr/include/speech_tools/ling_class/EST_Item.h: In function 'bool operator==(const EST_Item&, const EST_Item&)':
/usr/include/speech_tools/ling_class/EST_Item.h:400: error: '::same_item' has not been declared
src/libekho.cpp: In member function 'int ekho::Ekho::init()':
src/libekho.cpp:79: error: expected primary-expression before '{' token
src/libekho.cpp:79: error: expected `;' before '{' token
src/libekho.cpp:1971: error: expected `}' at end of input
make[1]: *** [src/libekho_a-libekho.o] Error 1
make[1]: Leaving directory `/usr/samgcung/ekho-6.0'
make: *** [all] Error 2

根据下面提示更改后,编译还是报错:

更改libekho.cpp中:

1.替换

mPendingFrames = 0;

  mStripSsml = true;

  mSpeakIsolatedPunctuation = true;

  mSpeechQueueMutex = PTHREAD_MUTEX_INITIALIZER;

  mSpeechQueueCond = PTHREAD_COND_INITIALIZER;

  mEnglishVoice = "voice_kal_diphone";

替换为:

  this->mPendingFrames = 0;

  this->mStripSsml = true;

  this->mSpeakIsolatedPunctuation = true;

  pthread_mutex_init(&mSpeechQueueMutex, NULL);

  pthread_cond_init(&mSpeechQueueCond, NULL); 

  this->mEnglishVoice = "voice_kal_diphone";

2.替换

mSonicStream = 0;

  mPcmCache = true;

  替换为:

this->mSonicStream = 0;

  this->mPcmCache = true;

3.替换

mFliteVoice = 0;

为:

this->mFliteVoice = 0;

4.替换

memset(mAlphabetPcmCache, 0, 26);

  memset(mAlphabetPcmSize, 0, 26);

  mPuncMode = EKHO_PUNC_SOME;

为:

memset(this->mAlphabetPcmCache, 0, 26);

  memset(this->mAlphabetPcmSize, 0, 26);

  this->mPuncMode = EKHO_PUNC_SOME;


编译还是出错:

/usr/include/speech_tools/EST_String.h:38:35: error: est_string_config.h: No such file or directory
src/phonetic_symbol.h: In member function 'void ekho::PhoneticSymbol::readSndfile(SNDFILE*, SF_INFO)':
src/phonetic_symbol.h:193: error: 'SF_FORMAT_VORBIS' was not declared in this scope
/usr/include/speech_tools/EST_String.h: In member function 'void EST_String::make_updatable()':
/usr/include/speech_tools/EST_String.h:253: error: no matching function for call to 'make_updatable(EST_ChunkPtr&, int)'
/usr/include/speech_tools/ling_class/EST_Item.h: In function 'bool operator!=(const EST_Item&, const EST_Item&)':
/usr/include/speech_tools/ling_class/EST_Item.h:398: error: '::same_item' has not been declared
/usr/include/speech_tools/ling_class/EST_Item.h: In function 'bool operator==(const EST_Item&, const EST_Item&)':
/usr/include/speech_tools/ling_class/EST_Item.h:400: error: '::same_item' has not been declared
src/libekho.cpp: At global scope:
src/libekho.cpp:113: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:113: error: expected `)' before 'voice'
src/libekho.cpp: In member function 'int ekho::Ekho::initFestival()':
src/libekho.cpp:254: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:254: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:254: error: expected `;' before 'path'
src/libekho.cpp:255: error: 'path' was not declared in this scope
src/libekho.cpp: At global scope:
src/libekho.cpp:274: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:274: error: 'int ekho::Ekho::saveWav' is not a static member of 'class ekho::Ekho'
src/libekho.cpp:274: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:274: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:274: error: reference to 'string' is ambiguous
/usr/include/speech_tools/EST_Val.h:257: error: candidates are: EST_String string(const EST_Val&)
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stringfwd.h:60: error:                 typedef struct std::basic_string<char, std::char_traits<char>, std::allocator<char> > std::string
src/libekho.cpp:274: error: initializer expression list treated as compound expression
src/libekho.cpp:274: error: expected ',' or ';' before '{' token
make[1]: *** [src/libekho_a-libekho.o] Error 1
make[1]: Leaving directory `/usr/samgcung/ekho-6.0'
make: *** [all] Error 2


麻烦帮忙看一下,谢谢

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不乱于心 2021-11-28 07:06:51

神速啊,谢谢

猫九 2021-11-26 17:20:46

初步看来,系统软件太旧,无法解决依赖关系(比如sndfile、festival、esttool),你需要根据INSTALL文件里的依赖安装新一些的版本,不过我建议你安装新一些的系统更简单。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文