u-boot fails to build on sparc64 due redefinition of 'struct termio'

John Paul Adrian Glaubitz glaubitz at physik.fu-berlin.de
Wed Nov 15 08:26:51 CET 2023


Hello!

On Linux sparc64, building u-boot fails with [1]:

cc   -o tools/mkenvimage tools/mkenvimage.o tools/os_support.o tools/lib/crc32.o   
In file included from /<<PKGBUILDDIR>>/tools/termios_linux.h:33,
                 from /<<PKGBUILDDIR>>/tools/kwboot.c:153:
/usr/include/sparc64-linux-gnu/asm/termbits.h:14:8: error: redefinition of 'struct termio'
   14 | struct termio {
      |        ^~~~~~
In file included from /usr/include/sparc64-linux-gnu/sys/ioctl.h:29,
                 from /<<PKGBUILDDIR>>/tools/termios_linux.h:30:
/usr/include/sparc64-linux-gnu/bits/ioctl-types.h:36:8: note: originally defined here
   36 | struct termio
      |        ^~~~~~

Reading through tools/termios_linux.h, it seems like the problem is that <asm/ioctl.h>
and <asm/termbits.h> are included at the same time. Not sure whether this is allowed
according to the glibc documentation.

Full build log available in [1].

Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=u-boot&arch=sparc64&ver=2023.07%2 Bdfsg-1&stamp=1699723544&raw=0

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


More information about the U-Boot mailing list