the localtime function is present in wasi-sysroot's headers, but not in the actual libc library, so programs calling localtime fails during linking:
#include <time.h>
int main() {
time_t a;
localtime(&a);
}
zhuowei@zhuowei-laptop:~/wasi-sdk/bin$ ./clang-8 localtime.c
wasm-ld: error: /tmp/localtime-230b9c.o: undefined symbol: localtime
clang-8: error: lld command failed with exit code 1 (use -v to see invocation)
Either the localtime function should be removed from the header, or an implementation should be added to the libc.
the
localtimefunction is present in wasi-sysroot's headers, but not in the actual libc library, so programs calling localtime fails during linking:Either the localtime function should be removed from the header, or an implementation should be added to the libc.