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

update emscripten compiler to V3.1.70, there is a GLIBC not found #1485

Open
yangfangfang1204 opened this issue Nov 4, 2024 · 6 comments
Open

Comments

@yangfangfang1204
Copy link

1、i update emscripten compiler to V3.1.70, the emcc -v :
hyde@ubuntu:~/Desktop/testThread$ emcc -v emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.70 (b53978ee3f540dc74761eba127aa7f1b8761a125) clang version 20.0.0git (https:/github.com/llvm/llvm-project f52b89561f2d929c0c6f37fd818229fbcad3b26c) Target: wasm32-unknown-emscripten Thread model: posix InstalledDir: /home/hyde/emsdk/upstream/bin
2、i emcc a testThread.cpp, there is an error:
/home/hyde/emsdk/node/20.18.0_64bit/bin/node: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.27' not found (required by /home/hyde/emsdk/node/20.18.0_64bit/bin/node)
/home/hyde/emsdk/node/20.18.0_64bit/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.28' not found (required by /home/hyde/emsdk/node/20.18.0_64bit/bin/node) /home/hyde/emsdk/node/20.18.0_64bit/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.25' not found (required by /home/hyde/emsdk/node/20.18.0_64bit/bin/node)
emcc: warning: cannot check node version: Command '['/home/hyde/emsdk/node/20.18.0_64bit/bin/node', '--version']' returned non-zero exit status 1. [-Wversion-check]
shared:INFO: (Emscripten: Running sanity checks)
/home/hyde/emsdk/node/20.18.0_64bit/bin/node: /lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.27' not found (required by /home/hyde/emsdk/node/20.18.0_64bit/bin/node) /home/hyde/emsdk/node/20.18.0_64bit/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.28' not found (required by /home/hyde/emsdk/node/20.18.0_64bit/bin/node)
/home/hyde/emsdk/node/20.18.0_64bit/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.25' not found (required by /home/hyde/emsdk/node/20.18.0_64bit/bin/node) emcc: error: the configured node executable (['/home/hyde/emsdk/node/20.18.0_64bit/bin/node']) does not seem to work, check the paths in /home/hyde/emsdk/.emscripten (Command '['/home/hyde/emsdk/node/20.18.0_64bit/bin/node', '-e', 'console.log("hello")']' returned non-zero exit status 1.)

the emcc script is
emcc -O3 testThread.cpp -o testThread.js -s PTHREAD_POOL_SIZE_STRICT=0 -s USE_PTHREADS=1 -s EXPORTED_FUNCTIONS="['_testThread','_stop']" -s INITIAL_MEMORY=128MB -s ENVIRONMENT=web,worker

so why is a node error?

@sbc100
Copy link
Collaborator

sbc100 commented Nov 4, 2024

This looks like it was due to #1476.

This change updated the version of node that we supply which in turn looks like it increased the glibc dependencies. What version of linux are running on?

@sbc100
Copy link
Collaborator

sbc100 commented Nov 4, 2024

We could look into reverting #1476 which is not actually a required change, but more about consistency (IIRC). @juj?

@kleisauke
Copy link
Collaborator

Node.js v18.x has the same minimum glibc requirement as Node.js v20.x, so this issue likely existed before PR #1476 as well. See:
https://github.com/nodejs/node/blob/v18.x/BUILDING.md#platform-list
https://github.com/nodejs/node/blob/v20.x/BUILDING.md#platform-list

@yangfangfang1204
Copy link
Author

This change updated the version of node that we supply which in turn looks like it increased the glibc dependencies. What version of linux are running on?

ubuntu 16.04

@yangfangfang1204
Copy link
Author

so what should I do to use Emscripten V3.1.70 normally? Try to install Emscripten V3.1.70 on ubuntu 20.01?

@sbc100 sbc100 transferred this issue from emscripten-core/emscripten Nov 5, 2024
@sbc100
Copy link
Collaborator

sbc100 commented Nov 5, 2024

As of #1387 the new minimum Ubuntu version is Ubuntu/Focal 20.04.

Note the emscripten itself still supports older versions of node but emsdk provides a modern version of node that requires 20.04.

If you have your own version of node installed on your system then you could set EM_NODE=/path/to/node which would override the version of node that comes with emsdk.

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

3 participants