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

Node 16 #947

Closed
swnf opened this issue Dec 16, 2021 · 3 comments
Closed

Node 16 #947

swnf opened this issue Dec 16, 2021 · 3 comments

Comments

@swnf
Copy link

swnf commented Dec 16, 2021

The current node version installed with the SDK is node 14. Compiling a library with pthread support using tools like emconfigure and emmake might fail because the configuration script cannot run the compiled binaries. Node 14 requires the flag --experimental-wasm-threads for that which cannot be passed using NODE_OPTIONS. The following warning appears in the output:

(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and also use a recent version)

Node 16 is the current LTS version of node and does not require this flag. Adding Node 16 support to emsdk should solve this problem.

@sbc100
Copy link
Collaborator

sbc100 commented Dec 16, 2021

Sadly we have some reasons to stick with (or at least to continue to support) an older version node, at least for our internal tooling. See #877.

I agree it would be nice one to upgrade.

In the mean time the issue you are facing with emconfigure not passing the correct argument I believe was addressed in a recent emscripten commit: emscripten-core/emscripten#15590. You you try it out today using emsdk install tot or it will be part of the 3.0.1 when it comes out (hopefully later today).

You are also free to install whatever version of node you like of course, and configure via the .emscripten config file or the EM_NODE_JS environment variable.

@swnf
Copy link
Author

swnf commented Dec 16, 2021

Thanks for your answer. I understand you cannot upgrade yet. NODE_OPTIONS is a nodejs environment variable. The problem I have is that it is not possible to add arguments directly to NODE_JS because emcc assumes it is only a path to an executable (see here). The PR you linked seems to be CMake-specific?

@swnf
Copy link
Author

swnf commented Dec 16, 2021

Considering that you cannot upgrade my best solution is probably to change NODE_JS to a different node version. I'm closing this issue for now.

@swnf swnf closed this as completed Dec 16, 2021
akoeplinger pushed a commit to akoeplinger/emsdk that referenced this issue Dec 13, 2024
…0240930.1 (emscripten-core#947)

Microsoft.NETCore.Runtime.Wasm.Emscripten.Transport
 From Version 9.0.0-alpha.1.24473.1 -> To Version 9.0.0-alpha.1.24480.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
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