classification
Title: Cygwin link failure with builtin modules since issue30860
Type: Stage: patch review
Components: Build Versions: Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: erik.bray
Priority: normal Keywords: 3.7regression, patch

Created on 2018-07-24 17:10 by erik.bray, last changed 2018-08-09 13:42 by erik.bray.

Pull Requests
URL Status Linked Edit
PR 8446 closed erik.bray, 2018-07-24 17:13
PR 8712 open erik.bray, 2018-08-09 13:39
Messages (2)
msg322316 - (view) Author: Erik Bray (erik.bray) * (Python triager) 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) * (Python triager) 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.
History
Date User Action Args
2018-08-09 13:42:04erik.braysetmessages: + msg323322
2018-08-09 13:39:38erik.braysetpull_requests: + pull_request8199
2018-07-24 17:13:12erik.braysetkeywords: + patch
stage: patch review
pull_requests: + pull_request7968
2018-07-24 17:10:52erik.braycreate