python-numpy (1.22.0-1) can't be imported

Masamichi Hosoda trueroad@trueroad.jp
Sat Jan 22 01:04:35 GMT 2022


> I have not found the root cause yet.
> As the  1.21.4-1 imports correctly I removed the 1.22.0-1 until I solve 
> the issue.
> 
> I do not see anything obvious in upstream source between 1.21.4 and 
> 1.22.0 that gives me any hint on root cause.
> 
> Also 1.22.1 shows the same problem.
> I excluded the build chain as rebuilding 1.19.4 worked fine
> for all 3.6 to 3.9

If I understand correctly,
the patch below is just a quick hack, but it solves the problem.

```
--- a/numpy/random/setup.py
+++ b/numpy/random/setup.py
@@ -147,7 +147,8 @@
                          include_dirs=['.', 'src', 'src/legacy'],
                          libraries=mtrand_libs,
                          extra_compile_args=EXTRA_COMPILE_ARGS,
-                         extra_link_args=EXTRA_LINK_ARGS,
+                         extra_link_args=(EXTRA_LINK_ARGS +
+                                          ['-Wl,--export-all-symbols']),
                          depends=depends + ['mtrand.pyx'],
                          define_macros=defs + LEGACY_DEFS,
                          )
```


More information about the Cygwin mailing list