fix(ci): add -x to x86_64-unknown-linux-gnu build for glibc compat#22
Conversation
the x64-gnu target builds natively on ubuntu-latest (glibc 2.39) without -x, linking the binary against the host glibc. this makes it incompatible with glibc < 2.35 systems like Vercel (glibc 2.34) and Amazon Linux 2023. every other linux target already passes -x. the x64-gnu target was the only one missing it. requires the next @napi-rs/cli release after napi-rs/napi-rs#3189, which fixes -x being ignored when host matches target.
|
@Princesseuh the upstream |
|
NP. |
|
Follow-up: the Opened #25 with the real fix: switching to |
Changes
-xflag to thex86_64-unknown-linux-gnubuild command in CI, matching the pattern used byaarch64-unknown-linux-gnu,x86_64-unknown-linux-musl, andaarch64-unknown-linux-musl-x, the x64-gnu target builds natively onubuntu-latest(glibc 2.39), linking the binary against the host glibc. The published binary requires glibc 2.35+, which breaks on Vercel (glibc 2.34) and Amazon Linux 2023.-x,cargo-zigbuildpins glibc to 2.28The upstream fix (napi-rs/napi-rs#3189) shipped in
@napi-rs/[email protected](2026-04-08). This PR is now ready to merge.Testing
Verified on Vercel that the current binary fails with
GLIBC_2.35 not foundwhen loaded by Node.js on glibc 2.34. CI change only.Docs
Bug fix only.