[Pkg-javascript-devel] Bug#1090073: nodejs: FTBFS on riscv64: undefined reference to `v8::internal::trap_handler::RegisterDefaultTrapHandler()'

Aurelien Jarno aurel32 at debian.org
Mon Dec 16 05:24:45 GMT 2024


Source: nodejs
Version: 22.12.0+dfsg-3
Severity: serious
Tags: ftbfs patch
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: debian-riscv at lists.debian.org
User: debian-riscv at lists.debian.org
Usertags: riscv64

Dear maintainer,

nodejs in experimental fails to build from source on riscv64:

| g++ -o /<<PKGBUILDDIR>>/out/Release/mksnapshot -pthread -rdynamic  -Wl,--start-group /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/embedded-empty.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/embedded-file-writer.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-aix.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-base.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-generic.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-mac.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/platform-embedded-file-writer-win.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/mksnapshot.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/snapshot-empty.o /<<PKGBUILDDIR>>/out/Release/obj.target/mksnapshot/deps/v8/src/snapshot/static-roots-gen.o /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_base_without_compiler.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_init.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_libbase.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_libplatform.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_turboshaft.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_abseil.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_compiler.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers.a /<<PKGBUILDDIR>>/out/Release/obj.target/tools/v8_gypfiles/libv8_initializers_slow.a -lz -luv -lsimdjson -lbrotlidec -lbrotlienc -lcares -lnghttp2 -lnghttp3 -lngtcp2 -lsqlite3 -lcrypto -lssl -licui18n -licuuc -latomic -ldl -lrt -Wl,--end-group
| /usr/bin/ld: /<<PKGBUILDDIR>>/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/api/api.o: in function `v8::TryHandleWebAssemblyTrapPosix(int, siginfo_t*, void*)':
| /<<PKGBUILDDIR>>/out/../deps/v8/src/api/api.cc:6403:(.text._ZN2v829TryHandleWebAssemblyTrapPosixEiP9siginfo_tPv+0xe): undefined reference to `v8::internal::trap_handler::TryHandleSignal(int, siginfo_t*, void*)'
| /usr/bin/ld: /<<PKGBUILDDIR>>/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/trap-handler/handler-outside.o: in function `v8::internal::trap_handler::EnableTrapHandler(bool)':
| /<<PKGBUILDDIR>>/out/../deps/v8/src/trap-handler/handler-outside.cc:265:(.text._ZN2v88internal12trap_handler17EnableTrapHandlerEb+0x58): undefined reference to `v8::internal::trap_handler::RegisterDefaultTrapHandler()'
| collect2: error: ld returned 1 exit status
| make[2]: *** [tools/v8_gypfiles/mksnapshot.target.mk:240: /<<PKGBUILDDIR>>/out/Release/mksnapshot] Error 1
| rm 5515c37f5e4131af6ec8af515b82a3a263977179.intermediate ddeecd6dc5c3c17584943baebc7c7fd45bc0067a.intermediate
| make[1]: *** [Makefile:135: node] Error 2
| make[1]: Leaving directory '/<<PKGBUILDDIR>>'
| dh_auto_build: error: make -j4 returned exit code 2
| make: *** [debian/rules:211: binary-arch] Error 25
| dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2

The full build log is available there:
https://buildd.debian.org/status/fetch.php?pkg=nodejs&arch=riscv64&ver=22.12.0%2Bdfsg-3&stamp=1734142371&raw=0

It appears that the problem has already been fixed upstream:
https://github.com/nodejs/node/commit/bdaa898ceaf61840d030ee83b2e9adf40973544d

I have tested this patch and I confirm that the package builds fine on
riscv64 after applying it.

Regards
Aurelien



More information about the Pkg-javascript-devel mailing list