Skip to content

Typst errors out due to old libc on Ubuntu 20.04.5 LTS #109

@SaadiSave

Description

@SaadiSave

Problem

❯ typst --version
typst: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by typst)
typst: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by typst)
typst: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by typst)
typst: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by typst)

Platform

I am running Ubuntu 20.04.5 LTS (released 2020-04-24, latest patch 2022-09-01), with glibc version 2.31 (released 2020-02-01):

❯ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
❯ ldd --version    
ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

Possible solutions

  1. Build binary on slightly older Linux version in CI, e.g. Debian 11 or Ubuntu 20.04/18.04 LTS.
  2. Compile using musl target

(2) is ideal since musl can be embedded into the binary, providing maximum portability by compiling a static binary with no runtime dependencies. That means it can theoretically run on 10 year old linux too.

Workarounds

  1. Compile from source
  2. Upload to crates.io, then cargo install typst (Same effect as (1))

I will explore these solutions later this week, or perhaps the next, because I have my uni exams. This issue is similar to JuliaLang/juliaup#334

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliAbout Typst's command line interface.devopsPackaging, CI, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions