Skip to content

Why do we still use gcc 12 on Mac? #270

@nbelakovski

Description

@nbelakovski

I noticed this comment in build_python.yml and thought I would make an issue to address it:

      - name: Set up Fortran
        uses: fortran-lang/setup-fortran@main
        if: ${{ runner.os == 'macOS' }}
        with:
          compiler: gcc
          version: 12  # Zaikun 20260125: 12 is a quite old version already. Why not the latest?

From the commit that introduced version 12:

gcc 13.3.0 seems to have an issue with math.h on macOS. It spews a
bunch of errors about the API_DEPRECATED macro not being used
correctly, which is not an issue on our side. gcc 13.2.0 does not
seem to have this issue, but since we cannot select gcc with such
granularity we downgrade to gcc 12 and hope this fixes the issue for
now.

I have since been testing on mac with v14 and it I do not see a recurrence of the above issue so we will shortly be able to use at least that version.

That said, I don't see any issue with using older versions of gcc, SciPy uses versions even older than 12 in some cases: https://github.com/scipy/scipy/blob/04c637ed0edd031c832fc8cf100b4f1134c07a6a/doc/source/dev/toolchain.rst#official-builds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions