Cannot unzip tar files when using Python 3.14

Aperta
#303 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
cli, tooling

Direzione di ricerca

Inizia con lo stack trace Python allegato e il log completo di mx build, quindi riproduci l'estrazione della toolchain musl dalla directory compiler/ usando Python 3.14 dopo aver svuotato ~/.mx/cache/. Traccia il percorso di estrazione tar usato da mx e verifica che l'archivio musl venga estratto correttamente e che il mx build documentato venga completato senza l'AbsoluteLinkError.

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

Descrizione

While I was trying to compile the graal compiler using the instructions provided in its README I kept getting the same error:

tarfile.AbsoluteLinkError: 'musl-toolchain/x86_64-linux-musl/lib/ld-musl-x86_64.so.1' is a link to an absolute path

After a bit of investigating/searching for answers I pondered upon the tarfile documentation for Python 3.14 where I saw a change/new default for Python 3.14:

Changed in version 3.14: Set the default extraction filter to data, which disallows some dangerous features such as links to absolute paths or paths outside of the destination. Previously, the filter strategy was equivalent to fully_trusted.

Using this new information I tried once again with a lower Python version (Python 3.11) and it seems to have worked - the musl tar file extracted without any problems.

Steps to reproduce

(Delete cache of extracted musl tar file if it exists, on Linux in ~/.mx/cache/)
Clone graal compiler repository (by cloning the graal repo and going intocompiler/ )
Follow the steps
During the step to build (using mx build) observe tarfile extraction failure

Expected behaviour

While compiling graal compiler it extraction of tar files succeeds without any errors.

Observed

While trying to extract musl gcc toolchain it fails with tarfile.AbsoluteLinkError: 'musl-toolchain/x86_64-linux-musl/lib/ld-musl-x86_64.so.1'

Debug info

Platform: Linux (EndeavourOS) x86_64
Kernel version: 7.0.10-zen1-1-zen
Python version affected: Python 3.14

Included two files, stack trace from Python error and mxbuild logs (using --build-logs=full option).

Python stack-trace:

python-stack-trace.txt

mxbuild logs:

buildlog-20260526-231432.html

Lingua principale
Python
Stelle
205
Fork
131
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 graalvm/mx

Tutte le issue di graalvm/mx

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.