MayamaTakeshi / sip-lab

A node module that helps to write SIP functional tests
3 stars 2 forks source link

Failing with node versions older than 19 #68

Closed MayamaTakeshi closed 4 months ago

MayamaTakeshi commented 4 months ago

The latest version 1.17.3 was built for 15, 16, 17, 18, 19, 20 and 21. However with versions older than 19 I get:

$ node -v
v18.16.0

$ node simple.js 
node:internal/modules/cjs/loader:1338
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: libssl.so.3: cannot open shared object file: No such file or directory
    at Module._extensions..node (node:internal/modules/cjs/loader:1338:18)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at load (/root/tmp/t2/node_modules/node-gyp-build/node-gyp-build.js:22:10)
    at Object.<anonymous> (/root/tmp/t2/node_modules/sip-lab/index.js:1:40)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v18.16.0

Let's see if we can solve this by statically linking the SSL library. We might try different ones:

https://docs.pjsip.org/en/latest/specific-guides/security/ssl.html

MayamaTakeshi commented 4 months ago

However strangely, after changing to only prebuild for 19, 20 and 21, now when we switch to versions 18, 17 and 16, it works (I have not tested with 15 yet but I think it will work).

MayamaTakeshi commented 4 months ago

I tested with 15 and it was OK too. So I will consider this solved although it is not clear why.