Skip to content

macOS14-arm64 detected as x86_64 by CMake #9676

@jcelerier

Description

@jcelerier

Description

Hello,
I am running an action with the image macos-14 which according to README and my build log is ARM64:

Current runner version: '2.315.0'
Operating System
  macOS
  14.4.1
  23E224
Runner Image
  Image: macos-14-arm64
  Version: 20240405.1
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240405.1/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240405.1
Runner Image Provisioner
  2.0.361.1+33a726b54233caea13315dba3887b0e7c5a1d482

Yet from within, my CMake invocation gives me this :

CMAKE_HOST_SYSTEM_PROCESSOR: x86_64
CMAKE_SYSTEM: Darwin-23.4.0
CMAKE_SYSTEM_PROCESSOR: x86_64

CMake just uses uname and the like to devise this information. How can I make sure I'm actually running on ARM64 ?

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240405.1

failed build : https://github.com/ossia/score/actions/runs/8639881737/job/23686938913

action : https://github.com/ossia/score/blob/master/.github/workflows/mac-builds.yaml#L64

Is it regression?

no

Expected behavior

The apps running on this image should see an ARM64 processor, not an Intel one.

Actual behavior

The apps running on the image see an Intel processor. Maybe they are running under Rosetta ?

Repro steps

  • Set macos-14 runner image
  • Print CMAKE_HOST_SYSTEM_PROCESSOR
  • It prints x86_64
  • It should print arm64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions