gpm icon indicating copy to clipboard operation
gpm copied to clipboard

Fail to compile on GCC 7.2, glibc2.26

Open ghost opened this issue 6 years ago • 6 comments

gcc -I. -I/tmp/work/src/gpm/src -DHAVE_CONFIG_H -include headers/config.h -Wall -DSYSCONFDIR=""/etc"" -DSBINDIR=""/usr/sbin"" -D_GNU_SOURCE -O2 -pipe -O2 -pipe -c -o prog/gpm-root.o prog/gpm-root.c /tmp/work/src/gpm/src/prog/gpm-root.y: In function 'postmenu': /tmp/work/src/gpm/src/prog/gpm-root.y:1030:32: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] #define PUTS(s,f,b) for(curr2=s;curr2;PUTC((curr2++),f,b)) ^ /tmp/work/src/gpm/src/prog/gpm-root.y:1045:10: note: in expansion of macro 'PUTS' PUTS(draw->title,draw->head,draw->back); ^~~~ /tmp/work/src/gpm/src/prog/gpm-root.y:1030:32: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] #define PUTS(s,f,b) for(curr2=s;curr2;PUTC((curr2++),f,b)) ^ /tmp/work/src/gpm/src/prog/gpm-root.y:1053:10: note: in expansion of macro 'PUTS' PUTS(item->name,draw->fore,draw->back); i+=strlen(item->name); ^~~~ /tmp/work/src/gpm/src/prog/gpm-root.y: In function 'main': /tmp/work/src/gpm/src/prog/gpm-root.y:1200:4: warning: implicit declaration of function '__sigemptyset'; did you mean 'sigemptyset'? [-Wimplicit-function-declaration] __sigemptyset(&childaction.sa_mask); ^~~~~~~~~~~~~ sigemptyset gcc -L/tmp/work/src/gpm/src -lm -o prog/gpm-root prog/gpm-root.o lib/libgpm.so.2 prog/gpm-root.o: In function main': gpm-root.c:(.text.startup+0x1fe): undefined reference to __sigemptyset'

ghost avatar Aug 07 '17 12:08 ghost

Doesn't fail to build with gcc 7.1.0 in Debian Unstable at least. But then again, Debian applies a bunch of patches and is not uptodate (has 1.20.4 packaged) as the package is currently orphaned.

xtaran avatar Aug 07 '17 20:08 xtaran

Working proposal: http://downloads.nutyx.org/x86_64/development/base/gpm/gpm-1.20.7-glibc-2.26-1.patch

ghost avatar Aug 10 '17 08:08 ghost

I can confirm this issue under GCC-7.2.0 and glibc-2.26. Both of them have changes that cause the patch by @tnut to be needed. I can confirm this on LFS SVN-20170815-systemd, as this is our release candidate. Whether it was gcc-7.2.0 or glibc-2.26 that caused it to be required, I'm not sure, but what I do know is that modification is required.

@tnut http://wiki.linuxfromscratch.org/blfs/ticket/9616#ticket

renodr avatar Aug 16 '17 02:08 renodr

@tnut https://github.com/tnut http://wiki.linuxfromscratch. org/blfs/ticket/9616#ticket

Thanks for info, yes I did that, it works fine for me.

ghost avatar Aug 16 '17 18:08 ghost

Today, GCC 7.2.0 reached Debian Unstable and gpm still compiles fine on Debian Unstable, i.e. with all the patches shipped in Debian as mentioned before. But then again, Debian still has glibc 2.24. So I assume that either glibc 2.26 is the culprit or one of the patches in Debian fixed this issue preemptively.

(And JFTR as this also changed since my last comment on this ticket: I've adopted the Debian package of gpm together with Samuel Thibault and packaged 1.20.7.)

xtaran avatar Aug 19 '17 09:08 xtaran

glibc is the issue, not gcc, look at my patch.

ghost avatar Aug 19 '17 15:08 ghost