Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error #66

Closed
beew opened this issue Apr 29, 2023 · 1 comment
Closed

build error #66

beew opened this issue Apr 29, 2023 · 1 comment

Comments

@beew
Copy link

beew commented Apr 29, 2023

Hi, I tried to build echko from master, it failed with these errors

src/phonetic_symbol.cpp: In member function ‘const char* ekho::PhoneticSymbol::getPcm(FILE*, int&)’:
src/phonetic_symbol.cpp:78:16: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   78 |           fread(buffer, 1, b, file);
      |           ~~~~~^~~~~~~~~~~~~~~~~~~~
src/phonetic_symbol.cpp:83:16: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   83 |           fread(buffer, 128000, b, file);
      |           ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
src/english.cpp: In member function ‘void ekho::EkhoImpl::initEnglish()’:
src/english.cpp:64:5: error: ‘festival_initialize’ was not declared in this scope; did you mean ‘espeak_Initialize’?
   64 |     festival_initialize(load_init_files, heap_size);
      |     ^~~~~~~~~~~~~~~~~~~
      |     espeak_Initialize
src/english.cpp:69:29: error: ‘strintern’ was not declared in this scope; did you mean ‘strnlen’?
   69 |     siod_set_lval("libdir", strintern(path.c_str()));
      |                             ^~~~~~~~~
      |                             strnlen
src/english.cpp:69:5: error: ‘siod_set_lval’ was not declared in this scope
   69 |     siod_set_lval("libdir", strintern(path.c_str()));
      |     ^~~~~~~~~~~~~
src/english.cpp:73:5: error: ‘festival_load_file’ was not declared in this scope
   73 |     festival_load_file(path.c_str());
      |     ^~~~~~~~~~~~~~~~~~
src/english.cpp:82:5: error: ‘festival_tidy_up’ was not declared in this scope
   82 |     festival_tidy_up();
      |     ^~~~~~~~~~~~~~~~
mv -f src/.deps/libekho_a-ssml.Tpo src/.deps/libekho_a-ssml.Po
g++ -DHAVE_CONFIG_H -I.    -Wall -DEKHO_DATA_PATH='"/home/bernard/opt/ekho/share/ekho-data"' -g -D_REENTRANT -I/usr/include/festival -I/usr/include/speech_tools  -pthread -std=c++11  -g -O2 -MT src/libekho_a-ekho_dict.o -MD -MP -MF src/.deps/libekho_a-ekho_dict.Tpo -c -o src/libekho_a-ekho_dict.o `test -f 'src/ekho_dict.cpp' || echo './'`src/ekho_dict.cpp
src/english.cpp: In member function ‘const char* ekho::EkhoImpl::getPcmFromFestival(std::string, int&)’:
src/english.cpp:223:5: error: ‘festival_eval_command’ was not declared in this scope
  223 |     festival_eval_command(cmd);
      |     ^~~~~~~~~~~~~~~~~~~~~
src/english.cpp:242:3: error: ‘EST_Wave’ was not declared in this scope
  242 |   EST_Wave wave;
      |   ^~~~~~~~
src/test_ekho.cpp: In function ‘int main(int, char**)’:
src/test_ekho.cpp:66:9: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   66 |   system("./ekho -l \"列出拼音\"");
      |   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/english.cpp:243:39: error: ‘wave’ was not declared in this scope
  243 |   festival_text_to_wave(text.c_str(), wave);
      |                                       ^~~~
src/libekho.cpp: In member function ‘short int* ekho::Ekho::synth3(std::string, int&)’:
src/libekho.cpp:227:12: warning: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  227 |       fread(pcm, 2, samples, f);
      |       ~~~~~^~~~~~~~~~~~~~~~~~~~
src/english.cpp:243:3: error: ‘festival_text_to_wave’ was not declared in this scope
  243 |   festival_text_to_wave(text.c_str(), wave);
      |   ^~~~~~~~~~~~~~~~~~~~~
src/english.cpp:249:3: error: ‘EST_TVector’ was not declared in this scope
  249 |   EST_TVector<short> tvector;
      |   ^~~~~~~~~~~
src/english.cpp:249:15: error: expected primary-expression before ‘short’
  249 |   EST_TVector<short> tvector;
      |               ^~~~~
src/english.cpp:250:16: error: ‘tvector’ was not declared in this scope
  250 |   wave.channel(tvector, 0);

OS is Ubuntu 22.04. Tried gcc 11.30 and 9.50

ekho version v8.9.3-16-g3899e5a

ekho configured with

./configure --prefix=/home/bernard/opt/ekho --enable-festival --with-mp3lame=yes
@hgneng
Copy link
Owner

hgneng commented May 4, 2023

Please remove --enable-festival option, it's a bit hard to build with Festival and not recommended.

Let me know if you do want to build with Festival and I will try to write a new instruction for it.

@hgneng hgneng closed this as completed Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants