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 — gh-115737: Correct the install name for non-framework macOS libPython builds. by freakboy3742 · Pull Request #115750 · python/cpython

Conversation

@freakboy3742

@freakboy3742 freakboy3742 commented Feb 21, 2024 •
edited by ned-deily
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

#115120 refactored the configure/Makefile targets in preparation for supporting iOS framework builds. However, this refactoring broke the install_name used for non-framework macOS builds installed into a non-default location (as is used by pyenv).

This PR restores the old behaviour using ${prefix} as the prefix for the install_name for non-framework macOS builds. It also renames the configuration variable to reflect the fact that it is a generic dylib configuration prefix, not a framework-specific prefix.

CC @native-api @ned-deily @ronaldoussoren

Refs pyenv/pyenv#2903

  • Issue: "dyld: Library not loaded: /lib/libpython3.13.dylib" in 3.13.0a4 MacOS non-framework build with custom prefix #115737

Sorry, something went wrong.

Uh oh!

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

native-api, edgarrmondragon, and erlend-aasland reacted with thumbs up emoji adamchainz reacted with heart emoji
All reactions
  • 👍 3 reactions
  • ❤️ 1 reaction
@freakboy3742
Correct the install name for non-framework macOS libPython builds.
662c204
@freakboy3742
freakboy3742 requested review from corona10 and erlend-aasland as code owners February 21, 2024 04:09
@bedevere-app bedevere-app Bot added the awaiting review label Feb 21, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Feb 21, 2024
"dyld: Library not loaded: /lib/libpython3.13.dylib" in 3.13.0a4 MacOS non-framework build with custom prefix #115737
Closed
@freakboy3742 freakboy3742 mentioned this pull request Feb 21, 2024
Add CPython 3.13.0a4 pyenv/pyenv#2903
Merged
@freakboy3742 freakboy3742 added the 3.13 only security fixes label Feb 21, 2024
erlend-aasland
erlend-aasland approved these changes Feb 21, 2024
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Feb 21, 2024
ned-deily
ned-deily requested changes Feb 21, 2024
View reviewed changes

@ned-deily ned-deily left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this. I think we can greatly simplify the change to just reverting the original change to the libpython.dylib target in the Makefile. As far as I can see, that's the only problem here as that target is only made in the macOS --enable-shared case. Then there is no need to rename PYTHONFRAMEWORKINSTALLNAMEPREFIX as it will only be used for framework builds. And this shouldn't cause any problems for further iOS changes since only frameworks builds are supported there.

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Comment thread Makefile.pre.in Outdated

libpython$(LDVERSION).dylib: $(LIBRARY_OBJS)
$(CC) -dynamiclib $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(PYTHONFRAMEWORKINSTALLNAMEPREFIX)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \
$(CC) -dynamiclib $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(DYLIBINSTALLNAMEPREFIX)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \

@ned-deily ned-deily Feb 21, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this target is only used for macOS --enable-shared builds (and not for framework or non-shared builds), I think the only change we really need is to revert the original change here, though still removing the obsolete -Wl,-single_module. Then there is no need to make any of the other rename changes. So:

$(CC) -dynamiclib $(PY_CORE_LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(LDVERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(DTRACE_OBJS) $(SHLIBS) $(LIBC) $(LIBM); \

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@freakboy3742 freakboy3742 Feb 21, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point - I'm not sure why I changed this one in the original patch. I can only assume I got a bit search-and-replace happy looking for install_name.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting changes and removed awaiting merge labels Feb 21, 2024
@bedevere-app

bedevere-app Bot commented Feb 21, 2024

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.

@freakboy3742
Revert the DYLIBINSTALLNAMEPREFIX rename in favor of cleaning up the …
b1a161f
…dylib target.
@freakboy3742

freakboy3742 commented Feb 21, 2024

Copy link
Copy Markdown
Contributor 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.

ned-deily
ned-deily approved these changes Feb 21, 2024
View reviewed changes

@ned-deily ned-deily left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting changes labels Feb 21, 2024
@ned-deily
ned-deily merged commit 074bbec into python:main Feb 21, 2024
@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 21, 2024
@adamchainz adamchainz mentioned this pull request Mar 3, 2024
Add Python 3.13 to the CI infrastructure, fix for 3.13.0a2+ adamchainz/time-machine#409
Merged
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
@freakboy3742 @woodruffw
pythongh-115737: Correct libpython install name for macOS shared libr…
7947c10
…ary builds. (pythongh-115750)
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@freakboy3742 @diegorusso
pythongh-115737: Correct libpython install name for macOS shared libr…
691648f
…ary builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
f1a5920
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
@freakboy3742
[3.11] pythongh-115737: Correct libpython install name for macOS shar…
8781f5d
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
@freakboy3742
[3.10] pythongh-115737: Correct libpython install name for macOS shar…
8ad4736
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Aug 5, 2024
@freakboy3742
[3.9] pythongh-115737: Correct libpython install name for macOS share…
9cddb73
…d library builds. (pythongh-115750)
@freakboy3742
freakboy3742 deleted the macOS-non-framework-relocatable branch August 5, 2024 05:30
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 6, 2024
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
c5301c8
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
b9dbd18
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
@freakboy3742
[3.11] pythongh-115737: Correct libpython install name for macOS shar…
83b614a
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
@freakboy3742
[3.10] pythongh-115737: Correct libpython install name for macOS shar…
51bd78c
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Sep 9, 2024
@freakboy3742
[3.9] pythongh-115737: Correct libpython install name for macOS share…
c9aedc0
…d library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Oct 9, 2024
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
1f18745
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
@freakboy3742
[3.9] pythongh-115737: Correct libpython install name for macOS share…
0935df2
…d library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
@freakboy3742
[3.10] pythongh-115737: Correct libpython install name for macOS shar…
913d4b8
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
ea02b69
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Dec 13, 2024
@freakboy3742
[3.11] pythongh-115737: Correct libpython install name for macOS shar…
fe3ba8e
…ed library builds. (pythongh-115750)
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
@freakboy3742 @LukasWoodtli
pythongh-115737: Correct libpython install name for macOS shared libr…
738fced
…ary builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Feb 3, 2026
@freakboy3742
[3.10] pythongh-115737: Correct libpython install name for macOS shar…
f987d67
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Feb 3, 2026
@freakboy3742
[3.11] pythongh-115737: Correct libpython install name for macOS shar…
520f7c4
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Feb 3, 2026
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
ae5a2bc
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Jun 12, 2026
@freakboy3742
[3.11] pythongh-115737: Correct libpython install name for macOS shar…
38e6632
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Jun 12, 2026
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
21787c6
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Oct 2, 2026
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
a729434
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Oct 2, 2026
@freakboy3742
[3.11] pythongh-115737: Correct libpython install name for macOS shar…
26eb442
…ed library builds. (pythongh-115750)
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull request Oct 12, 2026
@freakboy3742
[3.12] pythongh-115737: Correct libpython install name for macOS shar…
70ed906
…ed library builds. (pythongh-115750)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ned-deily ned-deily ned-deily approved these changes
@erlend-aasland erlend-aasland erlend-aasland approved these changes
@corona10 corona10 Awaiting requested review from corona10

Uh oh!

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

Assignees

No one assigned

Labels

3.13 only security fixes

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.

3 participants

@freakboy3742 @ned-deily @erlend-aasland
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.