Help with Getting started with embedding V8

108 views
Skip to first unread message

Michel Araujo

unread,
Nov 15, 2023, 12:14:01 PM11/15/23
to v8-dev
Hi guys,
I'm trying to run the Getting started with embedding V8 - Hello World example and I got stuck with "ninja" command,
I made all previous steps but when I run (step 4 in https://v8.dev/docs/embed):

ninja -C out.gn/x64.release.sample v8_monolith


I got this erros:

../../src/compiler/turboshaft/wasm-gc-type-reducer.cc:117:18: error: 'back_insert_iterator' may not intend to support class template argument deduction [-Werror,-Wctad-maybe-unsupported]
  117 |                  std::back_insert_iterator(snapshots), [this](Block* pred) {
      |                  ^
../../build/linux/debian_bullseye_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_iterator.h:596:11: note: add a deduction guide to suppress this warning
  596 |     class back_insert_iterator
      |           ^
1 error generated.


Someone can help me?

Matthias Liedtke

unread,
Nov 15, 2023, 1:15:02 PM11/15/23
to v8-...@googlegroups.com
Hi,
This seems to be an issue with the combination of GCC's standard library in combination with Clang as a compiler and the Warning -Wctad-maybe-unsupported enabled plus -Werror.

You should be able to solve this issue by:
A) Adding -stdlib=libc++ to your compiler invocation.
B) Compiling with GCC.
C) Not configuring warnings as errors.
D) Switching to a newer version of the source code. The code in question has already been removed in https://chromium-review.googlesource.com/c/v8/v8/+/4980266 (although just due to the algorithm being changed).

Best regards,
Matthias

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/66340f29-7445-414b-9776-e79a88fed7ean%40googlegroups.com.

Matthias Liedtke

unread,
Nov 15, 2023, 1:16:37 PM11/15/23
to v8-...@googlegroups.com
Just to clarify, either of the 4 options should solve the issue, no need to do all of them. :)

Michel Araujo

unread,
Nov 16, 2023, 5:03:17 PM11/16/23
to v8-dev
Great, worked!
I open the file "BUILD.gn" and remove flag "-Wctad-maybe-unsupported"

cflags += [ "-Wctad-maybe-unsupported" ]

Now I can build e run Hello World
Thanks for the Help!

Reply all
Reply to author
Forward
0 new messages