Issue34212
Created on 2018-07-24 17:10 by erik.bray, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 8446 | closed | erik.bray, 2018-07-24 17:13 | |
| PR 8712 | merged | erik.bray, 2018-08-09 13:39 | |
| PR 10734 | merged | miss-islington, 2018-11-27 02:21 | |
| Messages (5) | |||
|---|---|---|---|
| msg322316 - (view) | Author: Erik Bray (erik.bray) * ![]() |
Date: 2018-07-24 17:10 | |
Since issue30860, libpython is no longer able to be linked as a shared library, because built-in modules are not compiled with the correct external linkage flags. This is due to the removal of -DPy_BUILD_CORE, which in pyport.h is used to control wither __declspec(dllexport) is used as opposed to __declspec(dllimport). Fortunately Eric Snow already added in https://github.com/python/cpython/pull/3458 a new flag Py_BUILD_CORE_BUILTIN which is used sparingly on Windows, and which should also be used, e.g. on Cygwin or MinGW, when compiling modules that are linked into libpython as built-ins. It sets the right external linkage flags without carrying the additional weight of Py_BUILD_CORE. This along with issue34211 need to be fixed in order to get Python 3.7+ building on Cygwin again. |
|||
| msg323322 - (view) | Author: Erik Bray (erik.bray) * ![]() |
Date: 2018-08-09 13:42 | |
I added a new PR modifying makesetup and adding a new variable to Makefile.pre.in, PY_BUILTIN_MODULE_CFLAGS, explicitly for building built-in modules. I think this, or some version of it, is a cleaner solution than my previous brute-force approach. |
|||
| msg330485 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2018-11-27 02:21 | |
New changeset da324d53d420347344236ff64cf5eb9b675d6f86 by Benjamin Peterson (E. M. Bray) in branch 'master': closes bpo-34212: Build core extension modules with Py_BUILD_CORE_BUILTIN. (GH-8712) https://github.com/python/cpython/commit/da324d53d420347344236ff64cf5eb9b675d6f86 |
|||
| msg330487 - (view) | Author: miss-islington (miss-islington) | Date: 2018-11-27 02:33 | |
New changeset 716a8089b04095acaba493925751df194a4916bb by Miss Islington (bot) in branch '3.7': closes bpo-34212: Build core extension modules with Py_BUILD_CORE_BUILTIN. (GH-8712) https://github.com/python/cpython/commit/716a8089b04095acaba493925751df194a4916bb |
|||
| msg330502 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2018-11-27 10:54 | |
What about modules compiled by setup.py? They don't have the issue? Only 2 modules are built by setup.py with Py_BUILD_CORE_BUILTIN (_json) or Py_BUILD_CORE (_xxsubinterpreters). By the way, it seems like Py_BUILD_CORE_BUILTIN should be used for modules, not Py_BUILD_CORE. No? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:03 | admin | set | github: 78393 |
| 2018-11-27 10:54:45 | vstinner | set | messages: + msg330502 |
| 2018-11-27 02:33:01 | miss-islington | set | nosy:
+ miss-islington messages: + msg330487 |
| 2018-11-27 02:21:53 | miss-islington | set | pull_requests: + pull_request9982 |
| 2018-11-27 02:21:42 | benjamin.peterson | set | status: open -> closed nosy:
+ benjamin.peterson resolution: fixed |
| 2018-11-26 09:41:37 | vstinner | set | nosy:
+ vstinner |
| 2018-08-09 13:42:04 | erik.bray | set | messages: + msg323322 |
| 2018-08-09 13:39:38 | erik.bray | set | pull_requests: + pull_request8199 |
| 2018-07-24 17:13:12 | erik.bray | set | keywords:
+ patch stage: patch review pull_requests: + pull_request7968 |
| 2018-07-24 17:10:52 | erik.bray | create | |

