build(gateway): skip fixupPhase to kill 'patchelf: wrong ELF type' noise

dontPatchELF only disabled the patchELF sub-phase; fixupPhase's
shrinkELF step still emits the same error on the prebuilt .node addons
and .o/.a object files in node_modules. Skip the entire fixupPhase
(dontFixup = true) for the gateway — node is the external interpreter
and .node addons are self-contained dlopen prebuilts, so Nix RPATH
patching/stripping is neither needed nor wanted.
This commit is contained in:
asepharyana
2026-08-15 22:20:56 +07:00
parent c04c410fad
commit 17a4fbd73d
+10 -8
View File
@@ -175,14 +175,16 @@ WRAPPER
# do NOT let stdenv run its own cmake configure phase on the source. # do NOT let stdenv run its own cmake configure phase on the source.
dontUseCmakeConfigure = true; dontUseCmakeConfigure = true;
# The gateway bundles native node_modules (.node addons, plus .o/.a # The gateway bundles native node_modules (.node addons plus .o/.a
# object files left in prebuilt dirs). stdenv's fixupPhase runs # object files left in prebuilt dirs). stdenv's fixupPhase walks
# `patchELF` over $out and chokes on the non-ET_DYN ELF files, # $out/node_modules and runs patchELF + shrinkELF over every ELF it
# emitting hundreds of harmless "patchelf: wrong ELF type" lines. # finds, choking on the non-ET_DYN files (.o/.a) and the prebuilt
# The real binary is node (external, already RPATH-fixed) and the # .node addons — emitting hundreds of harmless "patchelf: wrong ELF
# .node addons are self-contained prebuilts loaded via dlopen, so # type" lines per build. The real binary is node (external, already
# Nix's RPATH patching is neither needed nor wanted here. # RPATH-fixed in its own derivation) and the .node addons are
dontPatchELF = true; # self-contained prebuilts loaded via dlopen, so Nix's fixup pass is
# neither needed nor wanted here. Skip it entirely.
dontFixup = true;
buildPhase = pnpmInstall + '' buildPhase = pnpmInstall + ''
echo "=== Building native voice deps ===" echo "=== Building native voice deps ==="