[Gambas-bugtracker] Bug #1569: [PATCH] 3.13.0 Fails to build on ppc64 and ppc64el

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Tue May 7 10:13:25 CEST 2019


http://gambaswiki.org/bugtracker/edit?object=BUG.1569&from=L21haW4-

Gianfranco COSTAMAGNA reported a new bug.

Summary
-------

[PATCH] 3.13.0 Fails to build on ppc64 and ppc64el

Type             : Bug
Priority         : Medium
Gambas version   : Master
Product          : Networking components


Description
-----------

this is the failure (probably a bug in the kernel? don't know)

https://buildd.debian.org/status/fetch.php?pkg=gambas3&arch=ppc64el&ver=3.13.0-1~exp2&stamp=1557164383&raw=0
Making all in src
make[5]: Entering directory '/<<PKGBUILDDIR>>/gb.net/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-main.lo `test -f 'main.c' || echo './'`main.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-tools.lo `test -f 'tools.c' || echo './'`tools.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-speed.lo `test -f 'speed.c' || echo './'`speed.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-CDnsClient.lo `test -f 'CDnsClient.c' || echo './'`CDnsClient.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-CSocket.lo `test -f 'CSocket.c' || echo './'`CSocket.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-CServerSocket.lo `test -f 'CServerSocket.c' || echo './'`CServerSocket.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-CUdpSocket.lo `test -f 'CUdpSocket.c' || echo './'`CUdpSocket.c
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c -o gb_net_la-CSerialPort.lo `test -f 'CSerialPort.c' || echo './'`CSerialPort.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c main.c  -fPIC -DPIC -o .libs/gb_net_la-main.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c CUdpSocket.c  -fPIC -DPIC -o .libs/gb_net_la-CUdpSocket.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c CSocket.c  -fPIC -DPIC -o .libs/gb_net_la-CSocket.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c speed.c  -fPIC -DPIC -o .libs/gb_net_la-speed.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c CSerialPort.c  -fPIC -DPIC -o .libs/gb_net_la-CSerialPort.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c CDnsClient.c  -fPIC -DPIC -o .libs/gb_net_la-CDnsClient.o
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c tools.c  -fPIC -DPIC -o .libs/gb_net_la-tools.o
speed.c: In function 'SetCustomSpeed':
speed.c:37:18: error: storage size of 'io' isn't known
  struct termios2 io;
                  ^~
speed.c:39:16: error: 'TCGETS2' undeclared (first use in this function); did you mean 'TCGETS'?
  if (ioctl(fd, TCGETS2, &io))
                ^~~~~~~
                TCGETS
speed.c:39:16: note: each undeclared identifier is reported only once for each function it appears in
speed.c:47:16: error: 'TCSETS2' undeclared (first use in this function); did you mean 'TCSETSF'?
  if (ioctl(fd, TCSETS2, &io))
                ^~~~~~~
                TCSETSF
speed.c:37:18: warning: unused variable 'io' [-Wunused-variable]
  struct termios2 io;
                  ^~
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -D_REENTRANT -Wdate-time -D_FORTIFY_SOURCE=2 -pipe -Wall -Wno-unused-value -fsigned-char -fvisibility=hidden -g -ggdb -Os -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -c CServerSocket.c  -fPIC -DPIC -o .libs/gb_net_la-CServerSocket.o
make[5]: *** [Makefile:537: gb_net_la-speed.lo] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/<<PKGBUILDDIR>>/gb.net/src'


this is what did the trick so far for me
Description: ppc64el seems to be not happy about this asm/termios.h include
Author: Gianfranco Costamagna <locutusofborg at debian.org>
Last-Update: 2019-05-06

diff --git a/gb.net/src/speed.c b/gb.net/src/speed.c
index d4b9cc24..0910d1bc 100644
--- a/gb.net/src/speed.c
+++ b/gb.net/src/speed.c
@@ -28,7 +28,8 @@

 #if OS_LINUX

-#include <asm/termios.h>
+#include <asm-generic/ioctls.h>
+#include <asm-generic/termbits.h>

 int ioctl(int fd, unsigned long request, ...);

I found the bugs below with more explanation about what is going on
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=810907
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1619446
https://bugs.launchpad.net/ubuntu/+source/repsnapper/+bug/1619100

they have been fixed in similar way, with #ifdef statements for ppc64* architecture.

I tried to build with the above patch on ubuntu and seems to build everywhere

thanks for considering it


System information
------------------

Debian experimental, Ubuntu Eoan (devel)




More information about the Bugtracker mailing list