ChainSafe / blst-ts

Typescript wrapper for https://github.com/supranational/blst native bindings, a highly performant BLS12-381 signature library
Other
18 stars 13 forks source link

[v0.2.7] linux binding files require GLIBC_2.32 #78

Closed twoeths closed 1 year ago

twoeths commented 1 year ago

This was found in lodestar https://github.com/ChainSafe/lodestar/issues/4945

On some nodes, it requires GLIBC_2.32 to run the binding file

node -e 'require("/usr/src/lodestar/node_modules/@chainsafe/blst/prebuild/linux-x64-108-binding.node")'
node:internal/modules/cjs/loader:1243
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /usr/src/lodestar/node_modules/@chainsafe/blst/prebuild/linux-x64-108-binding.node)
    at Module._extensions..node (node:internal/modules/cjs/loader:1243:18)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at [eval]:1:1
    at Script.runInThisContext (node:vm:129:12)
    at Object.runInThisContext (node:vm:313:38)
    at node:internal/process/execution:79:19
    at [eval]-wrapper:6:22 {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.12.1

The issue does not happen with v0.2.6, since GLIBC_2.32 was shipped with ubuntu 22.04 it's likely to be the root cause (since ubuntu-latest was migrated from 20.04 to 22.04 as announced in https://github.blog/changelog/2022-11-09-github-actions-ubuntu-latest-workflows-will-use-ubuntu-22-04/