On Fri, Jun 23, 2017 at 2:34 AM, James Cowgill <james.cowg...@imgtec.com> wrote: > Hi, > > On 22/06/17 20:59, Ian Lance Taylor wrote: >> James, any thoughts? >> >> Ian >> >> On Thu, Jun 22, 2017 at 12:55 AM, Andreas Schwab <sch...@suse.de> wrote: >>> On Jun 21 2017, Ian Lance Taylor <i...@golang.org> wrote: >>> >>>> Index: libgo/sysinfo.c >>>> =================================================================== >>>> --- libgo/sysinfo.c (revision 249205) >>>> +++ libgo/sysinfo.c (working copy) >>>> @@ -102,6 +102,9 @@ >>>> #if defined(HAVE_LINUX_NETLINK_H) >>>> #include <linux/netlink.h> >>>> #endif >>>> +#if defined(HAVE_LINUX_PTRACE_H) >>>> +#include <linux/ptrace.h> >>>> +#endif >>>> #if defined(HAVE_LINUX_RTNETLINK_H) >>>> #include <linux/rtnetlink.h> >>>> #endif >>> >>> That breaks ia64: >>> >>> In file included from /usr/include/asm/ptrace.h:58:0, >>> from /usr/include/linux/ptrace.h:69, >>> from ../../../libgo/sysinfo.c:106: >>> /usr/include/asm/fpu.h:57:8: error: redefinition of 'struct ia64_fpreg' >>> struct ia64_fpreg { >>> ^~~~~~~~~~ >>> In file included from /usr/include/signal.h:339:0, >>> from >>> /usr/local/gcc/gcc-20170622/Build/gcc/include-fixed/sys/ucontext.h:32, >>> from /usr/include/ucontext.h:27, >>> from ../../../libgo/sysinfo.c:17: >>> /usr/include/bits/sigcontext.h:32:8: note: originally defined here >>> struct ia64_fpreg >>> ^~~~~~~~~~ >>> In file included from /usr/include/linux/ptrace.h:69:0, >>> from ../../../libgo/sysinfo.c:106: >>> /usr/include/asm/ptrace.h:208:8: error: redefinition of 'struct >>> pt_all_user_regs' >>> struct pt_all_user_regs { >>> ^~~~~~~~~~~~~~~~ >>> In file included from ../../../libgo/sysinfo.c:66:0: >>> /usr/include/sys/ptrace.h:116:8: note: originally defined here >>> struct pt_all_user_regs >>> ^~~~~~~~~~~~~~~~ > > This looks like this glibc bug which was fixed in 2.19. > https://sourceware.org/bugzilla/show_bug.cgi?id=762
Thanks. Andreas, can we avoid the problem for earlier glibc versions with a patch like the appended? Ian
diff --git a/libgo/sysinfo.c b/libgo/sysinfo.c index a1afc7d1..80407443 100644 --- a/libgo/sysinfo.c +++ b/libgo/sysinfo.c @@ -38,7 +38,10 @@ #if defined(HAVE_NETINET_IF_ETHER_H) #include <netinet/if_ether.h> #endif +/* Avoid https://sourceware.org/bugzilla/show_bug.cgi?id=762 . */ +#define ia64_fpreg pt_ia64_fpreg #include <signal.h> +#undef ia64_fpreg #include <sys/ioctl.h> #include <termios.h> #if defined(HAVE_SYSCALL_H)