[Expired for linux (Ubuntu) because there has been no activity for 60
days.]

** Changed in: linux (Ubuntu)
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1619446

Title:
  mismatching headers between powerpc/ppc64el and other archs

Status in linux package in Ubuntu:
  Expired

Bug description:
  the header files from linux-libc-dev are causing repsnapper on
  -proposed to FTBFS on powerpc/ppc64el

  I tracked it to 2 include clauses:

  #include <sys/ioctl.h>
  #include <asm/termbits.h>

  causing the following error on powerpc/ppc64el builds:

  following errors:

    src/printer/custom_baud.cpp: In function 'bool set_custom_baudrate(int, 
int)':
    src/printer/custom_baud.cpp:15:19: error: aggregate 
'set_custom_baudrate(int, int)::termios2 options' has incomplete type and 
cannot be defined
       struct termios2 options;
                     ^
    src/printer/custom_baud.cpp:17:26: error: 'TCGETS2' was not declared in 
this scope
       if ( ioctl( device_fd, TCGETS2, &options ) < 0 ) {
                            ^
    src/printer/custom_baud.cpp:27:26: error: 'TCSETS2' was not declared in 
this scope
       if ( ioctl( device_fd, TCSETS2, &options ) < 0 ) {

  Please see bug #1619100 for more info.

  Comparing the powerpc/ppc64el headers to amd64 I found that they seem
  to be missing includes to other headers under asm-generic/

  If I try to add the missing asm-generic headers:

  #include <sys/ioctl.h>
  #include <asm/termbits.h>
  #include <asm-generic/ioctls.h>
  #include <asm-generic/termbits.h>

  Then the build again fails on both powerpc/ppc64el and succeeds on all
  other archs, this time the error is:

  In file included from src/printer/custom_baud.cpp:11:0:
  /usr/include/asm-generic/termbits.h:11:8: error: redefinition of ‘struct 
termios’
   struct termios {
          ^~~~~~~
  In file included from src/printer/custom_baud.cpp:9:0:
  /usr/include/powerpc-linux-gnu/asm/termbits.h:22:8: error: previous 
definition of ‘struct termios’
   struct termios {
          ^~~~~~~
  In file included from src/printer/custom_baud.cpp:11:0:
  /usr/include/asm-generic/termbits.h:31:8: error: redefinition of ‘struct 
ktermios’
   struct ktermios {
          ^~~~~~~~
  In file included from src/printer/custom_baud.cpp:9:0:
  /usr/include/powerpc-linux-gnu/asm/termbits.h:35:8: error: previous 
definition of ‘struct ktermios’
   struct ktermios {
          ^~~~~~~~

  Finally, modifying the original includes to remove the asm/termbits.h:

  #include <sys/ioctl.h>
  #include <asm-generic/ioctls.h>
  #include <asm-generic/termbits.h>

  Allows for the repsnapper build to succeed on all arches, including
  powerpc/ppc64el. Question is: why is this even needed?

  
  linux-libc-dev packages:
  Get:10 http://ftpmaster.internal/ubuntu yakkety/main powerpc linux-libc-dev 
powerpc 4.4.0-9136.55 [818 kB]
  Get:10 http://ftpmaster.internal/ubuntu yakkety/main ppc64el linux-libc-dev 
ppc64el 4.4.0-9136.55 [818 kB]
  Get:10 http://ftpmaster.internal/ubuntu yakkety/main amd64 linux-libc-dev 
amd64 4.4.0-9136.55 [828 kB]

  Checking the headers is seems that powerpc/ppc64el are missing
  includes for asm-generics:

  $ grep -r TCGETS2 linux-libc-dev_4.4.0-9136.55_*/
  linux-libc-dev_4.4.0-9136.55_amd64/usr/include/asm-generic/ioctls.h:#define 
TCGETS2           _IOR('T', 0x2A, struct termios2)
  linux-libc-dev_4.4.0-9136.55_ppc64el/usr/include/asm-generic/ioctls.h:#define 
TCGETS2         _IOR('T', 0x2A, struct termios2)

  $ grep -r ioctls.h linux-libc-dev_4.4.0-9136.55_*/
  
linux-libc-dev_4.4.0-9136.55_amd64/usr/include/x86_64-linux-gnu/asm/ioctls.h:#include
 <asm-generic/ioctls.h>
  linux-libc-dev_4.4.0-9136.55_amd64/usr/include/asm-generic/termios.h:#include 
<asm/ioctls.h>
  
linux-libc-dev_4.4.0-9136.55_ppc64el/usr/include/asm-generic/termios.h:#include 
<asm/ioctls.h>
  
linux-libc-dev_4.4.0-9136.55_ppc64el/usr/include/powerpc64le-linux-gnu/asm/termios.h:#include
 <asm/ioctls.h>

  $ grep -r "termios2 {" linux-libc-dev_4.4.0-9136.55_*/     
  linux-libc-dev_4.4.0-9136.55_amd64/usr/include/asm-generic/termbits.h:struct 
termios2 {
  
linux-libc-dev_4.4.0-9136.55_ppc64el/usr/include/asm-generic/termbits.h:struct 
termios2 {

  $ grep -r termbits.h linux-libc-dev_4.4.0-9136.55_*/  
  
linux-libc-dev_4.4.0-9136.55_amd64/usr/include/x86_64-linux-gnu/asm/termbits.h:#include
 <asm-generic/termbits.h>
  linux-libc-dev_4.4.0-9136.55_amd64/usr/include/asm-generic/termios.h:#include 
<asm/termbits.h>
  
linux-libc-dev_4.4.0-9136.55_ppc64el/usr/include/asm-generic/termios.h:#include 
<asm/termbits.h>
  
linux-libc-dev_4.4.0-9136.55_ppc64el/usr/include/powerpc64le-linux-gnu/asm/termios.h:#include
 <asm/termbits.h>

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1619446/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to