Building GHC WASM now giving "undeclared function tzset" errors
Summary
Building a Docker image with GHC WASM installed is now failing to build, when it worked a few months ago. It's building the binary for Ubuntu 22.10 on aarch64. Pinning the same GHC commit + Ubuntu base image tag doesn't help.
#19 543.9 libraries/time/lib/cbits/HsTime.c:14:5: error:
#19 543.9 error: call to undeclared function 'tzset'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
#19 543.9 tzset();
#19 543.9 ^
#19 543.9 |
#19 543.9 14 | tzset();
#19 543.9 | ^
#19 543.9 1 error generated.
#19 543.9 `clang' failed in phase `C Compiler'. (Exit code: 1)
The Docker image pulls the latest version of wasi-sdk
, which I suspect is the cause, due to the large number of commits made since the Docker image built (Jan 2023).
Steps to reproduce
- Clone https://github.com/brandonchinn178/ghcjs-docker
GHC_GIT_REF=master ghc-wasm-backend/build.sh
Expected behavior
Should work
Environment
- GHC version used: 9.2.7
Optional:
- Operating System: Ubuntu 22.10
- System Architecture: aarch64