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 — static_assert undefined (with C11 compiler) on macOS <= 10.10 · Issue #99069 · python/cpython

static_assert undefined (with C11 compiler) on macOS <= 10.10 #99069

New issue
Copy link
New issue
Copy link
Closed
Closed
static_assert undefined (with C11 compiler) on macOS <= 10.10#99069
Copy link
Labels
OS-mactype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@jmroot
jmroot
opened on Nov 3, 2022
Issue body actions

Bug report

Python 3.11 fails to build on macOS 10.10 because static_assert is not defined by the libc headers, even when using a C11 compiler. A workaround like the one in place for FreeBSD is needed.

Your environment

  • CPython versions tested on: 3.11.0
  • Operating system and architecture: macOS 10.10 x86_64
  • PR: gh-99069: Consolidate checks for static_assert #94766
  • PR: [3.11] gh-99069: Consolidate checks for static_assert (GH-94766) #103282

Activity

  1. jmroot
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Nov 3, 2022
  2. JelleZijlstra commented on Nov 3, 2022

    @JelleZijlstra
    JelleZijlstra
    on Nov 3, 2022
    Member
    More actions

    Isn't MacOS 10.10 unsupported since 2017?

  3. JelleZijlstra
    added
    OS-mac
    on Nov 3, 2022
  4. jmroot
    added a commit that references this issue on Nov 3, 2022

    pythongh-99069: Consolidate checks for static_assert

    5f46d21
  5. ned-deily commented on Nov 3, 2022

    @ned-deily
    ned-deily
    on Nov 3, 2022
    Member
    More actions

    Isn't MacOS 10.10 unsupported since 2017?

    By Apple, but there are still many users of older versions of macOS. The python.org macOS installers currently support running on systems back through macOS 10.9 (but the binaries are built on newer versions on macOS so would not see this build error) and the MacPorts project (where this issue originated) supports back to macOS 10.6 and earlier.

    Reacted by Jelle Zijlstra
  6. ambv commented on Nov 7, 2022

    @ambv
    ambv
    on Nov 7, 2022
    Contributor
    More actions

    I have no issue on principle with supporting builds on Mac OS X 10.9 even if that's no longer supported by Apple. That being said, it's a question worth asking: how long will we commit to supporting ancient macOS versions with the latest Python? I mean, GH-94766 isn't particularly bad but it's one example of additional maintenance required.

    For Windows we dropped Windows 7 support not long after it was dropped by Microsoft and the first Windows 7-specific issue arose. There are some complaints about that but it's a somewhat strange requirement: the latest Python version on a very old operating system. For Windows users, we said: hey, Python 3.7 and 3.8 are still supported, use those instead on Windows 7.

    Maybe at some point we should say the same about 10.9 Mavericks, unsupported since September 2016? Again, there are still-supported versions of Python that you can install on those old operating systems. The question is: should 3.12 keep piling workarounds for it?

  7. jmroot commented on Nov 7, 2022

    @jmroot
    jmroot
    on Nov 7, 2022
    ContributorAuthor
    More actions

    From our (MacPorts) point of view, we're going to be adding these workarounds downstream anyway for a long time to come, so we might as well send them upstream.

  8. ronaldoussoren commented on Nov 8, 2022

    @ronaldoussoren
    ronaldoussoren
    on Nov 8, 2022
    Contributor
    More actions

    Isn't MacOS 10.10 unsupported since 2017?

    By Apple, but there are still many users of older versions of macOS. The python.org macOS installers currently support running on systems back through macOS 10.9 (but the binaries are built on newer versions on macOS so would not see this build error) and the MacPorts project (where this issue originated) supports back to macOS 10.6 and earlier.

    Off-topic for this issue, but we need to start thinking about which OS releases we want to support in the installer. The Xcode 14 release notes mention:

    Building for deployment to OS releases older than macOS 10.13, iOS 11, tvOS 11, and watchOS 4 is no longer supported. (92834476)

    Apple no longer supports deploying to older macOS versions than 10.13 with the latest version of Xcode, while we should use the latest compiler and SDK to get best performance and access to new APIs.

    W.r.t. this particular issue I don't mind adding a workaround for this given that a similar workaround is present for FreeBSD.

  9. ned-deily commented on Nov 8, 2022

    @ned-deily
    ned-deily
    on Nov 8, 2022
    Member
    More actions

    WRT the dropping of support for older macOS releases in the latest Xcode/CLT, I plan to provide a new installer variant for 3.12 pre-releases that will use the latest tools. More to follow after alpha 2.

  10. jmroot
    added a commit that references this issue on Nov 21, 2022

    pythongh-99069: Consolidate checks for static_assert

    e75e612
  11. jmroot commented on Feb 19, 2023

    @jmroot
    jmroot
    on Feb 19, 2023
    ContributorAuthor
    More actions

    Pinging as per the dev guide since the PR has been awaiting review for over a month.

  12. vstinner
    added a commit that references this issue on Apr 5, 2023

    gh-99069: Consolidate checks for static_assert (#94766)

    96e1901
  13. miss-islington
    added 2 commits that reference this issue on Apr 5, 2023

    pythongh-99069: Consolidate checks for static_assert (pythonGH-94766)

    61c1055

    gh-99069: Consolidate checks for static_assert (GH-94766)

    851e744
  14. gaogaotiantian
    added a commit that references this issue on Apr 8, 2023

    pythongh-99069: Consolidate checks for static_assert (python#94766)

    7c02ae9
  15. warsaw
    added a commit that references this issue on Apr 11, 2023

    pythongh-99069: Consolidate checks for static_assert (python#94766)

    5247f86
  16. ned-deily commented on May 3, 2023

    @ned-deily
    ned-deily
    on May 3, 2023
    Member
    More actions

    @jmroot's fix for the immediate problem was merged by @vstinner to main in #94766 and in 3.11 (for 3.11.4) in #103282.

  17. ned-deily
    closed this as completedon May 3, 2023
  18. th0ma7 commented on Jul 3, 2023

    @th0ma7
    th0ma7
    on Jul 3, 2023
    More actions

    I believe this last patch #103282 is what makes build to fail on ARMv5 using gcc 4.6.4. This was working previously with Python 3.11.3 and fails since 3.11.4.

    Here's my related PR to build Python 3.10 and 3.11 pacakges for Synology linux NAS
    SynoCommunity/spksrc#5800

    EDIT: Confirmed, now having a revert patch for that specific arch armv5. SynoCommunity/spksrc@8ca07f5
    Note for others who may be in the same boat, in order to succesfully build Python 3.x using gcc 4.64 on armv5 where also enforcing C99 thus extending our luck a little longer https://github.com/SynoCommunity/spksrc/blob/master/cross/python311/patches/88f6281/005-configure.ac-remove-unknown-flags.patch

  19. jmroot commented on Jul 3, 2023

    @jmroot
    jmroot
    on Jul 3, 2023
    ContributorAuthor
    More actions

    Relying on _Static_assert being accepted in C99 mode is certainly a hack, but if that's your goal you can probably get away with just removing or modifying the __STDC_VERSION__ >= 201112L part of the check.

    Reacted by th0ma7
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

    OS-mactype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      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.