emscripten-core / emscripten-core/emscripten
v3.1.42 and above breaks espeak-ng compilation. Conflicting types in wchar.h
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
v3.1.41 and below works
v3.1.42 and higher breaks
**Reproduce:**
Google Colab available here:
https://colab.research.google.com/drive/1Ah_WimDCdFKZSkwKBU3Q5SyHTVVdB6Tl
Colab installs latest sdk hence will fail. You can change which version of sdk to install (steps 3 and 4)
### Error output
```console
make: make src/libespeak-ng.la
Makefile:3123: warning: ignoring prerequisites on suffix rule definition
CC src/ucd-tools/src/libespeak_ng_la-case.lo
CC src/ucd-tools/src/libespeak_ng_la-categories.lo
CC src/ucd-tools/src/libespeak_ng_la-ctype.lo
CC src/ucd-tools/src/libespeak_ng_la-proplist.lo
CC src/ucd-tools/src/libespeak_ng_la-scripts.lo
CC src/ucd-tools/src/libespeak_ng_la-tostring.lo
CC src/libespeak-ng/la-common.lo
CC src/libespeak-ng/la-compiledata.lo
CC src/libespeak-ng/la-compiledict.lo
CC src/libespeak-ng/la-dictionary.lo
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:180:11: error:
conflicting types for 'ucd_isalnum'
180 | int iswalnum(wint_t);
| ^
src/include/compat/wctype.h:35:19: note: expanded from macro 'iswalnum'
35 | #define iswalnum ucd_isalnum
| ^
./src/ucd-tools/src/include/ucd/ucd.h:410:5: note: previous declaration is here
410 | int ucd_isalnum(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:181:11: error:
conflicting types for 'ucd_isalpha'
181 | int iswalpha(wint_t);
| ^
src/include/compat/wctype.h:36:19: note: expanded from macro 'iswalpha'
36 | #define iswalpha ucd_isalpha
| ^
./src/ucd-tools/src/include/ucd/ucd.h:417:5: note: previous declaration is here
417 | int ucd_isalpha(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:182:11: error:
conflicting types for 'ucd_isblank'
182 | int iswblank(wint_t);
| ^
src/include/compat/wctype.h:37:19: note: expanded from macro 'iswblank'
37 | #define iswblank ucd_isblank
| ^
./src/ucd-tools/src/include/ucd/ucd.h:424:5: note: previous declaration is here
424 | int ucd_isblank(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:183:11: error:
conflicting types for 'ucd_iscntrl'
183 | int iswcntrl(wint_t);
| ^
src/include/compat/wctype.h:38:19: note: expanded from macro 'iswcntrl'
38 | #define iswcntrl ucd_iscntrl
| ^
./src/ucd-tools/src/include/ucd/ucd.h:431:5: note: previous declaration is here
431 | int ucd_iscntrl(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:185:11: error:
conflicting types for 'ucd_isgraph'
185 | int iswgraph(wint_t);
| ^
src/include/compat/wctype.h:40:19: note: expanded from macro 'iswgraph'
40 | #define iswgraph ucd_isgraph
| ^
./src/ucd-tools/src/include/ucd/ucd.h:445:5: note: previous declaration is here
445 | int ucd_isgraph(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:186:11: error:
conflicting types for 'ucd_islower'
186 | int iswlower(wint_t);
| ^
src/include/compat/wctype.h:41:19: note: expanded from macro 'iswlower'
41 | #define iswlower ucd_islower
| ^
./src/ucd-tools/src/include/ucd/ucd.h:452:5: note: previous declaration is here
452 | int ucd_islower(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:187:11: error:
conflicting types for 'ucd_isprint'
187 | int iswprint(wint_t);
| ^
src/include/compat/wctype.h:42:19: note: expanded from macro 'iswprint'
42 | #define iswprint ucd_isprint
| ^
./src/ucd-tools/src/include/ucd/ucd.h:459:5: note: previous declaration is here
459 | int ucd_isprint(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:188:11: error:
conflicting types for 'ucd_ispunct'
188 | int iswpunct(wint_t);
| ^
src/include/compat/wctype.h:43:19: note: expanded from macro 'iswpunct'
43 | #define iswpunct ucd_ispunct
| ^
./src/ucd-tools/src/include/ucd/ucd.h:466:5: note: previous declaration is here
466 | int ucd_ispunct(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:189:11: error:
conflicting types for 'ucd_isspace'
189 | int iswspace(wint_t);
| ^
src/include/compat/wctype.h:44:19: note: expanded from macro 'iswspace'
44 | #define iswspace ucd_isspace
| ^
./src/ucd-tools/src/include/ucd/ucd.h:473:5: note: previous declaration is here
473 | int ucd_isspace(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:190:11: error:
conflicting types for 'ucd_isupper'
190 | int iswupper(wint_t);
| ^
src/include/compat/wctype.h:45:19: note: expanded from macro 'iswupper'
45 | #define iswupper ucd_isupper
| ^
./src/ucd-tools/src/include/ucd/ucd.h:480:5: note: previous declaration is here
480 | int ucd_isupper(codepoint_t c);
| ^
In file included from src/libespeak-ng/dictionary.c:28:
In file included from src/include/compat/wchar.h:27:
In file included from /content/emsdk/upstream/emscripten/cache/sysroot/include/compat/wchar.h:4:
/content/emsdk/upstream/emscripten/cache/sysroot/include/wchar.h:191:11: error:
conflicting types for 'ucd_isxdigit'
191 | int iswxdigit(wint_t);
| ^
src/include/compat/wctype.h:46:19: note: expanded from macro 'iswxdigit'
46 | #define iswxdigit ucd_isxdigit
| ^
./src/ucd-tools/src/include/ucd/ucd.h:487:5: note: previous declaration is here
487 | int ucd_isxdigit(codepoint_t c);
| ^
11 errors generated.
emcc: error: '/content/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -DEMSCRIPTEN -Werror=implicit-function-declaration --sysroot=/content/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -DHAVE_CONFIG_H -I. -fPIC -fvisibility=hidden -pedantic -fno-exceptions -DPATH_ESPEAK_DATA="/usr/share/espeak-ng-data" -DLIBESPEAK_NG_EXPORT -I./src/include -Isrc/include/compat -I./src/speechPlayer/include -I./src/ucd-tools/src/include -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200112L -DUSE_KLATT=1 -DUSE_SPEECHPLAYER=1 -fwrapv -Wunused-parameter -Wunused -Wuninitialized -Wreturn-type -Wmissing-prototypes -Wint-conversion -Wimplicit -g3 -O2 -std=c99 -MT src/libespeak-ng/la-dictionary.lo -MD -MP -MF src/libespeak-ng/.deps/la-dictionary.Tpo -c -fPIC -DPIC src/libespeak-ng/dictionary.c -o src/libespeak-ng/.libs/la-dictionary.o' failed (returned 1)
make: *** [Makefile:1931: src/libespeak-ng/la-dictionary.lo] Error 1
emmake: error: 'make src/libespeak-ng.la' failed (returned 2)
```
Raised issue here https://github.com/espeak-ng/espeak-ng/issues/1887 but after some investigation it seems to be related to the latest emscripten releases.
Contributor guide
Assessment
This issue has not been assessed yet.