tls-client
tls-client copied to clipboard
cannot load on linux
i'm trying to use the pre-built files from dist on linux.
const ffi = require('ffi-napi');
const tlsClientLibrary = ffi.Library(goPath, { 'request': ['string', ['string']] });
when i try to load the lib i get this error:
"Dynamic Symbol Retrieval Error: /usr/lib/libc.so.6: undefined symbol: request"
I'm on manjaro arch linux
@Rattle-15236 i misconfigured something in my build step to create the prebuilt binaries on release. You can easily fix that for now by running the build command for Linux from the build.sh file inside the cffi directory on the machine you want to use the library (Linux). Please remove the CC Parameter from the build command when executing it because you won’t cross compile. Will fix that in the next release.
@Rattle-15236 i updated the prebuilt libraries. could you maybe try if you now can open the linux one without the need to compile it yourself?
I'm getting a new error when using the pre-built .so
lib
Error: ENOENT: no such file or directory, open 'libc.musl-x86_64.so.1'
at Object.openSync (node:fs:585:3)
at Object.func [as openSync] (node:electron/js2c/asar_bundle:5:1812)
at readFileSync (node:fs:453:35)
at e.readFileSync (node:electron/js2c/asar_bundle:5:9160)
at new DynamicLibrary (/node_modules/ffi-napi/lib/dynamic_library.js:68:23)
at Object.Library (/node_modules/ffi-napi/lib/library.js:47:10)
...
@Rattle-15236
apt-get install musl-dev
manjaro arch doesn't have apt
. i was able to install musl
but the error is still the same.
plz note that building locally still works, it's just the pre-built binaries that have the error
@Rattle-15236 can you maybe tell me the command you are using when building it yourself? or do you just execute the build.sh?
i just run the build.sh script without the CC=
just followed your response
@Rattle-15236 you should already have solved but I ran into this issue today on a VM I have on GCP.
I solved it by installing musl
and musl-dev
packages and make a symbolic link to the relative lib.
sudo apt-get install musl musl-dev
sudo ln -s /usr/lib/x86_64-linux-musl/libc.so /lib/libc.musl-x86_64.so.1