Skip to content
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

Build failure: nodejs on RISC-V (RV64GC) #374456

Open
3 tasks done
RossComputerGuy opened this issue Jan 17, 2025 · 6 comments
Open
3 tasks done

Build failure: nodejs on RISC-V (RV64GC) #374456

RossComputerGuy opened this issue Jan 17, 2025 · 6 comments
Labels
0.kind: build failure A package fails to build

Comments

@RossComputerGuy
Copy link
Member

Nixpkgs version

  • Unstable (25.05)

Steps to reproduce

  1. Build nodejs on RISC-V (RV64GC) hardware

Can Hydra reproduce this build failure?

Yes, Hydra can reproduce this build failure.

Link to Hydra build job

N/A as Hydra doesn't exist for riscv64-linux

Relevant log output

error: builder for '/nix/store/zlpqxy106pz6792aw0pxgnzayhj9d2l1-nodejs-22.11.0.drv' failed with exit code 2;
       last 25 log lines:
       > [1773/2053] CC obj/deps/brotli/c/enc/brotli.command.o
       > [1774/2053] CC obj/deps/brotli/c/enc/brotli.compound_dictionary.o
       > [1775/2053] CC obj/deps/brotli/c/enc/brotli.cluster.o
       > [1776/2053] CC obj/deps/brotli/c/enc/brotli.compress_fragment_two_pass.o
       > [1777/2053] CC obj/deps/brotli/c/enc/brotli.compress_fragment.o
       > [1778/2053] CC obj/deps/brotli/c/enc/brotli.dictionary_hash.o
       > [1779/2053] CC obj/deps/brotli/c/enc/brotli.encoder_dict.o
       > [1780/2053] CC obj/deps/brotli/c/enc/brotli.entropy_encode.o
       > [1781/2053] CC obj/deps/brotli/c/enc/brotli.fast_log.o
       > [1782/2053] CC obj/deps/brotli/c/enc/brotli.histogram.o
       > [1783/2053] CC obj/deps/brotli/c/enc/brotli.literal_cost.o
       > [1784/2053] CC obj/deps/brotli/c/enc/brotli.memory.o
       > [1785/2053] LINK mksnapshot
       > FAILED: mksnapshot
       > g++ -pthread -rdynamic -o mksnapshot -Wl,--start-group obj/deps/v8/src/snapshot/embedded/mksnapshot.embedded-empty.o obj/deps/v8/src/snapshot/embedded/mksnapshot.embp
       > /nix/store/v2z9mfvv9l2d1hpjmjhcpcfkd8xk3h1k-binutils-2.43.1/bin/ld: obj/tools/v8_gypfiles/../../deps/v8/src/api/v8_base_without_compiler.api.o: in function `v8::TryH:
       > api.cc:(.text._ZN2v829TryHandleWebAssemblyTrapPosixEiP9siginfo_tPv+0xe): undefined reference to `v8::internal::trap_handler::TryHandleSignal(int, siginfo_t*, void*)'
       > /nix/store/v2z9mfvv9l2d1hpjmjhcpcfkd8xk3h1k-binutils-2.43.1/bin/ld: obj/tools/v8_gypfiles/../../deps/v8/src/trap-handler/v8_base_without_compiler.handler-outside.o: :
       > handler-outside.cc:(.text._ZN2v88internal12trap_handler17EnableTrapHandlerEb+0x62): undefined reference to `v8::internal::trap_handler::RegisterDefaultTrapHandler()'
       > collect2: error: ld returned 1 exit status
       > [1786/2053] CC obj/deps/brotli/c/enc/brotli.encode.o
       > [1787/2053] CC obj/deps/brotli/c/enc/brotli.metablock.o
       > [1788/2053] CC obj/deps/brotli/c/enc/brotli.backward_references.o
       > ninja: build stopped: subcommand failed.
       > make: *** [Makefile:153: node] Error 1

Additional context

No response

System metadata

This will take forever to build on riscv64-linux

Notify maintainers


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

@aduh95

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

@RossComputerGuy RossComputerGuy added the 0.kind: build failure A package fails to build label Jan 17, 2025
@teto teto changed the title Build failure: nodejs Build failure: nodejs on RISC-V (RV64GC) Jan 17, 2025
@RossComputerGuy
Copy link
Member Author

Looks like nodejs/node#53115

@skeuchel
Copy link
Contributor

This particular build failure is fixed by nodejs/node#52888 which is part of nodejs/node#56329 and #371908.

Unfortunately, after cherry-picking #371908 on master the checkPhase fails with:

"/build/node-v22.13.0/node" ./test/embedding/test-embedding.js
"/build/node-v22.13.0/node" ./test/sqlite/test-sqlite-extensions.mjs
(node:10353) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
node:path:1250
      validateString(arg, 'path');
      ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at Object.join (node:path:1250:7)
    at resolveBuiltBinary (file:///build/node-v22.13.0/test/sqlite/test-sqlite-extensions.mjs:13:15)
    at file:///build/node-v22.13.0/test/sqlite/test-sqlite-extensions.mjs:16:16
    at ModuleJob.run (node:internal/modules/esm/module_job:271:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:547:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:116:5) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v22.13.0
make: *** [Makefile:297: cctest] Error 1

@aduh95
Copy link
Contributor

aduh95 commented Jan 17, 2025

Unfortunately, after cherry-picking #371908 on master the checkPhase fails

We probably need this patch: nodejs/node@d0ff34f

@RossComputerGuy
Copy link
Member Author

After #371908, I applied it to my system and got farther:

Failed tests:
out/Release/node /build/node-v22.13.1/test/parallel/test-worker-messaging.js
out/Release/node /build/node-v22.13.1/test/sequential/test-cpu-prof-dir-absolute.js
out/Release/node /build/node-v22.13.1/test/sequential/test-cpu-prof-dir-and-name.js
out/Release/node /build/node-v22.13.1/test/sequential/test-cpu-prof-dir-relative.js
out/Release/node /build/node-v22.13.1/test/sequential/test-cpu-prof-kill.js
make: *** [Makefile:581: test-ci-js] Error 1

@aduh95
Copy link
Contributor

aduh95 commented Jan 27, 2025

Can you share what's the output of the failing tests? You can find it by searching all instances of not ok in the build output

@skeuchel
Copy link
Contributor

skeuchel commented Jan 27, 2025

@aduh95 Here is a current native build log for nodejs-slim_22 on staging. Albeit with vendor-specific xthead extensions in hostPlatform.gcc.arch: https://gist.github.com/skeuchel/60cf252ef249c460d899117a10e89984

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

No branches or pull requests

3 participants