NetBSD Problem Report #53293

From www@NetBSD.org  Wed May 16 10:36:26 2018
Return-Path: <www@NetBSD.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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A4EDA7A110
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 16 May 2018 10:36:26 +0000 (UTC)
Message-Id: <20180516103625.41B6F7A221@mollari.NetBSD.org>
Date: Wed, 16 May 2018 10:36:25 +0000 (UTC)
From: nia.alarie@gmail.com
Reply-To: nia.alarie@gmail.com
To: gnats-bugs@NetBSD.org
Subject: [patch] devel/nasm: fix build with gcc8
X-Send-Pr-Version: www-1.0

>Number:         53293
>Category:       pkg
>Synopsis:       [patch] devel/nasm: fix build with gcc8
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed May 16 10:40:00 +0000 2018
>Closed-Date:    Fri Jun 01 11:19:20 +0000 2018
>Last-Modified:  Fri Jun 01 11:19:20 +0000 2018
>Originator:     nia
>Release:        current
>Organization:
>Environment:
Linux zenbook 4.16.6-1-ARCH #1 SMP PREEMPT Mon Apr 30 12:30:03 UTC 2018 x86_64 GNU/Linux
>Description:
devel/nasm enforces -Werror=attributes. The configure line that adds it to CFLAGS could be patched out, but this fixes the problem which causes the warning/error.

seg_init appears absent in upstream HEAD, so this bug should be fixed in the next release.
>How-To-Repeat:

>Fix:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/devel/nasm/distinfo,v
retrieving revision 1.29
diff -u -r1.29 distinfo
--- distinfo	25 Feb 2018 16:41:56 -0000	1.29
+++ distinfo	16 May 2018 10:27:28 -0000
@@ -6,3 +6,4 @@
 Size (nasm-2.13.03.tar.xz) = 806636 bytes
 SHA1 (patch-Makefile.in) = a85054afeb827b61b0db3352825088454e3013d4
 SHA1 (patch-doc_Makefile.in) = 20bb04e4fb00ec14d1e2bb31a3fe2497673132ef
+SHA1 (patch-include_nasmlib.h) = 2ec6f98dcb7a7583e5f8cd1051a97f70eae223f5
Index: patches/patch-include_nasmlib.h
===================================================================
RCS file: patches/patch-include_nasmlib.h
diff -N patches/patch-include_nasmlib.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-include_nasmlib.h	16 May 2018 10:27:28 -0000
@@ -0,0 +1,15 @@
+$NetBSD$
+
+error: 'pure' attribute on function returning 'void'
+
+--- include/nasmlib.h.orig	2018-02-07 21:40:15.000000000 +0000
++++ include/nasmlib.h
+@@ -191,7 +191,7 @@ int64_t readstrnum(char *str, int length
+  * seg_init: Initialise the segment-number allocator.
+  * seg_alloc: allocate a hitherto unused segment number.
+  */
+-void pure_func seg_init(void);
++void seg_init(void);
+ int32_t pure_func seg_alloc(void);
+ 
+ /*

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: jakllsch@NetBSD.org
State-Changed-When: Sun, 20 May 2018 16:45:04 +0000
State-Changed-Why:
patch commited


State-Changed-From-To: feedback->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Fri, 01 Jun 2018 11:19:20 +0000
State-Changed-Why:
I don't expect feedback to be necessary, but please feel free to provide it (especially if the commit does not fix the issue)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.