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

Latest arm64 macOS binary does not work when built on Ubuntu #2004

@olafurpg

Description

@olafurpg

What version of pkg are you using?

5.8.1

What version of Node.js are you using?

v20.4.0

What operating system are you using?

macOS and Ubuntu

What CPU architecture are you using?

arm64 on macOS, x86_64 on Ubuntu

What Node versions, OSs and CPU architectures are you building for?

arm64 macOS

Describe the Bug

I've been using pkg successfully from my local Apple M1 computer for an open source project. Here is where we invoke pkg

https://github.com/sourcegraph/cody/blob/43bad53c540eec46eaa6e39a9efeb6a62534b635/agent/package.json#L20

I recently added CI automation to trigger releases so that I don't have to build the project from my local computer. The macOS arm64 binary does not work when it's created by the ubuntu-latest runner from GitHub actions. I confirmed that all the other binaries work as expected (x86 macOS, x86 Linux, x86 Windows).

 ./agent-macos-x64 # works OK via Rosetta
Starting Cody Agent...
^C
❯ ./agent-macos-arm64
[1]    20895 killed     ./agent-macos-arm64

Expected Behavior

My expected behavior is that ./agent-macos-arm64 prints the same output as ./agent-macos-x86 when these binaries are built on Ubuntu.

To Reproduce

  • Run GitHub Actions workflow in Ubuntu that creates macOS arm64 binary
  • Run the binary on an Apple M1 computer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions