
On Fri, May 14, 2021 at 7:05 PM Victor Stinner <vstinner@python.org> wrote:
Hi Petr,
I reproduced the issue with Python is built without --enable-shared.
But when Python is built with --enable-shared, Py_FrozenMain() is exported as expected!
I created https://bugs.python.org/issue44133 and https://github.com/python/cpython/pull/26130 to fix the issue.
This issue is not specific to the "Py_FrozenMain" symbol. *Any* symbol can miss depending on how Python was built and where the function lives. If you move an exported function to a new C function and the function is not used directly by Python, the function is no longer exported.
This bug is a major issue, because C extensions are no longer linked to libpython since Python 3.8. Python must export all symbols that it pretends to export, especially if it built without libpython dynamic library (libpythonXY.so).
Victor