-
-
Notifications
You must be signed in to change notification settings - Fork 25
feat: allow linuxstatic builds for ppc64 architecture #118
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
base: main
Are you sure you want to change the base?
Conversation
Added system information display and additional cleanup steps.
@robertsLando, could you please take a look at this when you have a moment? Thanks! |
Succeeded Test build run: https://github.com/nrranjithnr/pkg-fetch/actions/runs/18187593970 |
|
||
if (hostPlatform !== platform) { | ||
if (hostPlatform !== 'alpine' || platform !== 'linuxstatic') { | ||
if ((hostPlatform !== 'alpine' || platform !== 'linuxstatic') && arch !== 'ppc64') { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]#
Summary
Allow linuxstatic platform builds for ppc64 architecture by bypassing the platform validation check.
Changes
lib/index.ts
to skip the platform mismatch check when building for ppc64 architecture&& arch !== 'ppc64'
condition to allow linuxstatic builds on ppc64 without validation errorsImpact
Use Case
This enables building static Linux binaries on ppc64 systems, which is particularly useful for PowerPC environments that need statically linked executables.