test: set type=none on IBM i for empty source - #65545
Open
abmusse wants to merge 1 commit into
Open
Conversation
Collaborator
|
Review requested:
|
addon targets. openssl-binding, openssl-get-ssl-ctx, openssl-providers, and zlib-binding all exclude their sources on IBM i because the platform ships OpenSSL and zlib as system libraries. The binding.gyp condition leaves the target with no sources but still of type 'loadable_module', which causes gyp to generate a full solink_module COPY rule in the generated Makefile. With gcc-12, the compiler exits 1 on empty input so gmake stops at the link step and build_addons.py skips the addon non fatally. With clang-21, the compiler exits 0 on empty input and writes no output file. The linker driver then runs llvm-nm internally as a post-link step to generate the .exp symbol export file, finds no output and aborts with: llvm-nm: error: a.out: No such file or directory See: https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi74-ppc64/2438/console The fix is to declare the target as type 'none' when on IBM i. The gyp make generator produces only a touch-stamp rule for 'none' targets no solink_module, no COPY, no .node output is ever expected. build_addons.py sees exit 0 and run-ci continues. Test build with this fix: https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi74-ppc64/2437/console Signed-off-by: Abdirahim Musse <33973272+abmusse@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65545 +/- ##
==========================================
- Coverage 90.30% 90.14% -0.17%
==========================================
Files 751 751
Lines 249116 253635 +4519
Branches 47043 47787 +744
==========================================
+ Hits 224974 228636 +3662
- Misses 15509 16263 +754
- Partials 8633 8736 +103 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
addon targets.
openssl-binding, openssl-get-ssl-ctx,
openssl-providers, and zlib-binding all exclude
their sources on IBM i because the platform ships
OpenSSL and zlib as system libraries.
The binding.gyp condition leaves the target with
no sources but still of type 'loadable_module',
which causes gyp to generate a full solink_module
COPY rule in the generated Makefile.
With gcc-12, the compiler exits 1 on empty input
so gmake stops at the link step and
build_addons.py skips the addon non fatally. With
clang-21, the compiler exits 0 on empty input and
writes no output file. The linker driver then
runs llvm-nm internally as a post-link step to
generate the .exp symbol export file, finds no
output and aborts with:
llvm-nm: error: a.out: No such file or directory
See: https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi74-ppc64/2438/console
The fix is to declare the target as type
'none' when on IBM i. The gyp make generator
produces only a touch-stamp rule for 'none'
targets no solink_module, no COPY, no .node
output is ever expected. build_addons.py sees
exit 0 and run-ci continues.
Test build with this fix:
https://ci.nodejs.org/job/node-test-commit-ibmi/nodes=ibmi74-ppc64/2437/console
Signed-off-by: Abdirahim Musse 33973272+abmusse@users.noreply.github.com