Cannot unzip tar files when using Python 3.14

Đang mở
#303 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu với Python stack trace đính kèm và toàn bộ log của mx build, sau đó tái hiện việc giải nén musl toolchain từ thư mục compiler/ bằng Python 3.14 sau khi xóa ~/.mx/cache/. Theo dõi đường dẫn giải nén tar được mx sử dụng và xác minh rằng kho lưu trữ musl được giải nén thành công, đồng thời mx build được ghi trong tài liệu hoàn tất mà không có AbsoluteLinkError.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
205
Fork
131
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của graalvm/mx

Tất cả issue của graalvm/mx

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.