Skip to content
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

WASM build errors #382

Closed
GabrielleAkers opened this issue Nov 18, 2024 · 2 comments
Closed

WASM build errors #382

GabrielleAkers opened this issue Nov 18, 2024 · 2 comments

Comments

@GabrielleAkers
Copy link

GabrielleAkers commented Nov 18, 2024

I'm trying to follow the steps here to build for webassembly but running into errors in the build.

I built openssl and poco with the emsdk and modified the config to point to the correct locations since the suggested flag --with-wasm-openssl doesn't exist. After that modification the configuration step seems to work fine, but then when I run make to build I get the following errors:

image

Originally I tried to modify the signature of the extern function from syncfs() to just sync() since it looks like it's being used the way sync is supposed to be, but then I ran into more linking errors farther into the process.

Is there an updated guide for building to wasm that can be shared? Or maybe there is a different version of the emsdk I need to use?

@GabrielleAkers
Copy link
Author

On revisiting this I realized the online version of CraftOS is running many versions behind the master branch. I downgraded and tried to build version 2.3 using old emsdk, poco and openssl and still have build errors (albeit different ones).

I will try to work on fixes for the errors I'm encountering and submit a fork PR once I have a working build.

@MCJack123
Copy link
Owner

It looks like one of the functions defined to be exported to JS now collides with a Linux system call of the same name - changing the name of that should fix this error. However, you're correct in noticing that the WASM version hasn't been maintained for a while, partially due to an old bug in Emscripten and/or WASM engines that caused absurd memory usage at startup. It's probably fixed now, but I haven't taken a look at it in a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants