-
Notifications
You must be signed in to change notification settings - Fork 11
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
Can't get this to work with LLVM 16.0.4 #1
Comments
Hey @TGMM, thanks for checking this out! I was able to get it to work with the existing instructions, though I also had to update emsdk (3.1.21 -> 3.1.40) and WASI (15 -> 20). I've updated the README with the updated versions - can you try it again? |
Hello, thank you for your response. EDIT: I forgot to mention I'm compiling this on a Windows machine using WSL2. |
Hey, sorry for the late response! So it turns out that I was also having the I was able to nail down the cause to a missing symbol in the LLVM IR placeholder, so it had nothing to do with the build steps after all. Let me know if that works! |
First of all thanks for this repository. This has been pretty informative and interesting.
I'm trying to replicate this repo using LLVM 16.0.4 instead of 14.0.6. I've successfully cross-compiled llc and lld. And i've got the resulting binary files. The issue arises when I try to compile the example LLVM IR, I get the following error:
this.program: error: /lib/wasm32-wasi/libc.a(__main_void.o): undefined symbol: main
Comparing the resulting
main.o
files from the 14 and 16 version respectively with wasm2wat I get the following:14
16
The only noticeable difference I can see is the lack of the
(import "env" "__indirect_function_table" (table (;0;) 0 funcref))
instruction on the 16 version. But I don't know how to tell the compiler to add that instruction.Searching for an answer I found that that
__original_main
main should no longer be generated with the new LLVM versions (from 14 onwards), but yours is 14 and still has it, so I don't know what that means.You can try it on my fork, here, in case you have time and want to take a look.
The text was updated successfully, but these errors were encountered: