Bug 2363674 - Dependency between termios.h and struct termio causes userspace to FTBFS on ppc64le
Summary: Dependency between termios.h and struct termio causes userspace to FTBFS on p...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-headers
Version: rawhide
Hardware: ppc64le
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Justin M. Forbes
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/linuxppc/issues/is...
Whiteboard:
Depends On:
Blocks: PPCTracker PYTHON3.14
TreeView+ depends on / blocked
 
Reported: 2025-05-02 15:25 UTC by Tulio Magno Quites Machado Filho
Modified: 2025-05-20 04:57 UTC (History)
20 users (show)

Fixed In Version: kernel-headers-6.15.0-0.rc7.57.fc43
Clone Of:
Environment:
Last Closed: 2025-05-20 04:57:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tulio Magno Quites Machado Filho 2025-05-02 15:25:54 UTC
1. Please describe the problem:

Userspace started to FTBFS due to a dependency issue in the ppc64le headers, where asm/ioctls.h depends on struct termio, which is provided by asm/termios.h.
At minimum, asm/ioctls.h is missing an inclusion of a header.
However, considering that old glibc versions also provide struct termio, it would be ideal to split termio-specific code into its own header.

2. What is the Version-Release number of the kernel:
6.15.0-0.rc2.22.fc43.ppc64le


3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :

This used to work until glibc removed termio.h.
After the removal of that header, it exposed an implementation issue in the powerpc-specific headers of the kernel.


4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:

$ cat tst-ioctls.c 
#include <stddef.h>
#include <termios.h>
#include <asm/ioctls.h>
//#include <asm/termios.h>


size_t get_termios_sz() {
  return sizeof(struct termios);
}

int get_TCGETA() {
  return TCGETA;
}
$ gcc tst-ioctls.c 
In file included from /usr/include/asm/ioctl.h:12,
                 from /usr/include/asm/ioctls.h:5,
                 from tst-ioctls.c:3:
tst-ioctls.c: In function 'get_TCGETA':
tst-ioctls.c:12:10: error: invalid application of 'sizeof' to incomplete type 'struct termio'
   12 |   return TCGETA;
      |          ^~~~~~


5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:

Yes.

6. Are you running any modules that not shipped with directly Fedora's kernel?:
No.

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Reproducible: Always

Comment 1 Tulio Magno Quites Machado Filho 2025-05-02 15:28:32 UTC
We've already seen this impacting:

- LLVM: https://src.fedoraproject.org/rpms/llvm/pull-request/422
- Python: https://github.com/python/cpython/issues/133285

GCC will also FTBFS, but I haven't seen a public discussion yet.

Comment 2 Tulio Magno Quites Machado Filho 2025-05-02 17:48:36 UTC
I've just reported the issue upstream at: https://github.com/linuxppc/issues/issues/488

Comment 3 Miro Hrončok 2025-05-05 08:38:15 UTC
This blocks further work on Python 3.14.

Comment 4 Dan Horák 2025-05-05 08:49:45 UTC
Hi Tulio,
shall we report this issue to the linuxppc-dev kernel mailing list as well? Not sure how active the github tracker is.

Comment 5 Tulio Magno Quites Machado Filho 2025-05-05 13:36:55 UTC
Done: https://lore.kernel.org/linuxppc-dev/8734dji5wl.fsf@ascii.art.br/T/#u

Comment 7 Charalampos Stratakis 2025-05-13 01:05:59 UTC
(In reply to Miro Hrončok from comment #3)
> This blocks further work on Python 3.14.

This also block every Python on rawhide. Is there some way to raise the priority on this?

Comment 8 Dan Horák 2025-05-13 06:35:59 UTC
I will take it to our meeting with IBM today.

Comment 9 Tulio Magno Quites Machado Filho 2025-05-13 12:15:56 UTC
Madhavan from IBM proposed a fix for this issue upstream here: https://lists.ozlabs.org/pipermail/linuxppc-dev/2025-May/283705.html
I haven't tested yet, but it does look promising.

Comment 10 Miro Hrončok 2025-05-20 04:57:01 UTC
Thanks for the fix.


Note You need to log in before you can comment on or make changes to this bug.