From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from msc12.plala.or.jp (msc12.plala.or.jp [60.36.166.22]) by sourceware.org (Postfix) with ESMTP id 9AD2C3858C60 for ; Sat, 22 Jan 2022 01:04:42 +0000 (GMT) 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 Received: from localhost ([118.16.110.64]) by msc12.plala.or.jp with ESMTP id <20220122010440.NRFA16046.msc12.plala.or.jp@localhost>; Sat, 22 Jan 2022 10:04:40 +0900 Date: Sat, 22 Jan 2022 10:04:35 +0900 (JST) Message-Id: <20220122.100435.1822912027393751150.trueroad@trueroad.jp> To: cygwin@cygwin.com, marco.atzeri@gmail.com Cc: trueroad@trueroad.jp Subject: Re: python-numpy (1.22.0-1) can't be imported From: Masamichi Hosoda In-Reply-To: <0fe2e36a-2f32-0334-0ff6-d164f56e1b48@gmail.com> References: <0fe2e36a-2f32-0334-0ff6-d164f56e1b48@gmail.com> X-Mailer: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2022 01:04:44 -0000 > 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, ) ```