emscripten-core / emscripten-core/emscripten
Zlib autoconf build causes flaky test failures
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 109
Description
zlib's configure script assumes that a test compile has failed if there is any output on stderr (rather than being based on exit status). Sometimes emcc prints "building libc" or similar if it needs to build a library at link time. This causes flaky failures in running the zlib tests. Specifically, when autoconf tests the signature of `vsnprintf`, emcc will print to stderr and the configure script wrongly thinks the compile has failed. This causes autoconf to set `HAS_vsnprintf_void` in the config so that zlib uses the void-returning version of `vsnprintf` (https://github.com/emscripten-core/emscripten/blob/4d864df0a57024d667e8db171aab2c3385d04c30/tests/third_party/zlib/gzwrite.c#L328). But emscripten uses the int-returning version, so the resulting warning causes the zlib build to fail.
Contributor guide
Assessment
This issue has not been assessed yet.