ci: nix-test fails to link on the ubuntu-26.04 runner image

Aperta
#6,125 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, linux

Direzione di ricerca

The failure is in the nix-test job, which is defined by runs-on: ubuntu-latest in .github/workflows/nix.yml. Start there, then find where the cgo flags add -L/usr/lib/llvm-20/lib so the host libedit.so.2 gets linked. Done means nix-test links and passes on the ubuntu-26.04 image. Pinning ubuntu-24.04 is the quick fix; keeping the build off host libraries is the durable one, and the maintainers have not chosen between them.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

The nix-test job fails to link tinygo on the new ubuntu-26.04 runner image. GitHub is moving ubuntu-latest from ubuntu-24.04 to ubuntu-26.04, and .github/workflows/nix.yml uses runs-on: ubuntu-latest. The PR does not cause the failure, and dev will fail in the same way when its runs get the new image.

Failing build (PR #6074, image ubuntu-26.04 version 20261015.610): https://github.com/tinygo-org/tinygo/actions/runs/41259602030/job/124713295365

Last passing build on dev (2170767e, image ubuntu-24.04 version 20261021.618): https://github.com/tinygo-org/tinygo/actions/runs/41159893174

/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfgetispeed@GLIBC_2.42'
/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfsetispeed@GLIBC_2.42'
/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfsetospeed@GLIBC_2.42'
/nix/store/v9zpzmigqkcjrw1jpf0zjc49y47cm55s-binutils-2.44/bin/ld: /usr/lib/x86_64-linux-gnu/libedit.so.2: undefined reference to `cfgetospeed@GLIBC_2.42'
collect2: error: ld returned 1 exit status

The link uses the -L/usr/lib/llvm-20/lib search paths from the cgo flags, so it finds the libedit.so.2 of the host. On ubuntu-26.04 that library needs glibc 2.42, but the nix toolchain links against an older glibc.

Possible fixes:

  • Pin runs-on: ubuntu-24.04 in nix.yml. This is a quick fix, but the problem comes back when 24.04 is removed.
  • Stop host library paths from getting into the nix build, so that it links only against nix libraries.

cc @dgryski

Lingua principale
Go
Stelle
17.8k
Fork
1.1k
Merge medio
1g 4h
PR unite (30g)
380

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tinygo-org/tinygo

Tutte le issue di tinygo-org/tinygo

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.