ullebe1 opened a new issue, #284:
URL: https://github.com/apache/pulsar-client-node/issues/284
Running this on Debian Buster (which is EOL, but this issue should manifest
itself on RHEL 8 too as it also has a too old `libstdc++`) by doing `npm
install pulsar-client` as documented in the Readme currently fails with the
following error message:
```
Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26’
not found (required by /app/node_modules/pulsar-client/lib/binding/Pulsar.node)
at Object.Module._extensions..node
(internal/modules/cjs/loader.js:1144:18)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous>
(/app/node_modules/pulsar-client/src/pulsar-binding.js:24:17)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
code: 'ERR_DLOPEN_FAILED'
}
error Command failed with exit code 1.
```
This is because the version of `libstdc++` it has is too old. Upgrading to
Debian Bullseye solves the problem as it has a newer version of `libstdc++`.
Per the GCC [docs](https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html)
`GLIBCXX_3.4.26` is available from GCC 9.1.0 (and its `libstdc++`), so having
this documented as the minimum required version would be nice.
---
Poking around I can see that the bundled static library dynamically links
against several other libraries (this is for the version installed when using
Debian Bullseye):
```
root@585a6dfd04d5:/app/node_modules/pulsar-client/lib/binding# ldd
Pulsar.node
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(0x0000004002194000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000004002363000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
(0x00000040024a7000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00000040024c1000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00000040024e3000)
/lib64/ld-linux-x86-64.so.2 (0x0000004000000000)
```
Perhaps documenting the minimum version of those too would be nice?
---
An alternative could be to not dynamically link any dependencies at all, but
I do not know how feasible that is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]