Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during build on unguarded use of new symbols on macOS #128135

Closed
zanieb opened this issue Dec 20, 2024 · 6 comments
Closed

Error during build on unguarded use of new symbols on macOS #128135

zanieb opened this issue Dec 20, 2024 · 6 comments
Labels
build The build process and cross-build type-feature A feature request or enhancement

Comments

@zanieb
Copy link
Contributor

zanieb commented Dec 20, 2024

Feature or enhancement

Proposal:

CPython builds run against the latest macOS version and unguarded use of new symbols does not throw an error. However, building CPython on older versions of macOS is supported. Consequently, regressions are not caught, e.g.:

Enabling -Werror=unguarded-availability-new would be great to catch these before they become a problem downstream.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

This was discussed briefly in Discord

@zanieb zanieb added the type-feature A feature request or enhancement label Dec 20, 2024
@picnixz picnixz added the build The build process and cross-build label Dec 20, 2024
@zanieb zanieb changed the title Error during build on unguarded use of new symbols Error during build on unguarded use of new symbols on macOS Dec 20, 2024
@zanieb
Copy link
Contributor Author

zanieb commented Dec 20, 2024

Here's an initial patch 36c7da4

I'm not sure if we should be using unguarded-availability or unguarded-availability-new and define an explicit lower bound version? We use the latter downstream, but we also set a minimum version.

I'm having a hard time reproducing failures without cross-compiling via python-build-standalone. Probably user error.

@zanieb
Copy link
Contributor Author

zanieb commented Dec 20, 2024

Another complexity is astral-sh/python-build-standalone#210 / astral-sh/python-build-standalone#422 — if this is in the CFLAGS in sysconfig it is used to build extension modules in some packages which causes failures.

@zanieb
Copy link
Contributor Author

zanieb commented Dec 20, 2024

Perhaps this is dumb to ask, but.. this flag is clang only? I don't think there's an obvious equivalent in gcc?

@picnixz
Copy link
Member

picnixz commented Dec 20, 2024

I'm not aware of an equivalent one for gcc. Btw, I think we already had an issue for this one: #100384 but I think it's better to keep the latest in this case unless you want to move the discussion out there.

@zanieb
Copy link
Contributor Author

zanieb commented Dec 20, 2024

Ah thank you @picnixz — I don't have a preference for which issue we use but agree it makes sense to close one of them.

@picnixz
Copy link
Member

picnixz commented Dec 20, 2024

Let's move the discussion on the original one. I'll edit the issue to include your findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants