Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-115737: Correct the install name for non-framework macOS libPython builds.#115750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

freakboy3742
Copy link
Contributor

@freakboy3742freakboy3742 commentedFeb 21, 2024
edited by ned-deily
Loading

#115120 refactored the configure/Makefile targets in preparation for supporting iOS framework builds. However, this refactoring broke theinstall_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

Refspyenv/pyenv#2903

native-api, edgarrmondragon, and erlend-aasland reacted with thumbs up emojiadamchainz reacted with heart emoji
Copy link
Member

@ned-deilyned-deily left a 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 thelibpython.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 renamePYTHONFRAMEWORKINSTALLNAMEPREFIX 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.

erlend-aasland reacted with thumbs up emoji
@@ -869,7 +869,7 @@ libpython3.so:libpython$(LDVERSION).so
$(BLDSHARED) $(NO_AS_NEEDED) -o $@ -Wl,-h$@ $^

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); \
Copy link
Member

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); \

erlend-aasland reacted with thumbs up emoji
Copy link
ContributorAuthor

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.

@bedevere-app
Copy link

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 phraseI 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.

@freakboy3742
Copy link
ContributorAuthor

I have made the requested changes; please review again

Copy link
Member

@ned-deilyned-deily left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@ned-deilyned-deily merged commit074bbec intopython:mainFeb 21, 2024
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull requestMar 4, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 17, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestAug 5, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestAug 5, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestAug 5, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestAug 5, 2024
@freakboy3742freakboy3742 deleted the macOS-non-framework-relocatable branchAugust 5, 2024 05:30
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestSep 6, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestSep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestSep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestSep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestSep 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestOct 9, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestDec 13, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestDec 13, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestDec 13, 2024
freakboy3742 added a commit to freakboy3742/cpython that referenced this pull requestDec 13, 2024
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull requestJan 22, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ned-deilyned-deilyned-deily approved these changes

@erlend-aaslanderlend-aaslanderlend-aasland approved these changes

@corona10corona10Awaiting requested review from corona10

Assignees
No one assigned
Labels
3.13bugs and security fixes
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@freakboy3742@ned-deily@erlend-aasland

[8]ページ先頭

©2009-2025 Movatter.jp