-
Notifications
You must be signed in to change notification settings - Fork 951
Wasm examples require wasi-libc to compile from dev builds #923
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
Comments
This is only a problem with local builds of TinyGo. Release builds have everything set up correctly. You can run |
Maybe this should be included in the documentation? For example, just after https://tinygo.org/getting-started/linux/#additional-requirements-for-microcontrollers. Another option could be to build it when needed, similar to how compiler-rt is currently built when needed. That depends on #871 however. |
Adding it to the docs is probably a good starting point. 😄 |
Agreed that this needs to be in the docs. |
I think this has now been addressed, so closing. Please reopen if needed, thanks! |
How has this been addressed? I'm running arch linux (manjaro) and followed the getting started > linux > arch directions, which boil down to installing the tinygo-bin AUR package. The result is:
Not sure what to do next... |
@tve In theory, running |
After something like |
Good question. 😁 My first thought was the tinygo package might need updating to include the WASI step in it's build process. However, the file list for it already includes compiled wasi files: https://www.archlinux.org/packages/community/x86_64/tinygo/files/ (eg search for Now I'm kind of wondering if there's a different step the package still needs to do, so the wasi pieces were found. Note that I'm not that familiar with Arch personally. 🤷 |
Reading over your error message again:
Maybe the |
Doing a general search online for that error message is throwing up lots of possibilities. I'd tend to explore those next, unless someone with good idea(s) chimes in here. 😄 |
This looks relevant: emscripten-core/emscripten#9329 (comment) |
This looks like a problem with the package. This should work out of the box, no modification needed. @johanbrandhorst do you have an idea what's going on? |
The |
Strange that it fails just on Arch. @tve to be absolutely sure the packaging didn't mess something up, can you try whether the prebuilt binaries from the release page don't have this error? |
Thank you @aykevl
|
Okay, then I would consider this a bug in the |
@tcastelly could you figure out the error and report it on the relevant package? I'd be happy to take contributions. |
Discovered a problem (and solution) earlier on today, when attempting to compile the TinyGo wasm examples in under the
src/examples/wasm
directory:The problem turned out to be that the wasi-libc submodule needs to be (manually) compiled first, before the compiling the wasm examples:
This compile step creates the
libc.a
file being complained about in the initial error.The proper solution to this might be something like including this in the top level Makefile, so it's done automatically during the normal TinyGo compilation.
The text was updated successfully, but these errors were encountered: