"GLIBC_2.29 not found" on nodejs binding
I'm trying to use this library on nodejs and got this error when I imported it.
internal/modules/cjs/loader.js:1057
return process.dlopen(module, path.toNamespacedPath(filename));
^
Error: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /home/ec2-user/test/node_modules/tokenizers/bin-package/index.node)
The environment I used is Amazon Linux 2, which has GLIBC 2.26. Although Amazon Linux 2022 is planned to be released this year, I think it'd be nice to support AL2 too since the exact schedule is not known yet.
From my quick scan on the release workflows, I think changing this line to an appropriate ubuntu version would be enough. https://github.com/huggingface/tokenizers/blob/ec439477865c6c8d3f9512f74075ecca45f6af61/.github/workflows/node-release.yml#L19
Hi @remagpie ,
Thanks for the report !
For Python we have a manylinux2010 build to support old glibc and more linux support.
Adding such a thing for node would definitely be a nice thing.
If you have the know how to do this it would be super appreciated.
Currently, we have on the roadmap the idea to redo the node bindings to newer version of neon so that we support more recent node versions: https://github.com/huggingface/tokenizers/issues/911
I think the work to support manylinux for node can be done at that time too. (Now the two issues are linked).
As a short term workaround you can also probably build the bindings yourself if you want.
Install rust then
git clone https://github.com/huggingface/tokenizers/
cd tokenizers/bindings/node
npm ci
npm run compile
Should be the library in the current directory, then you can probably import classically from another directory using local installation.
Is that option available for you ?
Thanks for the response! Building the bindings myself is a viable option for me, so I'll go for it this time.
As you said above, it seems that the os for the build script should be changed to be compatible with older glibc.
I tried running node-release action on ubuntu 16.04 (GLIBC 2.23) with the following configuration, and it seems to be working well.
...
runs-on: ubuntu-latest
container: ubuntu:16.04
steps:
...
- name: Install dependencies
run: apt-get update && apt-get install -y wget gcc g++ libssl-dev pkg-config python3
...
Since python is required in building the native binary, I think using manylinux2010 is a good option too. manylinux images have some preinstalled libraries inside so you probably won't have to install additional libraries in that case.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.