NetBSD Problem Report #56154

From www@netbsd.org  Fri May  7 12:39:48 2021
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_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 8ECE81A9262
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  7 May 2021 12:39:48 +0000 (UTC)
Message-Id: <20210507123946.F36DB1A9263@mollari.NetBSD.org>
Date: Fri,  7 May 2021 12:39:46 +0000 (UTC)
From: pekdon@gmail.com
Reply-To: pekdon@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Support building security/nettle without assembler enabled
X-Send-Pr-Version: www-1.0

>Number:         56154
>Category:       pkg
>Synopsis:       Support building security/nettle without assembler enabled
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 07 12:40:01 +0000 2021
>Closed-Date:    Tue Nov 23 12:34:42 +0000 2021
>Last-Modified:  Tue Nov 23 12:34:42 +0000 2021
>Originator:     Claes Nästén
>Release:        trunk 2021-05-07
>Organization:
>Environment:
SunOS u40 5.10 Generic_147148-26 i86pc i386 i86pc

>Description:
Building security/nettle on Solaris 10 x86_64 on my Ultra 40 ends with issues with the assembler:

aes-encrypt-internal-2.s: Assembler messages:
aes-encrypt-internal-2.s:103: Error: no such instruction: `aesenc %xmm1,%xmm15'
aes-encrypt-internal-2.s:104: Error: no such instruction: `aesenc %xmm2,%xmm15'
aes-encrypt-internal-2.s:105: Error: no such instruction: `aesenc %xmm3,%xmm15'
aes-encrypt-internal-2.s:106: Error: no such instruction: `aesenc %xmm4,%xmm15'
aes-encrypt-internal-2.s:107: Error: no such instruction: `aesenc %xmm5,%xmm15'
aes-encrypt-internal-2.s:108: Error: no such instruction: `aesenc %xmm6,%xmm15'
aes-encrypt-internal-2.s:109: Error: no such instruction: `aesenc %xmm7,%xmm15'
aes-encrypt-internal-2.s:110: Error: no such instruction: `aesenc %xmm8,%xmm15'
aes-encrypt-internal-2.s:111: Error: no such instruction: `aesenc %xmm9,%xmm15'
aes-encrypt-internal-2.s:114: Error: no such instruction: `aesenc %xmm10,%xmm15'
aes-encrypt-internal-2.s:115: Error: no such instruction: `aesenc %xmm11,%xmm15'
aes-encrypt-internal-2.s:119: Error: no such instruction: `aesenc %xmm12,%xmm15'
aes-encrypt-internal-2.s:120: Error: no such instruction: `aesenc %xmm13,%xmm15'
aes-encrypt-internal-2.s:123: Error: no such instruction: `aesenclast %xmm14,%xmm15'

Assuming this could be remedied by using the GNU assembler, adding an option to disable use of assembly code as supported by the nettle configure script allows for working around the problem.
>How-To-Repeat:
Build security/nettle on Solaris 10 x86_64.
>Fix:
diff --git a/security/nettle/Makefile b/security/nettle/Makefile
index a0581e724ed..d911231d6a5 100644
--- a/security/nettle/Makefile
+++ b/security/nettle/Makefile
@@ -29,6 +29,8 @@ TEST_TARGET=          check
 PKGCONFIG_OVERRIDE=    hogweed.pc.in
 PKGCONFIG_OVERRIDE+=   nettle.pc.in

+.include "options.mk"
+
 BUILDLINK_API_DEPENDS.gmp+=    gmp>=6.0
 .include "../../devel/gmp/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/security/nettle/options.mk b/security/nettle/options.mk
new file mode 100644
index 00000000000..355344af288
--- /dev/null
+++ b/security/nettle/options.mk
@@ -0,0 +1,10 @@
+# $Id$
+
+PKG_OPTIONS_VAR=       PKG_OPTIONS.nettle
+PKG_SUPPORTED_OPTIONS= disable-asm
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mdisable-asm)
+CONFIGURE_ARGS+=       --disable-assembler
+.endif

>Release-Note:

>Audit-Trail:
From: =?utf-8?q?Claes_N=C3=A4st=C3=A9n?= <pekdon@gmail.com>
To: gnats-bugs <gnats-bugs@netbsd.org>
Cc: 
Subject: Re: pkg/56154: Support building security/nettle without assembler enabled
Date: Tue, 23 Nov 2021 13:25:37 +0100

 Excerpts from gnats-admin's message of 2021-05-07 12:40:01 +0000:
 > Thank you very much for your problem report.
 > It has the internal identification `pkg/56154'.
 > The individual assigned to look at your
 > report is: pkg-manager. 
 > 
 > >Category:       pkg
 > >Responsible:    pkg-manager
 > >Synopsis:       Support building security/nettle without assembler enabled
 > >Arrival-Date:   Fri May 07 12:40:01 +0000 2021

 Please disregard and close this one.

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 23 Nov 2021 12:34:42 +0000
State-Changed-Why:
Closed on submitter's request.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.