NetBSD Problem Report #56720
From dholland@netbsd.org Thu Feb 17 09:00:55 2022
Return-Path: <dholland@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 5AF591A9239
for <gnats-bugs@gnats.NetBSD.org>; Thu, 17 Feb 2022 09:00:55 +0000 (UTC)
Message-Id: <20220217090054.90D6484E77@mail.netbsd.org>
Date: Thu, 17 Feb 2022 09:00:54 +0000 (UTC)
From: dholland@NetBSD.org
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: math/py-numpy16 builds but won't run
X-Send-Pr-Version: 3.95
>Number: 56720
>Category: pkg
>Synopsis: math/py-numpy16 builds but won't run
>Confidential: no
>Severity: critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 17 09:05:00 +0000 2022
>Last-Modified: Mon Feb 21 12:05:01 +0000 2022
>Originator: David A. Holland
>Release: NetBSD 9.99.93 (20220130), pkgsrc 20220215
>Organization:
>Environment:
System: NetBSD macaran 9.99.93 NetBSD 9.99.93 (MACARAN) #60: Mon Feb 14 20:44:10 EST 2022 root@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:
Building the python27 numpy with pkgsrc gcc10 (as it expects, for
FORTRAN) yields a numpy that won't import. One of the core plugin
libraries (_multiarray_umath.so) ends up with an undefined symbol
__cpu_model.
This seems to be because it's linking the library wrong: it uses
__builtin_cpu_supports() that expands to __cpu_model, but from what I
can tell one is supposed to pick __cpu_model up from libgcc.a and that
isn't happening.
>How-To-Repeat:
% make install
wait
% python2.7
>>> import numpy
>Fix:
I applied this hammer as an expedient, but it would be better to fix
it properly. Except python27 :-|
--- numpy/core/src/umath/cpuid.c~ 2019-12-27 22:24:44.000000000 +0000
+++ numpy/core/src/umath/cpuid.c
@@ -41,7 +41,7 @@ int os_avx_support(void)
NPY_NO_EXPORT int
npy_cpu_supports(const char * feature)
{
-#ifdef HAVE___BUILTIN_CPU_SUPPORTS
+#if 0 /*def HAVE___BUILTIN_CPU_SUPPORTS*/
if (strcmp(feature, "avx2") == 0) {
return __builtin_cpu_supports("avx2") && os_avx_support();
}
>Audit-Trail:
From: David Holland <dholland-pbugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56720: math/py-numpy16 builds but won't run
Date: Mon, 21 Feb 2022 12:02:11 +0000
On Thu, Feb 17, 2022 at 09:05:00AM +0000, dholland@NetBSD.org wrote:
> Building the python27 numpy with pkgsrc gcc10 (as it expects, for
> FORTRAN) yields a numpy that won't import. One of the core plugin
> libraries (_multiarray_umath.so) ends up with an undefined symbol
> __cpu_model.
Slight update: I think this has been going on for longer than gcc10;
found a note about a similar but then unexplained failure last year.
--
David A. Holland
dholland@netbsd.org
(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.