Summary
Companion to #555 / #556. Even after we lower the build target with cargo-zigbuild, the npm wrapper currently exits successfully on install and only fails later at first launch with a runtime linker error like `libc.so.6: version 'GLIBC_2.39' not found`. The user has no clue what just happened.
Proposal
In the npm postinstall script (`npm/deepseek-tui/scripts/postinstall.js` or equivalent), after downloading the binary:
-
Detect the host glibc version (Linux only): `ldd --version` parse, or `getconf GNU_LIBC_VERSION`.
-
Detect the binary's required glibc: `readelf -V | grep GLIBC_` and pick the highest version.
-
If host < required, print a clear error and direct the user to the source-build path:
`deepseek-tui requires glibc >= 2.28 (your system has 2.17). Install from source instead: `cargo install deepseek-tui-cli``
-
Exit non-zero so npm flags the install as failed, instead of the current "looks fine, fails later" UX.
Repro context
Reported by @20bytes on issue #555 (Ubuntu 22.04, glibc 2.35) — install succeeds, both `./node_modules/.bin/deepseek --version` and `./node_modules/.bin/deepseek-tui --version` fail at runtime with the linker error.
Notes
Summary
Companion to #555 / #556. Even after we lower the build target with cargo-zigbuild, the npm wrapper currently exits successfully on install and only fails later at first launch with a runtime linker error like `libc.so.6: version 'GLIBC_2.39' not found`. The user has no clue what just happened.
Proposal
In the npm postinstall script (`npm/deepseek-tui/scripts/postinstall.js` or equivalent), after downloading the binary:
Detect the host glibc version (Linux only): `ldd --version` parse, or `getconf GNU_LIBC_VERSION`.
Detect the binary's required glibc: `readelf -V | grep GLIBC_` and pick the highest version.
If host < required, print a clear error and direct the user to the source-build path:
Exit non-zero so npm flags the install as failed, instead of the current "looks fine, fails later" UX.
Repro context
Reported by @20bytes on issue #555 (Ubuntu 22.04, glibc 2.35) — install succeeds, both `./node_modules/.bin/deepseek --version` and `./node_modules/.bin/deepseek-tui --version` fail at runtime with the linker error.
Notes