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 failure in 22.0.0 #52678

Open
q66 opened this issue Apr 24, 2024 · 1 comment
Open

riscv64 build failure in 22.0.0 #52678

q66 opened this issue Apr 24, 2024 · 1 comment
Labels
build Issues and PRs related to build files or the CI. riscv64 Issues and PRs related to the riscv64 architecture.

Comments

@q66
Copy link

q66 commented Apr 24, 2024

Version

22.0.0

Platform

Chimera Linux riscv64

Subsystem

v8

What steps will reproduce the bug?

compile

How often does it reproduce? Is there a required condition?

always

What is the expected behavior? Why is that the expected behavior?

it compiles

What do you see instead?

[1824/1901] LINK mksnapshot
FAILED: mksnapshot 
clang++ -Wl,-z,pack-relative-relocs -fno-omit-frame-pointer -pthread -rdynamic -o mksnapshot -Wl,--start-group obj/deps/v8/src/snapshot/embedded/mksnapshot.embedded-empty.o obj/deps/v8/src/snapshot/embedded/mksnapshot.embedded-file-writer.o obj/deps/v8/src/snapshot/embedded/mksnapshot.platform-embedded-file-writer-aix.o obj/deps/v8/src/snapshot/embedded/mksnapshot.platform-embedded-file-writer-base.o obj/deps/v8/src/snapshot/embedded/mksnapshot.platform-embedded-file-writer-generic.o obj/deps/v8/src/snapshot/embedded/mksnapshot.platform-embedded-file-writer-mac.o obj/deps/v8/src/snapshot/embedded/mksnapshot.platform-embedded-file-writer-win.o obj/deps/v8/src/snapshot/mksnapshot.mksnapshot.o obj/deps/v8/src/snapshot/mksnapshot.snapshot-empty.o obj/deps/v8/src/snapshot/mksnapshot.static-roots-gen.o obj/tools/v8_gypfiles/libv8_base_without_compiler.a obj/tools/v8_gypfiles/libv8_init.a obj/tools/v8_gypfiles/libv8_libbase.a obj/tools/v8_gypfiles/libv8_libplatform.a obj/tools/v8_gypfiles/libv8_turboshaft.a obj/tools/v8_gypfiles/libv8_abseil.a obj/tools/v8_gypfiles/libv8_zlib.a obj/tools/v8_gypfiles/libv8_compiler.a obj/tools/v8_gypfiles/libv8_initializers.a obj/tools/v8_gypfiles/libv8_initializers_slow.a  -lz -luv -lbrotlidec -lbrotlienc -lcares -lnghttp2 -lcrypto -lssl -licui18n -licuuc -licudata -ldl -lrt -Wl,--end-group
ld: error: undefined symbol: v8::internal::trap_handler::TryHandleSignal(int, siginfo_t*, void*)
>>> referenced by api.cc:6403 (../../deps/v8/src/api/api.cc:6403)
>>>               ../../deps/v8/src/api/v8_base_without_compiler.api.o:(v8::TryHandleWebAssemblyTrapPosix(int, siginfo_t*, void*)) in archive obj/tools/v8_gypfiles/libv8_base_without_compiler.a

ld: error: undefined symbol: v8::internal::trap_handler::RegisterDefaultTrapHandler()
>>> referenced by handler-outside.cc:260 (../../deps/v8/src/trap-handler/handler-outside.cc:260)
>>>               ../../deps/v8/src/trap-handler/v8_base_without_compiler.handler-outside.o:(v8::internal::trap_handler::EnableTrapHandler(bool)) in archive obj/tools/v8_gypfiles/libv8_base_without_compiler.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Additional information

This is because the v8.gyp was not updated correctly for riscv64 architecture despite it being added here: cfbf9e0#diff-c5f668a7e3a95bb9df5bc165514d324ad89421338302625d614ef5b11a74d18dR6016

I created a patch in our downstream that fixes this: chimera-linux/cports@a82c5ed

which resulted in node now building fine: https://build.chimera-linux.org/#/builders/1/builds/2090/steps/5/logs/pkg_contrib_nodejs_22_0_0-r0

the conditions in this patch probably aren't entirely correct, as it's a quick fix for our particular environment, i'm not 100% sure what an actual correct patch would be though.

@richardlau richardlau added the riscv64 Issues and PRs related to the riscv64 architecture. label Apr 24, 2024
@richardlau
Copy link
Member

cc @nodejs/platform-riscv64

@VoltrexKeyva VoltrexKeyva added the build Issues and PRs related to build files or the CI. label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. riscv64 Issues and PRs related to the riscv64 architecture.
Projects
None yet
Development

No branches or pull requests

3 participants