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

riscv64 build failed for v20.11.0 #106

Open
ehoogeveen-medweb opened this issue Jan 15, 2024 · 12 comments
Open

riscv64 build failed for v20.11.0 #106

ehoogeveen-medweb opened this issue Jan 15, 2024 · 12 comments

Comments

@ehoogeveen-medweb
Copy link

ehoogeveen-medweb commented Jan 15, 2024

I noticed that v20.11.0 isn't listed as an LTS build in index.json. That's probably because the riscv64 build failed, since it means not all platforms would be able to update. I don't use the riscv64 build myself, but our automation looks for the latest LTS and that means it's still stuck on v20.10.0 :)

Build log: https://unofficial-builds.nodejs.org/logs/202401101543-v20.11.0/riscv64.log

The errors look like this:

In file included from ../deps/v8/src/codegen/assembler-arch.h:27,
                 from ../deps/v8/src/wasm/baseline/liftoff-assembler-defs.h:8,
                 from ../deps/v8/src/execution/riscv/frame-constants-riscv.h:11,
                 from ../deps/v8/src/execution/frame-constants.h:426,
                 from ../deps/v8/src/builtins/builtins-utils.h:11,
                 from ../deps/v8/src/api/api-arguments.h:9,
                 from ../deps/v8/src/ic/call-optimization.h:8,
                 from ../deps/v8/src/compiler/heap-refs.h:11,
                 from ../deps/v8/src/compiler/types.h:10,
                 from ../deps/v8/src/compiler/node.h:12,
                 from ../deps/v8/src/compiler/all-nodes.h:8,
                 from ../deps/v8/src/compiler/all-nodes.cc:5:
../deps/v8/src/codegen/riscv/assembler-riscv.h:289:60: error: 'Tagged' has not been declared
  289 |                                                            Tagged<Code> code,
      |                                                            ^~~~~~
../deps/v8/src/codegen/riscv/assembler-riscv.h:289:66: error: expected ',' or '...' before '<' token
  289 |                                                            Tagged<Code> code,
      |                                                                  ^
make[2]: *** [tools/v8_gypfiles/v8_compiler.target.mk:297: /home/node/node-v20.11.0/out/Release/obj.target/v8_compiler/deps/v8/src/compiler/all-nodes.o] Error 1

There are some other errors, but I think they're all a consequence of the above.

Unfortunately I don't know where to go to fix it, where to go to submit a fix or how to test it even if I did, so I hope someone else can have a look!

@richardlau
Copy link
Member

This should be fixed now.

From logs/202401101543-v20.11.0/build.log we can see we had some ECONNRESET errors trying to read from GitHub while running the indexer:

+ npx nodejs-dist-indexer --dist /home/nodejs/download/release --indexjson /home/nodejs/download/release/index.json --indextab /home/nodejs/download/release/index.tab
npx: installed 27 in 5.263s
Ignoring directory "v19.8.0" (can't decode dir contents)
Ignoring directory "lost+found" (can't decode ref)
{ Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }
(ignoring error fetching V8 version for node/v20.11.0)
{ Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }
(ignoring error fetching uv version for node/v20.11.0)
{ Error: Client network socket disconnected before secure TLS connection was established
    at TLSSocket.onConnectEnd (_tls_wrap.js:1125:19)
    at Object.onceWrapper (events.js:286:20)
    at TLSSocket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  code: 'ECONNRESET',
  path: null,
  host: 'raw.githubusercontent.com',
  port: 443,
  localAddress: undefined }
(ignoring error fetching OpenSSL version for node/v20.11.0)
{ Error: Client network socket disconnected before secure TLS connection was established
    at TLSSocket.onConnectEnd (_tls_wrap.js:1125:19)
    at Object.onceWrapper (events.js:286:20)
    at TLSSocket.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  code: 'ECONNRESET',
  path: null,
  host: 'raw.githubusercontent.com',
  port: 443,
  localAddress: undefined }
(ignoring error fetching LTS version for node/v20.11.0)
{ Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }
(ignoring error fetching modules version for node/v20.11.0)
{ Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:111:27) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' }
(ignoring error fetching npm version for node/v20.11.0)
++ date
+ echo 'Finished build @ Wed Jan 10 20:39:15 UTC 2024'
Finished build @ Wed Jan 10 20:39:15 UTC 2024

I've removed the v20.11.0 entries from .dist-indexer-version-cache on the machine and regenerated the index by rerunning:

npx nodejs-dist-indexer --dist /home/nodejs/download/release --indexjson /home/nodejs/download/release/index.json --indextab /home/nodejs/download/release/index.tab

@richardlau
Copy link
Member

This should be fixed now.

To clarify -- the missing "LTS" status has been fixed.

The riscv build failure is unrelated. cc @nodejs/platform-riscv64

@ehoogeveen-medweb ehoogeveen-medweb changed the title riscv64 build failed for v20.11.0 (preventing latest LTS from updating) riscv64 build failed for v20.11.0 Jan 15, 2024
@ehoogeveen-medweb
Copy link
Author

Thanks! If I understand correctly, the build failure still needs a look, so I'll leave this open for now.

@sxa
Copy link
Member

sxa commented Jan 15, 2024

Hmmm I wonder if something has happened between those two versions which means the version of the cross-compiler is no longer suitable for building.

@sxa
Copy link
Member

sxa commented Jan 15, 2024

Noting that the master build of v22.0.0 builds ok with the latest (native) compiler on Ubuntu when I build on a real board which would certainly indicate that an older cross-compiler may be the cause of this.

@targos
Copy link
Member

targos commented Jan 16, 2024

I think that's because nodejs/node#50552 was not identified as applying to v21 only.

@kxxt
Copy link

kxxt commented Jan 17, 2024

I think that's because nodejs/node#50552 was not identified as applying to v21 only.

Yes, it shouldn't be applied to v20.

kxxt added a commit to kxxt/node that referenced this issue Jan 17, 2024
This reverts commit bc2ebb9, which
shouldn't be applied to v20.x.

Fix nodejs/unofficial-builds#106
@kxxt
Copy link

kxxt commented Jan 17, 2024

I opened a revert PR: nodejs/node#51495

richardlau pushed a commit to nodejs/node that referenced this issue Mar 5, 2024
This reverts commit bc2ebb9, which
shouldn't be applied to v20.x.

Fix nodejs/unofficial-builds#106

PR-URL: #51495
Fixes: nodejs/unofficial-builds#106
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@tuler
Copy link

tuler commented Apr 6, 2024

indicate that an older cross-compiler may be the cause of this.

We have a fork that builds with Ubuntu 22.04 cross-compiler.
Last one we built was Node.js 20.9.0. I'm not sure it builds 20.11.0.
This is basically the change cartesi@c25b43a

We'd love to see this change upstream.

@richardlau
Copy link
Member

I opened a revert PR: nodejs/node#51495

The revert was included in Node.js 20.12.0.

@tuler
Copy link

tuler commented May 9, 2024

Build of v22.1.0 is still failing

/usr/bin/ld: /home/node/node-v22.1.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/api/api.o: in function `v8::TryHandleWebAssemblyTrapPosix(int, siginfo_t*, void*)':
api.cc:(.text._ZN2v829TryHandleWebAssemblyTrapPosixEiP9siginfo_tPv+0x5): undefined reference to `v8::internal::trap_handler::TryHandleSignal(int, siginfo_t*, void*)'
/usr/bin/ld: /home/node/node-v22.1.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/trap-handler/handler-outside.o: in function `v8::internal::trap_handler::EnableTrapHandler(bool)':
handler-outside.cc:(.text._ZN2v88internal12trap_handler17EnableTrapHandlerEb+0x2d): undefined reference to `v8::internal::trap_handler::RegisterDefaultTrapHandler()'
/usr/bin/ld: /home/node/node-v22.1.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/riscv/simulator-riscv.o: in function `v8::internal::Simulator::ProbeMemory(unsigned long, unsigned long)':
simulator-riscv.cc:(.text._ZN2v88internal9Simulator11ProbeMemoryEmm+0x1e): undefined reference to `v8_internal_simulator_ProbeMemory'
/usr/bin/ld: /home/node/node-v22.1.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/riscv/simulator-riscv.o: in function `v8::internal::Simulator::DecodeRVRAType()':
simulator-riscv.cc:(.text._ZN2v88internal9Simulator14DecodeRVRATypeEv+0x2d7): undefined reference to `v8_internal_simulator_ProbeMemory'
/usr/bin/ld: simulator-riscv.cc:(.text._ZN2v88internal9Simulator14DecodeRVRATypeEv+0x363): undefined reference to `v8_internal_simulator_ProbeMemory'
/usr/bin/ld: simulator-riscv.cc:(.text._ZN2v88internal9Simulator14DecodeRVRATypeEv+0xa41): undefined reference to `v8_internal_simulator_ProbeMemory'
/usr/bin/ld: simulator-riscv.cc:(.text._ZN2v88internal9Simulator14DecodeRVRATypeEv+0xc74): undefined reference to `v8_internal_simulator_ProbeMemory'
/usr/bin/ld: /home/node/node-v22.1.0/out/Release/obj.host/v8_base_without_compiler/deps/v8/src/execution/riscv/simulator-riscv.o:simulator-riscv.cc:(.text._ZN2v88internal9Simulator14DecodeRVRATypeEv+0x1409): more undefined references to `v8_internal_simulator_ProbeMemory' follow
collect2: error: ld returned 1 exit status

Is this a problem with v8?

ps: I'm trying to build with ubuntu 22.04 gcc-riscv64-linux-gnu.

@richardlau
Copy link
Member

nodejs/node#52678 -- may be fixed by nodejs/node#52888.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants