pkg
pkg copied to clipboard
Lipo breaks building fat binary from node14-macos-x64 & node14-macos-arm64
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
- make build targeting node14-macos-x64
- make build targeting node14-macos-arm64
- lipo both
Some more tests which are also failing:
- used pkg 5.6.0
- use node16-macos-x64 and node16-macos-arm64
- use the --no-bytecode and --public flags
+1
We are also facing the same issue with the fat binary.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
Still open
+1, facing the same issue. Any updates on this?
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.
Still happening
Same here. Is there a solution in sight?