Skip to content

typst-gather binary not compatible with Ubuntu 22.04 (GLIBC 2.38 floor) #14445

@mcanouil

Description

@mcanouil

I have:

  • searched the issue tracker for similar issues.
  • installed the latest version of Quarto CLI (1.10.3 prerelease).
  • formatted my issue following the Bug Reports guide.

Bug description

The typst-gather binary bundled with Quarto prerelease 1.10.3 (/opt/quarto/bin/tools/x86_64/typst-gather) is dynamically linked against GLIBC ≥ 2.38 and cannot run on Ubuntu 22.04, Debian 12, or RHEL 9 (anything older than Ubuntu 24.04 or Debian 13).

This includes Quarto's own first-party container image ghcr.io/quarto-dev/quarto:1.10.3, which is built on Ubuntu 22.04 (GLIBC 2.35) and therefore cannot run its own bundled typst-gather.

Any render to a Typst format on those distros logs:

WARN: typst-gather analyze failed; staging all packages as fallback

The warning hides the real cause because analyzeNeededPackages discards the captured stderr.
The actual stderr from the binary is:

/opt/quarto/bin/tools/x86_64/typst-gather: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /opt/quarto/bin/tools/x86_64/typst-gather)

While diagnosing this I also hit an unhandled TypeError: Writable stream is closed or errored. originating from src/core/process.ts:97.
process.stdin.close() there is fire-and-forget, so when the child (here, typst-gather) closes stdin first, the rejection escapes the surrounding try/catch in analyzeNeededPackages and aborts the render.
This is reachable only while the typst-gather binary is broken, but it turns a recoverable warning into a hard render failure and is reported in the CI logs cited below.
Happy to split it into a separate issue if preferred.

Upstream cause

The Linux artefact comes from quarto-dev/typst-gather v0.2.2.
Its release workflow builds on runs-on: ubuntu-latest, which currently resolves to Ubuntu 24.04 (GLIBC 2.39).

A symbol audit (objdump -T) of the shipped binary shows the floor is pinned by a single symbol: __isoc23_strtol.
Every other libc symbol it needs is at most GLIBC_2.34.

Filing here in quarto-cli because that is the project that ships this binary to end users.
Happy to also open an issue on quarto-dev/typst-gather if preferred.

Steps to reproduce

Against Quarto's own first-party image:

docker run --rm --platform linux/amd64 ghcr.io/quarto-dev/quarto:1.10.3 \
  /opt/quarto/bin/tools/x86_64/typst-gather --version
# /opt/quarto/bin/tools/x86_64/typst-gather: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found ...
# exit=1

Steps:

---
title: "Typst smoke test"
format: typst
keep-typ: true
---

Hello.
quarto render smoke.qmd
# WARN: typst-gather analyze failed; staging all packages as fallback

Affects 59 extensions (at the time of writing, a bump to Ubuntu 24.04 is ongoing) in https://github.com/mcanouil/quarto-extensions CI on the prerelease channel; full failure list at https://github.com/mcanouil/quarto-extensions/blob/quarto-tests/test-results.json.

Actual behaviour

typst-gather analyze fails immediately with a GLIBC loader error.
Quarto logs a generic warning that hides the real cause, then either falls back to staging all packages (best case) or crashes with an unhandled rejection from process.stdin.close() in src/core/process.ts:97 (intermittent, observed in CI logs).

Expected behaviour

typst-gather runs on the documented base images, including Quarto's own ghcr.io/quarto-dev/quarto:1.10.3 image (Ubuntu 22.04, GLIBC 2.35).
When typst-gather analyze does fail, the captured stderr should be surfaced rather than swallowed, so the cause is diagnosable without bypassing quarto.

Or, if the GLIBC ≥ 2.38 floor is intentional for Quarto 1.10's Typst pipeline, the OS / glibc requirement should be documented as a 1.10 release note and on the Typst page, so users know that rendering to Typst now requires Ubuntu 24.04 / Debian 13 / RHEL 10 or newer.
The official ghcr.io/quarto-dev/quarto image base should also be bumped to a glibc ≥ 2.38 distro, otherwise users following the documented setup hit this immediately.

Your environment

  • IDE: N/A (CLI in Docker).
  • OS: Ubuntu 22.04.5 LTS, GLIBC 2.35 (verified on both ghcr.io/quarto-dev/quarto:1.10.3 and ghcr.io/mcanouil/quarto-codespaces:prerelease).
  • Reproduced both natively on linux/amd64 and via Rosetta on linux/arm64/v8.

Quarto check output

Quarto 1.10.3

[✓] Checking environment information...
      Quarto cache location: /home/vscode/.cache/quarto

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.8.3: OK
      Dart Sass version 1.87.0: OK
      Deno version 2.4.5: OK
      Typst version 0.14.2: OK

[✓] Checking versions of quarto dependencies......OK

[✓] Checking Quarto installation......OK
      Version: 1.10.3
      Path: /opt/quarto/bin


(|) Checking tools....................
[✓] Checking tools....................OK
      TinyTeX: (external install)
      Chrome Headless Shell: (not installed)
      VeraPDF: (not installed)


(|) Checking LaTeX....................
[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/local/bin
      Version: 2026


[✓] Checking Chrome Headless....................OK
      Using: Chrome found on system
      Path: /usr/bin/google-chrome
      Source: PATH


(|) Checking basic markdown render....
[✓] Checking basic markdown render....OK


(|) Checking R installation...........
[✓] Checking R installation...........OK
      Version: 4.6.0
      Path: /opt/R/4.6.0/lib/R
      LibPaths:
        - /home/vscode/R/x86_64-pc-linux-gnu-library/4.6
        - /opt/R/4.6.0/lib/R/library
      knitr: 1.51
      rmarkdown: 2.31


(|) Checking Knitr engine render......
[✓] Checking Knitr engine render......OK


(|) Checking Python 3 installation....
[✓] Checking Python 3 installation....OK
      Version: 3.13.9
      Path: /usr/local/python/current/bin/python3
      Jupyter: 5.9.1
      Kernels: julia-1.12, python3


(|) Checking Jupyter engine render....
[✓] Checking Jupyter engine render....OK


(|) Checking Julia installation...
[✓] Checking Julia installation...

Metadata

Metadata

Labels

bugSomething isn't workingtriaged-toIssues that were not self-assigned, signals that an issue was assigned to someone.typst

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions