Repository navigation
Node.js would not compile with --debug --v8-non-optimized-debug #38571
Copy link
Copy link
Closed
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
Description
- Version: master
- Platform: Ubuntu
- Subsystem: X64 or PPC64LE
What steps will reproduce the bug?
./configure --debug --v8-non-optimized-debug
make -j32
How often does it reproduce? Is there a required condition?
Consistently
What is the expected behavior?
compilation successful
What do you see instead?
Linker fail because a ton of undefined ref
eg.
/workdir/node/out/Debug/obj/gen/torque-generated/src/objects/fixed-array-tq-inl.inc:287: undefined reference to `v8::internal::IsFixedArrayBase_NonInline(v8::internal::HeapObject)'
/usr/bin/ld: /workdir/node/out/Debug/obj.target/mksnapshot/deps/v8/src/snapshot/embedded/embedded-file-writer.o: in function `v8::internal::TorqueGeneratedByteArray<v8::internal::ByteArray, v8::internal::FixedArrayBase>::TorqueGeneratedByteArray(unsigned long)':
/workdir/node/out/Debug/obj/gen/torque-generated/src/objects/fixed-array-tq-inl.inc:349: undefined reference to `v8::internal::IsByteArray_NonInline(v8::internal::HeapObject)'
/usr/bin/ld: /workdir/node/out/Debug/obj.target/v8_base_without_compiler/deps/v8/src/api/api.o: in function `v8::internal::TorqueGeneratedPrimitiveHeapObject<v8::internal::PrimitiveHeapObject, v8::internal::HeapObject>::TorqueGeneratedPrimitiveHeapObject(unsigned long)':
/workdir/node/out/Debug/obj/gen/torque-generated/src/objects/primitive-heap-object-tq-inl.inc:4: undefined reference to `v8::internal::IsPrimitiveHeapObject_NonInline(v8::internal::HeapObject)'
/usr/bin/ld: /workdir/node/out/Debug/obj.target/v8_base_without_compiler/deps/v8/src/api/api.o: in function `v8::internal::TorqueGeneratedHeapNumber<v8::internal::HeapNumber, v8::internal::PrimitiveHeapObject>::TorqueGeneratedHeapNumber(unsigned long)':
/workdir/node/out/Debug/obj/gen/torque-generated/src/objects/heap-number-tq-inl.inc:15: undefined reference to `v8::internal::IsHeapNumber_NonInline(v8::internal::HeapObject)'
/usr/bin/ld: /workdir/node/out/Debug/obj.target/v8_base_without_compiler/deps/v8/src/api/api.o: in function `v8::internal::TorqueGeneratedJSProxy<v8::internal::JSProxy, v8::internal::JSReceiver>::TorqueGeneratedJSProxy(unsigned long)':
Additional information
Some of the torque generated .cc are not being compiled to .o eg. fixed-array-tq.o. Therefore, at the linking step, definition are missing. I suspect either gpy is not working or the GN scraper is not working as expected. I also check the Release build, fixed-array-tq.o is also missing but for some reason it compiles OK. All the torque generated .cc file are compiled to .o by GN+ninja on standalone v8 compilation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to Node.js builds or CI infrastructure.Issues and PRs related to Node.js builds or CI infrastructure.
Activity
john-yan commentedon May 6, 2021
This is a potential solution. Any advice?
richardlau commentedon May 6, 2021
It does looks like the
torque_generated_definitionstarget in the gyp file is missing the equivalent ofnode/deps/v8/BUILD.gn
Lines 1618 to 1625 in e46c680
john-yan commentedon May 6, 2021
@richardlau my patch actually works (compilation successful) but I am not sure if that's the right thing to do.
richardlau commentedon May 6, 2021
@john-yan Yeah, sorry, I tried a fresh checkout and both patches work. I think adding the files is the right thing to do here, I'll open a PR.
richardlau commentedon May 6, 2021
PR: #38576
build: add missing torque output sources
john-yan commentedon May 7, 2021
Thanks @richardlau for helping out!
build: add missing torque output sources