delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/01/21/20:05:21

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9AD2C3858C60
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=trueroad.jp
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=trueroad.jp
Date: Sat, 22 Jan 2022 10:04:35 +0900 (JST)
Message-Id: <20220122.100435.1822912027393751150.trueroad@trueroad.jp>
To: cygwin AT cygwin DOT com, marco DOT atzeri AT gmail DOT com
Subject: Re: python-numpy (1.22.0-1) can't be imported
From: Masamichi Hosoda <trueroad AT trueroad DOT jp>
In-Reply-To: <0fe2e36a-2f32-0334-0ff6-d164f56e1b48@gmail.com>
References: <b13535c2-c2fd-ff98-9777-f42b62eced8f AT gmail DOT com>
<vriu8rvj13ah DOT fsf AT mail DOT aol DOT com>
<0fe2e36a-2f32-0334-0ff6-d164f56e1b48 AT gmail DOT com>
X-Mailer: Mew version 6.8 on Emacs 27.2
Mime-Version: 1.0
X-VirusScan: Outbound; mvir-ac12; Sat, 22 Jan 2022 10:04:41 +0900
X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Cc: trueroad AT trueroad DOT jp
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

> 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,
                          )
```

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019