vercel-labs / vercel-labs/scriptc

Precompiled Linux GNU runtime references `__isoc23_*` symbols unavailable on glibc 2.36

Open
#349 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
4.9k
Forks
125
Avg merge
2h 14m
Merged PRs (30d)
95

Description

The current ScriptC Linux GNU runtime package appears to require a newer glibc than Debian 12 Bookworm provides.

I reproduced this with a fresh install of the latest ScriptC release inside the current node:24-bookworm-slim Docker image.

Environment
scriptc: 0.1.3
Node: v24.21.0
Debian: Bookworm
glibc: 2.36
architecture: x86_64
Reproduction
docker run --rm -it node:24-bookworm-slim bash

Inside the container:

apt-get update
apt-get install -y --no-install-recommends binutils

mkdir /tmp/scriptc-repro
cd /tmp/scriptc-repro

npm init -y
npm install --ignore-scripts scriptc@latest

node -p 'require("./node_modules/scriptc/package.json").version'
ldd --version | head -1

Then inspect the precompiled runtime objects:

R=node_modules/@scriptc/runtime-linux-x64-gnu

for f in scr_http.o scr_fetch.o scr_cycle.o scr_lib.o; do
    echo "=== $f"
    readelf -Ws \
      "$R/artifacts/release/runtime/default/$f" \
      | grep __isoc23_ || true
done

On scriptc@0.1.3, this shows:

scr_http.o   -> UND __isoc23_strtoll
scr_fetch.o  -> UND __isoc23_strtol
scr_cycle.o  -> UND __isoc23_strtol
scr_lib.o    -> UND __isoc23_sscanf

glibc 2.36 does not provide these symbols, so linking on Bookworm can fail with errors such as:

undefined reference to `__isoc23_strtoll'
undefined reference to `__isoc23_strtol'
Expected behavior

The published @scriptc/runtime-linux-x64-gnu runtime objects should be compatible with ScriptC's minimum supported glibc version.

The docs also reference targets such as:

x86_64-linux-gnu.2.36

so I would expect glibc 2.36 to work.

Likely cause

It looks like the precompiled Linux runtime objects are being built against a newer glibc and then published unchanged.

That can bake newer libc symbol requirements into the .o files, even when the ScriptC runtime source itself could otherwise build on Bookworm.

This may also be related to #3, which added _GNU_SOURCE for Linux/glibc host builds.

Possible fix

Build the published linux-x64-gnu runtime pack against an explicit minimum glibc/sysroot, and add CI that links the packaged runtime on that minimum version.

A Debian Bookworm CI job should catch this specific regression.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in the node:24-bookworm-slim Docker image, then inspect the packaged objects under @scriptc/runtime-linux-x64-gnu/artifacts/release/runtime/default/ with readelf. Done means the published linux-x64-gnu runtime links on glibc 2.36 and CI includes a Debian Bookworm check that catches newer symbol requirements.

Written by the indexing model from the issue text.

Assessment

Tech stack
debian, docker, linux, node.js
Domain
build-system, ci-cd, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.