AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Build Fails With Turbopack On Glibc < 2.29 (RHEL 8, Debian 10) Due To Native SWC Binding GLIBC_2.29 Requirement

Next.js 16.3.0 Turbopack build fails on Linux distributions with glibc 2.28 because @next/swc-linux-x64-gnu is compiled against GLIBC_2.29; Webpack fallback works but is not automatic.

highConfidence 85%Next.jsAffected V16.3.0Affected V16.3.1-Canary.8

Origin Analysis

The prebuilt native SWC binding @next/swc-linux-x64-gnu for the gnu libc is linked against glibc 2.29. On systems with older glibc (e.g., RHEL 8, Debian 10 with glibc 2.28), dynamic loading fails with `GLIBC_2.29' not found. Turbopack requires native bindings, and Next.js provides neither a WASM fallback for Turbopack nor automatic switch to Webpack, causing build failure.
1. Clone https://github.com/faverl/reproduction-app; 2. Build Docker image on Debian 10 (buster) or run on RHEL 8; 3. Execute `npm run build` (default Turbopack); 4. Observe error requiring GLIBC_2.29; 5. Run `next build --webpack` to confirm success.

Fixing Code Block

Edge Case Audit

This fallback may mask future Turbopack issues and introduce behavior differences between Webpack and Turbopack builds. The require call may have side effects; if the binding loads but then fails later, it may not be caught. Rollback: remove the added check or set an environment variable to disable it. Also, if a future @next/swc version supports older glibc, this check might cause unnecessary fallback; version-specific condition should be added.

Ecosystem Topology