festvox / speech_tools

Edinburgh Speech Tools
Other
56 stars 25 forks source link

Fix building with GCC-10 #21

Closed Peter-Levine closed 4 years ago

Peter-Levine commented 4 years ago

Building with GCC-10 fails with

x86_64-pc-linux-gnu-g++ -shared -o libestools.so.2.5.0.1 -Wl,-soname,libestools.so.2.5.0.1 shared_space/*.o  $libs
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: shared_space/siodeditline.o:(.data.rel.local+0x8): multiple definition of `editline_history_file'; shared_space/editline.o:(.bss+0x28): first defined here

GCC-10 now defaults to using -fno-common. This causes any global declarations without extern specifier to be treated as a definition. editline_history_file is defined and initialized in siodeditline.c. An extern qualified forward declaration is already included from editline.h. Removing the erroneous redundant definition from editline.c resolves the issue.

Fixes https://github.com/festvox/speech_tools/issues/20.