Skip to content

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

Description

@zanieb

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

Activity

  1. added
    buildThe build process and cross-build
    on Dec 20, 2024
  2. changed the title [-]Error during build on unguarded use of new symbols[/-] [+]Error during build on unguarded use of new symbols on macOS[/+] on Dec 20, 2024
  3. zanieb commented on Dec 20, 2024

    @zanieb
    ContributorAuthor

    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.

  4. zanieb commented on Dec 20, 2024

    @zanieb
    ContributorAuthor

    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.

  5. zanieb commented on Dec 20, 2024

    @zanieb
    ContributorAuthor

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

  6. picnixz commented on Dec 20, 2024

    @picnixz
    Member

    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.

  7. zanieb commented on Dec 20, 2024

    @zanieb
    ContributorAuthor

    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.

  8. picnixz commented on Dec 20, 2024

    @picnixz
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions