Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.
This repository was archived by the owner on Jan 31, 2025. It is now read-only.

[BUG] MacOS binary CPU architecture incompatible with Apple Silicon M2 #460

Closed

Description

Describe the bug
The MacOS binary CPU architecture is incompatible with Apple Silicon M2

To Reproduce
Steps to reproduce the behavior:

  1. gh release download --repo microsoft/nubesgen --pattern='nubesgen-cli-macos'
  2. chmod a+x nubesgen-cli-macos
  3. ./nubesgen-cli-macos
  4. See error
-bash: ./nubesgen-cli-macos: Bad CPU type in executable

Alternatively, the xattr -d com.apple.quarantine nubesgen-cli-macos yields

xattr: nubesgen-cli-macos: No such xattr: com.apple.quarantine

Expected behavior
The binary should execute correctly

Desktop (please complete the following information):

  • OS: MacOS 13.5.2 (22G91)
  • Macbook Pro 14'' 2023 Apple M2 Max

Activity

  1. cedricvidal commented on Oct 6, 2023

    @cedricvidal
    ContributorAuthor

    Github actually uses an AMD X64 CPU for macos-* runners, it is not an actual Apple Silicon CPU so the binary created actually uses the x86_64 architecture.

    file nubesgen-cli-macos
    nubesgen-cli-macos: Mach-O 64-bit executable x86_64
    

    On an actual M1 or M2 machine it shows:

    file nubesgen-cli-macos-m1
    nubesgen-cli-macos-m1: Mach-O 64-bit executable arm64
    

    In order to run a x86_64 binary on an Apple Silicon M1 or M2 machine, you need to install Rosetta first with the command

    /usr/sbin/softwareupdate --install-rosetta --agree-to-license
    

    Once, Rosetta is installed, the CLI can be run.

  2. added a commit that references this issue on Oct 6, 2023
    7dd02f2
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions