Skip to content

build: fix `--enable-d8` builds

Rodrigo Muino Tomonari requested to merge github/fork/richardlau/enable_d8 into main

Add v8_abseil as a dependency for d8 and use scraping to pick up the list of source files (including the previously missing src/d8/d8-test.cc).


Fixes these errors with configure --enable-d8:

  • Missing abseil:
In file included from ../deps/v8/src/objects/source-text-module.h:11,
                 from ../deps/v8/src/api/api.h:27,
                 from ../deps/v8/src/api/api-inl.h:9,
                 from ../deps/v8/src/d8/async-hooks-wrapper.cc:11:
../deps/v8/src/zone/zone-containers.h:20:10: fatal error: absl/container/flat_hash_map.h: No such file or directory
   20 | #include "absl/container/flat_hash_map.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from ../deps/v8/src/objects/source-text-module.h:11,
                 from ../deps/v8/src/api/api.h:27,
                 from ../deps/v8/src/handles/persistent-handles.h:11,
                 from ../deps/v8/src/heap/local-heap.h:19,
                 from ../deps/v8/src/handles/local-handles.h:12,
                 from ../deps/v8/src/execution/local-isolate.h:12,
                 from ../deps/v8/src/heap/parked-scope.h:11,
                 from ../deps/v8/src/d8/d8.h:25,
                 from ../deps/v8/src/d8/d8-js.cc:5:
  • Missing src/d8/d8-test.cc:
/usr/bin/ld: /home/rlau/sandbox/github/node/out/Release/obj.target/d8/deps/v8/src/d8/d8.o: in function `v8::Shell::CreateD8Template(v8::Isolate*)':
d8.cc:(.text._ZN2v85Shell16CreateD8TemplateEPNS_7IsolateE+0x771): undefined reference to `v8::Shell::CreateTestFastCApiTemplate(v8::Isolate*)'
/usr/bin/ld: d8.cc:(.text._ZN2v85Shell16CreateD8TemplateEPNS_7IsolateE+0x7ac): undefined reference to `v8::Shell::CreateLeafInterfaceTypeTemplate(v8::Isolate*)'
collect2: error: ld returned 1 exit status
make[1]: *** [tools/v8_gypfiles/d8.target.mk:241: /home/rlau/sandbox/github/node/out/Release/d8] Error 1
rm 1df062be45bc7f08255553ef0a19173666eeeef3.intermediate 5af4453f25c9ba66fc65f2b3f6e297922691ce11.intermediate b5964469a6c8ef0a595bcc6dcadd3ff98ad24c40.intermediate
make: *** [Makefile:137: node] Error 2

Merge request reports

Loading