<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>"cast-function-type" has been introduced in GCC 8 and it affects
      lots of existing Pd code. Usually, it is just a warning and can be
      ignored, but the makefile for espeak sets "-Werror", which means
      that every warning is treated as an error. The quickest fix is to
      either remove "-Werror" or add "<span class="aCOpRe"><span>-Wno-cast-function-type"</span></span>.<br>
    </p>
    <p>Christof<br>
    </p>
    <div class="moz-cite-prefix">On 13.03.2021 10:06, Peter P. wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20210313090609.wjlv2beirjl5h7bk@fastmail.com">
      <pre class="moz-quote-pre" wrap="">Hi list,

trying to compile and load the espeak external from 
<a class="moz-txt-link-freetext" href="https://github.com/kronihias/espeak">https://github.com/kronihias/espeak</a>
on Debian/GNU Linux. Have the apt packages
        espeak libespeak-dev
installed and the makefile modifiet to point to
        PDROOT=/usr/include/pd

Running 'make' yields an error:
cc -export-dynamic -shared  -lc -lm -lespeak -DPD -O2 -funroll-loops
-fomit-frame-pointer -fPIC -Wall -W -Wshadow -Wstrict-prototypes -Werror
-Wno-unused -Wno-parentheses -Wno-switch -I/usr/include/pd/src -o
espeak.pd_linux espeak.c
espeak.c: In function ‘espeak_setup’:
espeak.c:406:6: error: cast between incompatible function types from
‘void * (*)(t_symbol *)’ {aka ‘void * (*)(struct _symbol *)’} to ‘void *
(*)(void)’ [-Werror=cast-function-type]
  406 |      (t_newmethod)espeak_new,  // newmethod
      |      ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:79: espeak.pd_linux] Error 1
make[1]: Leaving directory '/tmp/espeak-master'
make: *** [Makefile:46: auto] Error 2

which I can circumnavigate disabling the -Werror flag in the makefile.
Compilation somewhat succeeds then, posting:
espeak.c: In function ‘espeak_setup’:
espeak.c:406:6: warning: cast between incompatible function types from
‘void * (*)(t_symbol *)’ {aka ‘void * (*)(struct _symbol *)’} to ‘void *
(*)(void)’ [-Wcast-function-type]
  406 |      (t_newmethod)espeak_new,  // newmethod
      |      ^

Loading the external in Pd then throws:
./espeak.pd_linux: ./espeak.pd_linux: undefined symbol: espeak_SetParameter
espeak: can't load library

Can anyone point me into a good direction what to try next here?
Anyone having had success on OS X with this external so far?

appreciated, 
as always, 
yours,
P



_______________________________________________
<a class="moz-txt-link-abbreviated" href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list
UNSUBSCRIBE and account-management -> <a class="moz-txt-link-freetext" href="https://lists.puredata.info/listinfo/pd-list">https://lists.puredata.info/listinfo/pd-list</a>
</pre>
    </blockquote>
  </body>
</html>