0

Directions I found to compile

I have tried using the directions to compile Festival from Festvox latest (no update since 2010) using Visual studio 2013 to compile Speech Tools

nmake /nologo /FVCMakefile > output.txt

slib_doc.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2988: unrecognizable template declaration/definition
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2143: syntax error : missing ';' before '{'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2447: '{' : missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnan' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnan' : symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnormal' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnormal' : symbol cannot be used in a using-declaration

Try to compile Festival

nmake /nologo /FVCMakefile > output.txt
festival.cc
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2988: unrecognizable template declaration/definition
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2143: syntax error : missing ';' before '{'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2447: '{' : missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnan' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnan' : symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnormal' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnormal' : symbol cannot be used in a using-declaration

I tried to also compile this version of speech tools I found on Github.
Github repo with speech tools I get a lot of errors like

speech-tools\include\EST_String.h(156) : error C2061: syntax error : identifier 'ssize_t'

I think this is supposed to be taken care of in speech-tools\include\EST_system.h

#   if defined(_MSC_VER)
#       include <BaseTsd.h>
        typedef SSIZE_T ssize_t;
#   endif

I was able to bypass the ssize_t issue by replacing them with size_t which will probably be an issue later.

End up with a similar error as above.

nmake /nologo /FVCMakefile > output.txt
slib_format.cc

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2988:     unrecognizable template declaration/definition
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(423) : error C2059: syntax error : 'constant'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2143: syntax error : missing ';' before '{'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(429) : error C2447: '{' : missing function header (old-style formal list?)
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnan' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnan' : symbol cannot be used in a using-declaration
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2039: 'isnormal' : is not a member of '`global namespace''
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\cmath(96) : error C2873: 'isnormal' : symbol cannot be used in a using-declaration

(While writing all this I come to realize that all attempts to compile this seem to get to similar problems with math.h and cmath.h but seem to originate from different spots)

Travis
  • 2,105
  • 2
  • 26
  • 35
  • slib_format.cc,festival.cc, and slib_doc.cc are the three files that seem to originate the math.h and cmath.h issues. – Travis Oct 28 '14 at 20:17
  • I think I'm going to have to use something else as I couldn't get this to compile using Ubuntu either. – Travis Nov 10 '14 at 13:32
  • `ssize_t` is a signed type similar to `size_t` which is unsigned. Usually it's more important to get the sign right than the size, so `long long` might be a better replacement in general. The direct Windows equivalent of `ssize_t` is `INT_PTR`, which has both the correct sign and size. – MSalters Mar 11 '15 at 11:15

2 Answers2

2

You can download new version (2.4) of Festival: http://www.cstr.ed.ac.uk/projects/festival/download.html.

Also, to build it with VS 2013, try changing this line in EST_defines_win32.h in speech_tools

#define isnan(N) 0

to

#if (_MSC_VER < 1800 ) // older than VS 2013
#define isnan(N) 0 
#endif
robertNS
  • 36
  • 4
0

You have not followed the steps shown in the instructions, which is why it does not work for you.

The instructions clearly state use cygwin to get a copy of GNU make, or use VS2005. It does say 2006 (and thus those beyond) do not work....

Why not just follow the cygwin route to compile?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • I have a real windows app that I need to compile it into is why I can't do Cygwin. I don't own VS 2005. – Travis Dec 26 '14 at 13:43
  • cygwin does not prevent you using a real windows app. It enables you to use the linux compatible environment to use build something that will run under windows. Look at mingw also. – Brian Tompsett - 汤莱恩 Dec 26 '14 at 14:19