node icon indicating copy to clipboard operation
node copied to clipboard

build: fix `--enable-d8` builds

Open richardlau opened this issue 1 year ago • 6 comments

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

richardlau avatar May 22 '24 17:05 richardlau

Review requested:

  • [ ] @nodejs/gyp
  • [ ] @nodejs/v8-update

nodejs-github-bot avatar May 22 '24 17:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59357/

nodejs-github-bot avatar May 22 '24 18:05 nodejs-github-bot

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/5997/

nodejs-github-bot avatar May 22 '24 18:05 nodejs-github-bot

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-s390x,v8test=v8test/5997/

nodejs-github-bot avatar May 22 '24 18:05 nodejs-github-bot

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-ppc64le,v8test=v8test/5997/

nodejs-github-bot avatar May 22 '24 19:05 nodejs-github-bot

CI: https://ci.nodejs.org/job/node-test-pull-request/59359/

nodejs-github-bot avatar May 22 '24 21:05 nodejs-github-bot

Landed in bc13f23f7e25d750df9b0a7bfe891a3d69f995f3

nodejs-github-bot avatar May 24 '24 17:05 nodejs-github-bot