Skip to content

Native addon: linux-x64-gnu needs glibc 2.35 (fails on Vercel); macOS and arm64 have none #449

Closed

Description

@snario

The zyzz@0.0.32 tarball contains a single native addon:

package/binding/zyzz.linux-x64-gnu.node
package/binding/wasi/zyzz.wasi.cjs
package/binding/wasi/wasi-worker.mjs
package/binding/wasi/zyzz.wasm32-wasi.wasm

crates/binding/package.json lists nine napi targets (including aarch64-apple-darwin, x86_64-apple-darwin, and aarch64-unknown-linux-gnu), but the publish job in .github/workflows/main.yml runs once on ubuntu-latest, and build:binding runs napi build --platform, which only builds the host target. Every macOS install and every Linux arm64 install (for example GitHub's ubuntu-24.04-arm runners) silently uses the WASI build. The only signal is Node's ExperimentalWarning: WASI is an experimental feature.

Seen while upgrading tempoxyz/docs from 0.0.27 to 0.0.32 on an Apple Silicon machine. The upgrade is still faster than 0.0.27 there, so this isn't urgent, but those platforms likely lose much of the native compiler's speed.

Possible fix: build each target in a matrix (napi build --platform --target <triple> on matching runners), upload the .node files as artifacts, and assemble them into the package before changeset publish. Alternatively, publish per-platform optional packages with napi prepublish.

Activity

  1. snario commented on Oct 14, 2026

    @snario
    Author

    A more severe case of the same release setup: the linux-x64-gnu addon requires glibc ≥ 2.35, so it also fails on older x64 Linux. Vercel's build image (Amazon Linux 2023, glibc 2.34) can't load it:

    Addon.LoadError: Unable to load the Zyzz compiler addon for linux-x64. Tried:
    - zyzz/binding/zyzz.linux-x64-gnu.node: /lib64/libm.so.6: version `GLIBC_2.35' not found (required by zyzz/binding/zyzz.linux-x64-gnu.node)
    - @zyzz/binding-linux-x64-gnu: Cannot find module '@zyzz/binding-linux-x64-gnu'
    

    That excludes Amazon Linux 2023, RHEL 9, Debian 11, and Ubuntu 20.04, and it fails the build outright whenever the WASI fallback can't load. (In our case Vercel's restored node_modules cache had never linked @tybys/wasm-util, which pnpm had earlier recorded as a skipped optional dependency.)

    napi-rs can target an older glibc for *-unknown-linux-gnu with napi build --use-napi-cross (glibc 2.17) or --zig --zig-abi-suffix 2.17, which is how most napi packages stay loadable on these images. tempoxyz/docs is staying on 0.0.27 until a compatible binary ships (tempoxyz/docs#993).

  2. changed the title [-]Published package only ships the linux-x64-gnu native addon; macOS and arm64 fall back to WASI[/-] [+]Native addon: linux-x64-gnu needs glibc 2.35 (fails on Vercel); macOS and arm64 have none[/+] on Oct 14, 2026
  3. added a commit that references this issue on Oct 14, 2026
    c59662b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions