NetBSD Problem Report #56064

From gson@gson.org  Fri Mar 19 08:34:49 2021
Return-Path: <gson@gson.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 2F7E21A9217
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 Mar 2021 08:34:49 +0000 (UTC)
Message-Id: <20210319083418.62552253F67@guava.gson.org>
Date: Fri, 19 Mar 2021 10:34:18 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: security/libgcrypt problems on macOS/M1
X-Send-Pr-Version: 3.95

>Number:         56064
>Category:       pkg
>Synopsis:       security/libgcrypt problems on macOS/M1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    macos-pkg-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 19 08:35:00 +0000 2021
>Closed-Date:    Mon Apr 26 19:07:57 +0000 2021
>Last-Modified:  Mon Apr 26 19:07:57 +0000 2021
>Originator:     Andreas Gustafsson
>Release:        macOS Big Sur 11.2.3
>Organization:

>Environment:
System: macOS
Architecture: aarch64
Machine: aarch64
>Description:

Using pkgsrc-current on macOS Big Sur 11.2.3 on the ARM-based Mac mini M1,
importing the Python module lxml.etree fails with a libgcrypt related error:

  $ python3.8 -c 'import lxml.etree'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  ImportError: dlopen(/Users/gson/pkg/lib/python3.8/site-packages/lxml/etree.so, 2): Symbol not found: __gcry_mpih_add_n
    Referenced from: /Users/gson/pkg/lib/libgcrypt.20.dylib
    Expected in: flat namespace
   in /Users/gson/pkg/lib/libgcrypt.20.dylib

Also, the build of security/libgcrypt prints a number of warnings,
such as:

  ld: warning: arm64 function not 4-byte aligned: _gcry_mpih_add_n from ../mpi/.libs/libmpi.a(mpih-add1-asm.o)
  ld: warning: arm64 function not 4-byte aligned: .Loop from ../mpi/.libs/libmpi.a(mpih-add1-asm.o)
  ld: warning: arm64 function not 4-byte aligned: .Large_loop from ../mpi/.libs/libmpi.a(mpih-add1-asm.o)
  ld: warning: arm64 function not 4-byte aligned: .Lend from ../mpi/.libs/libmpi.a(mpih-add1-asm.o)
  ld: warning: arm64 function not 4-byte aligned: _gcry_mpih_sub_n from ../mpi/.libs/libmpi.a(mpih-sub1-asm.o)
  ld: warning: arm64 function not 4-byte aligned: .Loop from ../mpi/.libs/libmpi.a(mpih-sub1-asm.o)
  [etc]

As a work-around, uncommenting the line

  CONFIGURE_ARGS+=        --disable-asm

in the libgcrypt package Makefile makes the lxml.etree import succeed.

>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->macos-pkg-people
Responsible-Changed-By: hauke@NetBSD.org
Responsible-Changed-When: Fri, 19 Mar 2021 10:33:01 +0000
Responsible-Changed-Why:
A Mac OS X problem.


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Mon, 26 Apr 2021 19:07:57 +0000
State-Changed-Why:
Another reporter of this bug notes it is fixed by an update to libgcrypt already.


>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.