Skip to content

Python 3.14 and 3.13 fail to build on PPC64LE Fedora Rawhide: incomplete type ‘struct termio’ #133285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vstinner opened this issue May 2, 2025 · 7 comments
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error

Comments

@vstinner
Copy link
Member

vstinner commented May 2, 2025

PPC64LE Fedora Rawhide 3.x (GCC): https://buildbot.python.org/all/#/builders/455/builds/7290

gcc  -fno-strict-overflow -Wsign-compare -g -Og -Wall    -flto -fuse-linker-plugin -ffat-lto-objects -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I../Include/internal -I../Include/internal/mimalloc -IObjects -IInclude -IPython -I. -I../Include   -fPIC -fPIC -c ../Modules/termios.c -o Modules/termios.o
In file included from /usr/include/asm/ioctl.h:12,
                 from /usr/include/asm/ioctls.h:5,
                 from /usr/include/bits/ioctls.h:23,
                 from /usr/include/sys/ioctl.h:26,
                 from ../Modules/termios.c:13:
../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},
      |                 ^~~~~~~

PPC64LE Fedora Rawhide Clang 3.x (clang): https://buildbot.python.org/all/#/builders/33/builds/7515

clang  -fno-strict-overflow -Wsign-compare -g -Og -Wall    -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include    -fPIC -c ./Modules/termios.c -o Modules/termios.o
./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to an incomplete type 'struct termio'
 1119 |     {"TCGETA", TCGETA},
      |                ^~~~~~
@vstinner vstinner changed the title Python 3.14 fails to build on Fedora Rawhide: incomplete type ‘struct termio’ Python 3.14 fails to build on PPC64LE Fedora Rawhide: incomplete type ‘struct termio’ May 2, 2025
@vstinner
Copy link
Member Author

vstinner commented May 2, 2025

cc @stratakis

@vstinner
Copy link
Member Author

vstinner commented May 2, 2025

Same error on the 3.13 branch.

PPC64LE Fedora Rawhide Clang 3.13: https://buildbot.python.org/all/#/builders/1409/builds/592

./Modules/termios.c:1119:16: error: invalid application of 'sizeof' to an incomplete type 'struct termio'
 1119 |     {"TCGETA", TCGETA},
      |                ^~~~~~
/usr/include/asm/ioctls.h:26:17: note: expanded from macro 'TCGETA'
   26 | #define TCGETA          _IOR('t', 23, struct termio)
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/asm-generic/ioctl.h:84:60: note: expanded from macro '_IOR'
   84 | #define _IOR(type,nr,argtype)           _IOC(_IOC_READ,(type),(nr),(_IOC_TYPECHECK(argtype)))
      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/asm-generic/ioctl.h:75:28: note: expanded from macro '_IOC_TYPECHECK'
   75 | #define _IOC_TYPECHECK(t) (sizeof(t))
      |                            ^
/usr/include/asm-generic/ioctl.h:73:5: note: expanded from macro '_IOC'
   73 |          ((size) << _IOC_SIZESHIFT))
      |            ^~~~
./Modules/termios.c:1119:16: note: forward declaration of 'struct termio'
/usr/include/asm/ioctls.h:26:38: note: expanded from macro 'TCGETA'
   26 | #define TCGETA          _IOR('t', 23, struct termio)
      |                                              ^

@stratakis
Copy link
Contributor

This started happening after GCC was updated from 15 to 15.1.

@yselkowitz
Copy link

This is actually due to an updated glibc snapshot in rawhide: https://lists.fedoraproject.org/archives/list/[email protected]/message/5E553SEIQLUFO66BEDBRSJLT3RKNYZXI/

@tuliom
Copy link

tuliom commented May 2, 2025

IMHO, the glibc update just exposed an issue in the kernel headers.
FYI: https://bugzilla.redhat.com/show_bug.cgi?id=2363674

@picnixz picnixz added type-bug An unexpected behavior, bug, or error build The build process and cross-build OS-unsupported 3.14 bugs and security fixes labels May 4, 2025
@picnixz picnixz added 3.13 bugs and security fixes and removed OS-unsupported labels May 4, 2025
@hroncok
Copy link
Contributor

hroncok commented May 5, 2025

For the record, this impacts all the supported Python versions.

@vstinner
Copy link
Member Author

vstinner commented May 5, 2025

IMHO, the glibc update just exposed an issue in the kernel headers.
FYI: https://bugzilla.redhat.com/show_bug.cgi?id=2363674

The issue was reported to linuxppc upstream: linuxppc/issues#488

@vstinner vstinner changed the title Python 3.14 fails to build on PPC64LE Fedora Rawhide: incomplete type ‘struct termio’ Python 3.14 and 3.13 fail to build on PPC64LE Fedora Rawhide: incomplete type ‘struct termio’ May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 bugs and security fixes 3.14 bugs and security fixes build The build process and cross-build type-bug An unexpected behavior, bug, or error
Projects
Status: No status
Development

No branches or pull requests

6 participants