* Error Compiling espeak
@ Rob
` Chris Brannon
0 siblings, 1 reply; 3+ messages in thread
From: Rob @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
When I went to compile espeak from:
http://sourceforge.net/projects/espeak/files/espeak/espeak-1.48/espeak-1.48.04-source.zip
I got the following error
cd espeak-1.48.04-source/src
cp portaudio19.h portaudio.h
make
g++ -O2 -DUSE_PORTAUDIO -D PATH_ESPEAK_DATA=\"/usr/share/espeak-data\" -Wall -pedantic -I. -c -fno-exceptions tr_languages.cpp
^[[01m^[[Ktr_languages.cpp:201:43:^[[m^[[K ^[[01;31m^[[Kerror: ^[[m^[[Knarrowing conversion of ^[[01m^[[K194^[[m^[[K from ^[[01m^[[Kint^[[m^[[K to ^[[01m^[[Kchar^[[m^[[K inside { } [^[[01;31m^[[K-Wnarrowing^[[m^[[K]
const char string_ordinal[] = {0xc2,0xba,0^[[01;31m^[[K}^[[m^[[K; // masculine ordinal character, UTF-8
^[[01;31m^[[K^^[[m^[[K
^[[01m^[[Ktr_languages.cpp:201:43:^[[m^[[K ^[[01;31m^[[Kerror: ^[[m^[[Knarrowing conversion of ^[[01m^[[K186^[[m^[[K from ^[[01m^[[Kint^[[m^[[K to ^[[01m^[[Kchar^[[m^[[K inside { } [^[[01;31m^[[K-Wnarrowing^[[m^[[K]
make: *** [Makefile:102: tr_languages.o] Error 1
Any clue what's happening there? I saw a similar error on google, but no resolution. It seems to be compiler related.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Error Compiling espeak
Error Compiling espeak Rob
@ ` Chris Brannon
` Rob
0 siblings, 1 reply; 3+ messages in thread
From: Chris Brannon @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
"Rob" <captinlogic@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
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Error Compiling espeak
` Chris Brannon
@ ` Rob
0 siblings, 0 replies; 3+ messages in thread
From: Rob @ UTC (permalink / raw)
To: Speakup is a screen review system for Linux.
Chris Brannon <chris@the-brannons.com> wrote:>
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.
Well the CXXFLAGS approach didn't work.
I've never made a distributable patch for source code before. I'll look that up and see if that works.
I'm fumbling in the dark here (ha ha) because while I get the basic gist of what source code is trying to do (sometimes anyway) I don't know all the syntax and stuff.
Thanks for the hints.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
Error Compiling espeak Rob
` Chris Brannon
` Rob
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).