GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-44133: Export Py_FrozenMain() symbol. by shihai1991 · Pull Request #29876 · python/cpython

Conversation

@shihai1991

@shihai1991 shihai1991 commented Dec 1, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The Python binary now builds the libpython static library using
"-Wl,--whole-archive" or "-Wl,-all_load"linker option to
export all symbols exported by object files.
Previously, the "Py_FrozenMain" symbol was not exported.

Co-authored-by: Victor Stinner [email protected]

https://bugs.python.org/issue44133

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
shihai1991 added 2 commits December 1, 2021 14:57
@shihai1991
test
0230c8b
@shihai1991
Merge branch 'main' into bpo_44133
b71b124
* main: (21 commits)
  bpo-45876:  Have stdev() also use decimal specific square root. (pythonGH-29869)
  bpo-45876:  Correctly rounded stdev() and pstdev() for the Decimal case (pythonGH-29828)
  bpo-45711: Change exc_info related APIs to derive type and traceback from the exception instance (pythonGH-29780)
  bpo-30533:Add function inspect.getmembers_static that does not call properties or dynamic properties. (python#20911)
  bpo-45476: Disallow using asdl_seq_GET() as l-value (pythonGH-29866)
  bpo-45476: Add _Py_RVALUE() macro (pythonGH-29860)
  bpo-33381: [doc] strftime's %f option may pad zeros on the left or the right (pythonGH-29801)
  Fix EncodingWarning in Tools/freeze/test/freeze.py (pythonGH-29742)
  no-issue: remove unused import from test_graphlib.py (pythonGH-29853)
  bpo-45931: Prevent Directory.Build.props/targets from leaking from directories above the repo when building on Windows (pythonGH-29854)
  bpo-45653: fix test_embed on windows (pythonGH-29814)
  bpo-45917: Add math.exp2() method - return 2 raised to the power of x (pythonGH-29829)
  bpo-43905: Expand dataclasses.astuple() and asdict() docs (pythonGH-26154)
  bpo-44391: Remove unused argument from a varargs call. (pythonGH-29843)
  bpo-45881: configure --with-freeze-module --with-build-python (pythonGH-29835)
  bpo-45847: PY_STDLIB_MOD_SIMPLE now checks py_stdlib_not_available (pythonGH-29844)
  bpo-45828: Use unraisable exceptions within sqlite3 callbacks (FH-29591)
  bpo-40280: Emscripten systems use .wasm suffix by default (pythonGH-29842)
  bpo-45723: Sort the grand AC_CHECK_HEADERS check (pythonGH-29846)
  bpo-45847: Make socket module conditional (pythonGH-29769)
  ...
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Dec 1, 2021
@bedevere-bot bedevere-bot added the awaiting review label Dec 1, 2021
@encukou encukou added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 1, 2021
@bedevere-bot

bedevere-bot commented Dec 1, 2021

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @encukou for commit b71b124 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 1, 2021
@shihai1991

shihai1991 commented Dec 1, 2021

Copy link
Copy Markdown
Member Author

I tested this PR in my centos vm and it has passed.
Due to lack of the MacOS, I haven't test the -all_load link option for lacking of macos.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shihai1991 shihai1991 mentioned this pull request Dec 1, 2021
bpo-44133: Export Py_FrozenMain() symbol #26130
Closed
@shihai1991
shihai1991 requested review from encukou and vstinner December 4, 2021 16:24
tiran
tiran suggested changes Dec 4, 2021
View reviewed changes
Comment thread configure Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread configure Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting review label Dec 4, 2021
@bedevere-bot

bedevere-bot commented Dec 4, 2021

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting changes label Dec 4, 2021
@shihai1991
apply Christian's comment
e9e84c7
@github-actions

github-actions Bot commented Jan 5, 2022

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Jan 5, 2022
@shihai1991

shihai1991 commented Jan 11, 2022

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added awaiting change review and removed awaiting changes labels Jan 11, 2022
@bedevere-bot

bedevere-bot commented Jan 11, 2022

Copy link
Copy Markdown

Thanks for making the requested changes!

@tiran: please review the changes made to this pull request.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot
bedevere-bot requested a review from tiran January 11, 2022 16:06
@vstinner

vstinner commented Jan 11, 2022

Copy link
Copy Markdown
Member

I suggest to not use libpython.a to build the python executable, but pass directly the long list of object filenames (.o).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shihai1991

shihai1991 commented Jan 12, 2022

Copy link
Copy Markdown
Member Author

I suggest to not use libpython.a to build the python executable, but pass directly the long list of object filenames (.o).

OK, it's would be more direct.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jan 12, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

I wrote PR #30556 to propose my idea.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Jan 13, 2022

Copy link
Copy Markdown
Member

The problem of this approach is that the -Wl,--whole-archive flag is not portable. That's why you had to use -Wl,-all_load for example.

I wrote a different approach which simply skips the static Python library: GH-30556.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this Jan 13, 2022
@vstinner vstinner mentioned this pull request Apr 29, 2022
Some C-API symbols (e.g. Py_FrozenMain) are not always exported on Unix #88299
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou Awaiting requested review from encukou
@vstinner vstinner Awaiting requested review from vstinner
@tiran tiran Awaiting requested review from tiran

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting change review stale Stale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@shihai1991 @bedevere-bot @vstinner @tiran @encukou @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.