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-100384: Error onunguarded-availability in Darwin builds#128155

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
ned-deily merged 6 commits intopython:mainfromzanieb:zb/error-unguarded-macos
Dec 22, 2024

Conversation

zanieb
Copy link
Contributor

@zaniebzanieb commentedDec 21, 2024
edited
Loading

Closes#100384

This prevents introduction of unguarded use of symbols that would fail on older systems.

The build system purports to support macOS 10.3+, but the GitHub runners default Xcode version only supports 10.13+ and#128156 means 10.15+ is required. Here, we set that as the target in CI.

erlend-aasland reacted with thumbs up emoji
@zanieb
Copy link
ContributorAuthor

zanieb commentedDec 21, 2024
edited
Loading

I found#128156 locally, so this is working. We'll see if it's caught in the current CI setup (it was not, setting0f4b63e now)

@zaniebzaniebforce-pushed thezb/error-unguarded-macos branch from689e20a to6fd3184CompareDecember 21, 2024 15:59
@zanieb
Copy link
ContributorAuthor

zanieb commentedDec 21, 2024
edited
Loading

I set the deployment target to 10.9 and 🎉 we catch the unguarded symbol. I guess ideally it'd be 10.3 since that's the stated minimum but compilation fails for that on my machine. I'm happy to debate what the minimum should be, but perhaps we should open a dedicated issue for that discussion? Using 10.9 instead of 10.15 catches symbols that have been reported as bugs recently, so I don't think going to 10.15 here makes sense.

This pull request is now blocked on#128156 or reversion of0f4b63e — I'm fine with either as long as we follow-up with something like0f4b63e.

@ned-deily
Copy link
Member

The current releases of Apple's Xcode and Command Line Tools now only fully support building for deployment targets of 10.13 or newer and we should be testing with that. There are older versions of Xcode available in the the Github Actions macOS images. We may need to set up a different build to test with older deployment targets. This requires some more investigation and thought.

configure.ac Outdated
@@ -2603,6 +2603,13 @@ AS_VAR_IF([ac_cv_gcc_compat], [yes], [
esac
AC_MSG_RESULT([$CC])

# Error on unguarded use of new symbols, which will fail at runtime for
# users on older versions of macOS
AX_CHECK_COMPILE_FLAG([-Wunguarded-availability-new],
Copy link
Member

Choose a reason for hiding this comment

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

As noted elsewhere, I think we should useunguarded-availability here, not-new but I want to test this on older systems which I won't be able to do for several more days.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Done in2ddda3a. This did not change the output on my machine.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

(or in CI)

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

@zanieb
Copy link
ContributorAuthor

The current releases of Apple's Xcode and Command Line Tools now only fully support building for deployment targets of 10.13 or newer and we should be testing with that.

Done in24ee4a7 though we may want to just bump to 10.15 per#128156 (comment)

@@ -0,0 +1,2 @@
Error on ``unguarded-availability-new`` in Darwin builds, preventing invalid
Copy link
Member

@ned-deilyned-deilyDec 22, 2024
edited
Loading

Choose a reason for hiding this comment

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

unguarded-availability-new ->unguarded-availability
Darwin ->macOS

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks!88ea223

@ned-deily
Copy link
Member

though we may want to just bump to 10.15

Oh, sorry, we're clearly going to need to do that in this PR otherwise all macOS CI checks will fail.

@zanieb
Copy link
ContributorAuthor

@ned-deily yeah, I wasn't sure if we wanted to try to solve#128156 before merging this but I'm happy to just bump to 10.15 then consider support for older versions separately?

ned-deily reacted with thumbs up emoji

@zaniebzanieb changed the titlegh-100384: Error onunguarded-availability-new in Darwin buildsgh-100384: Error onunguarded-availability in Darwin buildsDec 22, 2024
@ned-deily
Copy link
Member

Yes, let's go with macOS 10.15 for Python 3.14 for now.

For the record, this applies to "portable" builds, that is, built on a new version of macOS and run on a different (older) version of macOS. While not explicitly tested on older releases, configuring (without a MACOS_DEPLOYMENT_TARGET), building, and running on the same system should work with any particular version of macOS.

I think a next step here is to propose an explicit CPython macOS support policy for 3.14 as a PEP, something that has been in the queue for awhile, and include with it details on supported "portable" ranges (like building on macOS 15 with a deployment target of 10.15) and with which universal architectures, to be backed up by GHA and/or buildbots CI testing. Having that should make making implementation decisions easier. I'll try to get to that later this week when I again have access to older macOS systems.

@ned-deilyned-deily merged commit9d3a8f4 intopython:mainDec 22, 2024
44 of 45 checks passed
@ned-deily
Copy link
Member

P.S. Thanks,@zanieb, for all your work on this!

hugovk reacted with hooray emojizanieb, AlexWaygood, and erlend-aasland reacted with heart emoji

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestDec 23, 2024
…ython#128155)Generate a build error on ``unguarded-availability`` in portable macOS builds (i.e. using MACOSX_DEPLOYMENT_TARGET), preventing invalid use of symbols that are not available in older versions of the OS.
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull requestJan 8, 2025
…ython#128155)Generate a build error on ``unguarded-availability`` in portable macOS builds (i.e. using MACOSX_DEPLOYMENT_TARGET), preventing invalid use of symbols that are not available in older versions of the OS.
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-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@corona10corona10Awaiting requested review from corona10corona10 is a code owner

@ezio-melottiezio-melottiAwaiting requested review from ezio-melottiezio-melotti is a code owner

@hugovkhugovkAwaiting requested review from hugovkhugovk is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Consider adding-Werror=unguarded-availability-new to compiler flags for Apple platforms
2 participants
@zanieb@ned-deily

[8]ページ先頭

©2009-2025 Movatter.jp