-
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
Autotools project fails to compile with -save-temps #133
Comments
I can reproduce this error with this testcase: int foo(int (*p)(void)) {
return p();
} compiling with -save-temps with the latest wasi-sdk release. It appears fixed on LLVM master, so it should be fixed next time we update wasi-sdk to a newer LLVM. Compilation without -save-temps works, so one workaround would be to run the compiler twice, once with -save-temps to generate the temporary .s files, which are preserved even after the errors, and then again without -save-temps to generate a .o file. |
Interesting, I hadn't realized the |
Thank you both for your replies. I've pulled the newest LLVM here but now I get a different error:
Again, without Let me know if I can provide further information. |
This is bug in the llvm itself and the |
This brings in the following changes: f645f49 Update signal macros after upgrade to snapshot1 (WebAssembly#144) 8b3266d github actions: pin checkout action to v1 (WebAssembly#145) 410c660 Use constructor functions for optional init routines. (WebAssembly#142) fe13053 c header generation updated for reorganized witx ast (WebAssembly#139) cd74e1d Correct the version of WebAssembly#136 on master (WebAssembly#141) 446cb3f Wasi snapshot preview1 (WebAssembly#140) 54102f0 Ignore rights in libpreopen. (WebAssembly#129) 8c9e1c6 Make the `__original_main` definition weak, fixing -flto. (WebAssembly#138) cf81683 Optimize `fmin`, `fmax`, etc. (WebAssembly#120) deb8eae Don't pre-check capabilities in `openat`. (WebAssembly#130) ca9046d Use consistent style for wasi-libc C source files. (WebAssembly#131) 951cc3e Fix unintended recursion in __wasilibc_register_preopened_fd. (WebAssembly#133) 5216983 Avoid a `strdup` call in `__wasilibc_populate_libpreopen`. (WebAssembly#128) 70099d4 Don't link in libpreopen initialization code when it isn't needed. (WebAssembly#127) ec4549d Temporarily disable the use of `__heap_base`. (WebAssembly#132) a214f1c Use __heap_base by dlmalloc (WebAssembly#114) a94d2d0 Avoid varargs conventions when calling open (WebAssembly#126) 7fcc4f2 Revamp and simplify the libpreopen code. (WebAssembly#110) eb7230c Remove more unsupported headers. (WebAssembly#123)
wasi-sdk has upgraded its LLVM tree since this issue; this is likely resolved. We can reopen if it is not. |
Hello, I am trying to compile libsodium which has a shell script to build with WebAssembly support, using wasi-sdk.
The script executes correctly by default but when I try to add
-save-temps
to the CFLAGS, compilation stops after a bit with the following error:I have confirmed that if I remove wasi-sdk and compile without a wasm target & modified sysroot, compilation works with
-save-temps
and I can see the temporary files as a result.To illustrate, I have created 2 docker files for easy reproduction: https://gist.github.com/orestisfl/5b5b333d5da7001dc799abea719ad9cf
One patches out wasi-sdk from the script and adds
-save-temps
and one that just adds the-save-temps
flag to$CFLAGS
.Any workaround suggestions are extremely welcome.
Thank you
The text was updated successfully, but these errors were encountered: