Skip to content

Cross-compilation from macOS to Linux on arm64 broken on >=22 #181

@Niek

Description

@Niek

What version of pkg are you using?

6.9.0

What version of Node.js are you using?

24.10.0

What operating system are you using?

macOS 26

What CPU architecture are you using?

arm64

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

node22-linux-arm64

Describe the Bug

I can no longer cross-compile binaries from macOS (arm64) to Linux (arm64) - I'm sure this worked fine before. The binary builds fine, but when running exits without any message.

Expected Behavior

Cross-compilation used to work fine

To Reproduce

❯ cat hello.js
console.log('Hello World')
❯ npx -y @yao-pkg/pkg hello.js -t node22-linux-arm64 -o hello
> [email protected]
❯ ls -lha hello
-rwxr-xr-x@ 1 niek  staff    65M Oct 16 14:33 hello
❯ docker run --rm -it -v $(pwd):/mnt ubuntu:latest /mnt/hello

The issue is the same with node24-linux-arm64 or node24-linuxstatic-arm64.

However, node20-linux-arm64 still seems to work fine.

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