graalvm / graalvm/mx

Cannot unzip tar files when using Python 3.14

Open
#303 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
205
Forks
129
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

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

Start with the attached Python stack trace and full mx build log, then reproduce the musl toolchain extraction from the compiler/ directory using Python 3.14 after clearing ~/.mx/cache/. Trace the tar extraction path used by mx and verify that the musl archive extracts successfully and the documented mx build completes without the AbsoluteLinkError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.