pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/56720: math/py-numpy16 builds but won't run



>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
>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();
     }



Home | Main Index | Thread Index | Old Index