-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined symbol: alarm (and maybe dup) #459
Comments
wasi-libc does not currently support either (The alarm.c and dup.c files that you link to are part of the upstream musl project but neither of them is compiled when building wasi-libc). |
I see, thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
Hello, I am trying to build yices2, (see there : https://github.com/sporniket/yices2-built-with-wasi-sdk ), I have tried wasi-sdk 19 and 20 without difference.
So far, I have
The problem
Now I am stuck with :
wasm-ld: error: ../build/wasm32-unknown-wasi-release/lib/libyices.a(timeout.o): undefined symbol: alarm
Did I miss another build option or something, or is it not possible at all to build yices2 at the moment ?
Steps to reproduce
build
script : in summary, it downloads WASI-SDK (19, but I also tried with 20), it downloads and build GMP, and then it try to build yices2When performing the build, I have warnings about 2 undefined functions :
dup()
alarm()
Then it fails when during the linking step :
I have looked for the name
alarm
with commands likear t wasi-sdk-19.0/share/wasi-sysroot/lib/wasm32-wasi/libc.a | grep ala
onlibc.a
,libwasi-emulated-process-clocks.a
andlibwasi-emulated-signal.a
, and in fact in the other libs found in wasi-sysroot too, without success.I guess this will be the same for dup too.
However in wasi-libc repository, I can see
alarm
at https://github.com/WebAssembly/wasi-libc/blob/main/libc-top-half/musl/src/unistd/alarm.c, anddup
at https://github.com/WebAssembly/wasi-libc/blob/main/libc-top-half/musl/src/unistd/dup.cBuild option
As seen in the build script, I am using
-D_WASI_EMULATED_SIGNAL -D_WASI_EMULATED_PROCESS_CLOCKS
as well as-lwasi-emulated-process-clocks -lwasi-emulated-signal
:The text was updated successfully, but these errors were encountered: