GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||
GeezerVison is showing github.com — bpo-44133: Link Python executable with object files by vstinner · Pull Request #30556 · python/cpython Conversation
|
|
With this change, The "python" file only exports the symbol when it's not linked to libpython.so. When libpython.so exists, il always exports the symbol. Case 1 (no option): Case 2, --without-static-libpython --enable-shared: Case 3, --without-static-libpython: Case 4, --enable-shared: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't know how to test this change on macOS to build Python with the "framework". |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@tiran @erlend-aasland: Would you mind to review this change? cc @encukou |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
On my Fedora 35, if I compare |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
When Python is built without --enable-shared, the "python" program is now linked to object files, rather than being linked to the Python library (libpython.a), to make sure that all symbols are exported. Previously, the linker omitted some symbols like the Py_FrozenMain() function. When Python is configured with --without-static-libpython, the Python static library (libpython.a) is no longer built. * Check --without-static-libpython earlier in configure.ac * Add LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variables to Makefile. * test_capi now ensures that the "Py_FrozenMain" symbol is exported.
|
PR rebased to fix merge conflicts. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I may be a good idea to test this build change on buildbots before merging the PR :-) Fedora and RHEL buildbots use |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The gate failed. the test of this PR should be skipped in wins? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🤖 New build scheduled with the buildbot fleet by @shihai1991 for commit c5c7102 🤖 If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@shihai1991: "The gate failed. the test of this PR should be skipped in wins?" No, the symbol must be present on all platforms. I pushed a fix. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ah, adding frozenmain.c to the pythoncore project makes the Windows build to fail: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Ok, I give up for this PR (I skip the test on Windows): I have no idea how to add Py_FrozenMain() on Windows if it requires 3 symbols when Python is linked. Maybe Py_FrozenMain() should be modified to load these symbols at runtime on Windows? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.