From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 465D53858D3C for ; Sun, 6 Feb 2022 17:35:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 465D53858D3C Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1nGlS7-0000LV-2U for cygwin@cygwin.com; Sun, 06 Feb 2022 18:35:55 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: cygwin@cygwin.com From: airplanemath Subject: Re: python-numpy (1.22.0-1) can't be imported Date: Sun, 06 Feb 2022 12:35:36 -0500 Message-ID: References: <0fe2e36a-2f32-0334-0ff6-d164f56e1b48@gmail.com> <20220122.100435.1822912027393751150.trueroad@trueroad.jp> <89f4e748-9e1c-b0de-834b-2511b988f14a@gmail.com> <20220122.191639.929494193658372882.trueroad@trueroad.jp> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (cygwin) Cancel-Lock: sha1:oCsrBJNToex3FMTHbGBvZ3pKyuM= X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_GOODAOL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham 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: Sun, 06 Feb 2022 17:35:58 -0000 On Sat, Jan 22 2022, Masamichi Hosoda wrote: >> It is something like that, but "-Wl,--export-all-symbols" >> is not used on 1.21.4 and is not needed for most of the other >> modules on 1.22.x >> >> so I am looking for a less extreme action. >> Also to understand how it can impact other python subpackages > > If I understand correctly, I've found the root cause of the issue. > I've sent a pull request to numpy. > https://github.com/numpy/numpy/pull/20874 Based on that pull request, it looks like it's related to the patches used to avoid python C-extension modules with only one exported function mentioned a year ago: https://cygwin.com/pipermail/cygwin/2021-January/247211.html https://cygwin.com/pipermail/cygwin/2021-January/247216.html >From a glance at the Python C API docs, it looks like Python C extension modules are supposed to have only one exported function: https://docs.python.org/3/extending/extending.html#the-module-s-method-table-and-initialization-function https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module The NumPy CFFI tests seem to want to use a few C extension modules as normal shared libraries, which requires that the functions the tests want to use to be exported from the DLL, but this seems to be a somewhat unusual case. I tend to compile my own versions of Cython (without patches), which may have been picked up when I compiled the new version of NumPy.