Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export async function need(opts: NeedOptions) {
}

if (hostPlatform !== platform) {
if (hostPlatform !== 'alpine' || platform !== 'linuxstatic') {
if ((hostPlatform !== 'alpine' || platform !== 'linuxstatic') && arch !== 'ppc64') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this makes sense, I mean shouldn't you only be able to build ppc64 from a ppc64 arch?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I run the node24-linuxstatic-ppc64 build on a ppc64 machine, it doesn’t proceed because of this validation. I applied a patch to fix the code and tested it on a ppc64 machine — it worked for linuxstatic. So by default, it should work when running on a ppc64 machine; the only issue is that this validation is blocking it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[root@rh-rn-pvm test]# pkg --targets node24-linuxstatic-ppc64 --out-dir test/build .
> [email protected]
> Fetching base Node.js binaries to PKG_CACHE_PATH
  fetched-v24.8.0-linuxstatic-ppc64   [                    ] 0%
> Error! 404: Not Found
> Not found in remote cache:
  {"tag":"v3.5","name":"node-v24.8.0-linuxstatic-ppc64"}
> Building base binary from source:
  built-v24.8.0-linuxstatic-ppc64
> Error! Not able to build for 'linuxstatic' here, only for 'linux'
[root@rh-rn-pvm test]# uname -s
Linux
[root@rh-rn-pvm test]# uname -r
4.18.0-553.76.1.el8_10.ppc64le
[root@rh-rn-pvm test]# 

throw wasReported(
`Not able to build for '${opts.platform}' here, only for '${hostPlatform}'`
);
Expand Down