NetBSD Problem Report #51382

From gson@gson.org  Sun Jul 31 15:48:20 2016
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 814B57A26E
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 31 Jul 2016 15:48:20 +0000 (UTC)
Message-Id: <20160731154814.9501E7446B8@guava.gson.org>
Date: Sun, 31 Jul 2016 18:48:14 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: xenkernel42 does not build on NetBSD-current
X-Send-Pr-Version: 3.95

>Number:         51382
>Category:       pkg
>Synopsis:       xenkernel42 does not build on NetBSD-current
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    maya
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 31 15:50:00 +0000 2016
>Closed-Date:    Mon Sep 12 13:56:26 +0000 2016
>Last-Modified:  Mon Sep 12 13:56:26 +0000 2016
>Originator:     Andreas Gustafsson
>Release:        NetBSD-current, source date 2016.07.08.09.15.38
>Organization:

>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:

When I try to build the xenkernel42 package from the current pkgsrc on
a NetBSD-current/amd64 system (CVS source date 2016.07.08.09.15.38),
compilation fails as follows:

  gcc -O2 -I/usr/include -I/usr/pkg/include  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs   -DNDEBUG -fno-builtin -fno-common -Wredundant-decls -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include  -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/asm-x86/mach-generic -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/asm-x86/mach-default  -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -nostdinc -g -D__XEN__ -include /usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/xen/config.h -DHAS_ACPI -DHAS_GDBSX -DHAS_PASSTHROUGH -MMD -MF .xen.d  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-sta
 tement -
 Wno-unused-but-set-variable -Wno-unused-local-typedefs   -DNDEBUG -fno-builtin -fno-common -Wredundant-decls -iwithprefix include -Werror -Wno-pointer-arith -pipe -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include  -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/asm-x86/mach-generic -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/asm-x86/mach-default  -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -nostdinc -g -D__XEN__ -include /usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/xen/config.h -DHAS_ACPI -DHAS_GDBSX -DHAS_PASSTHROUGH -MMD -MF .built_in.o.d  -O2 -fomit-frame-pointer -m64 -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Wno-unused-but-set-variable -Wno-unused-local-typedefs   -DNDEBUG -fno-builtin -fno-common -Wredundant-decls -iwithprefix include -Werror -Wno-point
 er-arith
  -pipe -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include  -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/asm-x86/mach-generic -I/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/asm-x86/mach-default  -msoft-float -fno-stack-protector -fno-exceptions -Wnested-externs -mno-red-zone -mno-sse -fpic -fno-asynchronous-unwind-tables -DGCC_HAS_VISIBILITY_ATTRIBUTE -nostdinc -g -D__XEN__ -include /usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/include/xen/config.h -DHAS_ACPI -DHAS_GDBSX -DHAS_PASSTHROUGH -MMD -MF .symbols.o.d -c symbols.c -o symbols.o
  symbols.c: In function 'symbols_lookup':
  symbols.c:23:61: error: array subscript is above array bounds [-Werror=array-bounds]
   #define symbols_address(n) (SYMBOLS_ORIGIN + symbols_offsets[n])
							       ^
  symbols.c:122:47: note: in expansion of macro 'symbols_address'
       while (low && symbols_address(low - 1) == symbols_address(low))
						 ^
  symbols.c:23:61: error: array subscript is above array bounds [-Werror=array-bounds]
   #define symbols_address(n) (SYMBOLS_ORIGIN + symbols_offsets[n])
							       ^
  symbols.c:130:13: note: in expansion of macro 'symbols_address'
	   if (symbols_address(i) > symbols_address(low)) {
	       ^
  cc1: all warnings being treated as errors
  gmake[3]: *** [/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/Rules.mk:156: symbols.o] Error 1
  gmake[3]: Leaving directory '/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/common'
  gmake[2]: *** [/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/Rules.mk:144: /usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/common/built_in.o] Error 2
  gmake[2]: Leaving directory '/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/arch/x86'
  gmake[1]: *** [Makefile:98: /usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen/xen] Error 2
  gmake[1]: Leaving directory '/usr/pkgsrc/sysutils/xenkernel42/work/xen-4.2.5/xen'
  gmake: *** [Makefile:25: build] Error 2
  *** Error code 2

  Stop.
  make[1]: stopped in /usr/pkgsrc/sysutils/xenkernel42

I'm guessing it's the same issue as in

  https://lists.xenproject.org/archives/html/xen-devel/2015-03/msg01687.html

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51382 CVS commit: pkgsrc/sysutils/xenkernel42
Date: Mon, 12 Sep 2016 13:22:39 +0000

 Module Name:	pkgsrc
 Committed By:	maya
 Date:		Mon Sep 12 13:22:39 UTC 2016

 Modified Files:
 	pkgsrc/sysutils/xenkernel42: distinfo
 Added Files:
 	pkgsrc/sysutils/xenkernel42/patches: patch-xen_common_symbols.c

 Log Message:
 xenkernel42: apply upstream's build fix for GCC5

 Requested by Andreas Gustafsson in PR pkg/51382


 To generate a diff of this commit:
 cvs rdiff -u -r1.21 -r1.22 pkgsrc/sysutils/xenkernel42/distinfo
 cvs rdiff -u -r0 -r1.1 \
     pkgsrc/sysutils/xenkernel42/patches/patch-xen_common_symbols.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: pkg-manager->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Mon, 12 Sep 2016 13:56:26 +0000
Responsible-Changed-Why:
Take


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 12 Sep 2016 13:56:26 +0000
State-Changed-Why:
Build is fixed, let me know if there are other issues.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.