Error Compiling espeak

Chris Brannon chris at the-brannons.com
Sat Oct 1 20:15:38 EDT 2016


"Rob" <captinlogic at gmail.com> writes:

> I got the following error
*text snipped, mentions narrowing conversions
> make: *** [Makefile:102: tr_languages.o] Error 1

Quoting from https://gcc.gnu.org/gcc-6/porting_to.html:

---begin quote---
Narrowing conversions

The C++11 standard does not allow "narrowing conversions"
inside braced initialization lists, meaning conversions to a type with less
precision or a smaller range, for example:


    int i = 127;
    char s[] = { i, 256 };

In the above example the value 127 would fit in char but because it's not a
constant it is still a narrowing conversion.
If the value 256 is larger than CHAR_MAX then that is also a narrowing conversion.
Narrowing conversions can be avoided by using an explicit cast, e.g. (char)i.
---end quote---

So you could probably fix it by patching the source code and adding a
cast.  Another option is to add -Wno-error=narrowing to $CXXFLAGS at build-time.

Hope this helps,
-- Chris


More information about the Speakup mailing list