TCGETA, TCSETA, TCSETAF, TCSETAW termios ioctl no longer usable on all architectures with glibc 2.42
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia in Modules/termios.c, intorno alle voci TCGETA, TCSETA, TCSETAF e TCSETAW, e analizza il fallimento di glibc 2.42 su alpha, hppa e sparc64. Riproduci la build interessata, se possibile; il lavoro è completo quando CPython viene compilato correttamente su queste architetture senza errori relativi a struct termio incompleta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- c, linux, python
- Ambito
- build-system, operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 20/100