python / python/cpython

TCGETA, TCSETA, TCSETAF, TCSETAW termios ioctl no longer usable on all architectures with glibc 2.42

Đang mở
#142,379 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.

build extension-modules OS-linux OS-unsupported type-bug
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

Bug report

Bug description:

The build of cpython is broken with glibc 2.42 on at least the alpha, hppa and sparc64 architectures, as reported for example on Gentoo: https://bugs.gentoo.org/962600, but also affecting Buildroot: https://autobuild.buildroot.net/results/e7d/e7d951b06e9338e622fe96b0fb02823b1ef5235c/build-end.log. The build failure looks like this:

./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to incomplete type 'struct termio'
 1119 |     {"TCGETA", TCGETA},
      |                ^~~~~~
./Modules/termios.c:1131:16: error: invalid application of 'sizeof' to incomplete type 'struct termio'
 1131 |     {"TCSETA", TCSETA},
      |                ^~~~~~
./Modules/termios.c:1134:17: error: invalid application of 'sizeof' to incomplete type 'struct termio'
 1134 |     {"TCSETAF", TCSETAF},
      |                 ^~~~~~~
./Modules/termios.c:1137:17: error: invalid application of 'sizeof' to incomplete type 'struct termio'
 1137 |     {"TCSETAW", TCSETAW},
      |                 ^~~~~~~

The problem is that on those architectures, ioctls.h reference "struct termio", which has been removed from glibc 2.42. https://lists.gnu.org/archive/html/info-gnu/2025-07/msg00011.html.

While the issue is being fixed in the upstream Linux kernel, it will take time for those fixes to propagate, and a fix in Python would be relevant. PR coming.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Linked PRs
  • gh-142380

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu trong Modules/termios.c, xung quanh các mục TCGETA, TCSETA, TCSETAF và TCSETAW, rồi xem xét lỗi glibc 2.42 trên alpha, hppa và sparc64. Nếu có thể, hãy tái hiện bản build bị ảnh hưởng; công việc được xem là hoàn tất khi CPython build thành công trên các kiến trúc đó mà không có lỗi về struct termio chưa hoàn chỉnh.

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

Đánh giá

Công nghệ
c, linux, python
Lĩnh vực
build-system, operating-systems
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
20/100

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.