-
-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to make bytecode for arm64 on Linux x86 #95
Comments
@robvanderleek Could you tell me if it's woking with past versions of pkg or other nodejs versions like 18/16? I just want to understand where the issue could be It should come from: Line 91 in db7f2c5
Could you debug it? |
See below how it fails for ARM64 with nodejs 20/18/16 versions, but works for x86 with nodejs 20/18/16. I've tried I think it's host platform related, since building for arm64 fails on Linux Ubuntu 24, but succeeds on macOS. rob:~/projects/yao-pkg-linuxstatic-arm64-bug$ npx pkg -o index -t node20-linuxstatic-arm64 index.js
> [email protected]
(node:19081) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v20.17.0-linuxstatic-arm64 [====================] 100%
> Warning Failed to make bytecode node20-arm64 for file /snapshot/yao-pkg-linuxstatic-arm64-bug/index.js rob:~/projects/yao-pkg-linuxstatic-arm64-bug$ npx pkg -o index -t node18-linuxstatic-arm64 index.js
> [email protected]
(node:19116) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v18.20.4-linuxstatic-arm64 [====================] 100%
> Warning Failed to make bytecode node18-arm64 for file /snapshot/yao-pkg-linuxstatic-arm64-bug/index.js rob:~/projects/yao-pkg-linuxstatic-arm64-bug$ npx pkg -o index -t node16-linuxstatic-arm64 index.js
> [email protected]
(node:19151) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v16.20.2-linuxstatic-arm64 [====================] 100%
> Warning Failed to make bytecode node16-arm64 for file /snapshot/yao-pkg-linuxstatic-arm64-bug/index.js error (write EPIPE) rob:~/projects/yao-pkg-linuxstatic-arm64-bug$ npx pkg -o index -t node20-linuxstatic-x64 index.js
> [email protected]
(node:19186) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v20.17.0-linuxstatic-x64 [====================] 100%
fetched-v20.17.0-linux-x64 [====================] 100% rob:~/projects/yao-pkg-linuxstatic-arm64-bug$ npx pkg -o index -t node18-linuxstatic-x64 index.js
> [email protected]
(node:19224) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v18.20.4-linuxstatic-x64 [====================] 100%
fetched-v18.20.4-linux-x64 [====================] 100%
rob:~/projects/yao-pkg-linuxstatic-arm64-bug$ npx pkg -o index -t node16-linuxstatic-x64 index.js
> [email protected]
(node:19261) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
> Fetching base Node.js binaries to PKG_CACHE_PATH
fetched-v16.20.2-linuxstatic-x64 [====================] 100%
fetched-v16.20.2-linux-x64 [====================] 100% |
@robvanderleek I actually have no time to look at this issue but I suggest to try debug it to see if you are able to find the root cause of the issue, aboce I linked you the code that makes the bytecode, try to put some breakpoints there to see what's the line that triggers that issue |
That comes from fabricator |
What version of pkg are you using?
5.15.0
What version of Node.js are you using?
21.2.0
What operating system are you using?
Ubuntu
What CPU architecture are you using?
x86_64
What Node versions, OSs and CPU architectures are you building for?
node20-linuxstatic-arm64
Describe the Bug
Building a static binary for Linux ARM64 failes on Linux x86. For example, this command:
Generates the following error:
Adding the
--debug
flag to the build shows:I am able to generate an ARM64 static Linux binary on macOS.
Expected Behavior
A static Linux ARM64 is generated without warnings.
To Reproduce
I created a minimal example repository that demonstrates the problem:
Not that:
does not generate the warning.
The text was updated successfully, but these errors were encountered: