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.

Lipo breaks building fat binary from node14-macos-x64 & node14-macos-arm64 #1597

@has-n

Description

@has-n

What version of pkg are you using?

5.3.2

What version of Node.js are you using?

14.17.3

What operating system are you using?

macOS

What CPU architecture are you using?

x86_64 AND Apple M1

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

node14-macos-x64 & node14-macos-arm64

Describe the Bug

When two builds are made targeting node14-macos-x64 and node14-macos-arm64, the individual binaries work fine. If I lipo them (upstream requirement) using lipo build-x64.app build-arm64.app -create -output build.app, the new fat binary throws an error:

`pkg/prelude/bootstrap.js:3
);
^

SyntaxError: Unexpected token ')'
at new Script (vm.js:103:7)
at readPrelude (internal/bootstrap/pkg.js:29:13)
at internal/bootstrap/pkg.js:36:18
at internal/bootstrap/pkg.js:43:4
at internal/bootstrap/pkg.js:44:2`

Expected Behavior

Fat binary should execute without a problem

To Reproduce

  1. make build targeting node14-macos-x64
  2. make build targeting node14-macos-arm64
  3. lipo both

Metadata

Metadata

Assignees

No one assigned

    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