You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I decided to test out this library, but I cannot run it on my OS because the executable is dynamically linked[1].
The readme claims
Linux and Windows binaries are static executables.
However, the downloaded artifact (both using npm install and manually downloading the sqlx-ts-v0.11.1-linux-64-bit.zip release) yields a dynamically linked executable:
$ file ./sqlx-ts
./sqlx-ts: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=bb0c9104d6514a78884270594dce4c2fba41ba88, for GNU/Linux 3.2.0, with debug_info, not stripped
I don't see any setup to build against ex. musl to get a statically linked library, so I'm wondering if perhaps I misunderstood "static executable" and it means "precompiled executable" in this case.
Is there a way to get the Node install to compile the library locally instead of using a precompiled binary?
[1]: I use NixOS, which does not provide a global libc. Each executable must be statically linked or be compiled inside the NixOS env.
The text was updated successfully, but these errors were encountered:
(This comment is not related to the issue at hand, but it might've used enough keywords that users with the same issue finds this issue in the future.)
If someone else has issues with this and are using NixOS, here's how I solved it: I patched the included binary with patchelf. Every time I update the dependency I will have to re-apply the patch, but it's not too bad.
The approach is to get patchelf to list the intepreter of something else you've got installed, then setting that interpreter in the binary.
Hi! I decided to test out this library, but I cannot run it on my OS because the executable is dynamically linked[1].
The readme claims
However, the downloaded artifact (both using
npm install
and manually downloading thesqlx-ts-v0.11.1-linux-64-bit.zip
release) yields a dynamically linked executable:I don't see any setup to build against ex.
musl
to get a statically linked library, so I'm wondering if perhaps I misunderstood "static executable" and it means "precompiled executable" in this case.Is there a way to get the Node install to compile the library locally instead of using a precompiled binary?
[1]: I use NixOS, which does not provide a global
libc
. Each executable must be statically linked or be compiled inside the NixOS env.The text was updated successfully, but these errors were encountered: