Thats extremely helpful, Ben! I'll defer to trying to compile 12.4.254
then, since the rest of my codebase is in c++17 anyway -- that would allow
me to keep things simpler. I'll report back (hopefully with a success) here
soon.

Cheers,
Alex

On Fri, Sep 20, 2024 at 2:52 PM Ben Noordhuis <i...@bnoordhuis.nl> wrote:

> There was no flag day event where everything was switched to C++20 _en
> masse_ so what minor/patch works with your compiler and stdlib may be
> hit or miss. The fact the compiler accepts -std=c++20 means it's at
> least aware of C++20 - but maybe not everything, and evidently the
> stdlib isn't fully conformant.
>
> If it helps, I know for sure that 12.4.254.21 builds fine in C++17
> mode because that's the version we (Node.js) currently ship in our
> v22.x release line.
>
> Some spelunking through the git history suggests 12.7 turned on C++20,
> in commit https://github.com/v8/v8/commit/f06f6d1a45fe
>
> On Fri, Sep 20, 2024 at 5:37 PM Alex Dovzhanyn <dovzhanyn.a...@gmail.com>
> wrote:
> >
> > Thanks so much for the response, Ben!
> >
> > I think that may be the issue -- I'm trying to compile 13.0 and am
> trying to build with apple clang c++20, and it's just continually tripping
> up on itself. It seems that apple clang doesn't support enable_view.
> >
> > I've since switched to trying to build 12.9 but I think I was still
> trying to build with c++20. Is there a way to specify within gn.args that
> c++17 should be used? I couldn't find a relevant flag in the list of
> available flags. Unless 12.9 is indeed c++20? I'm seeing -std=c++20 being
> passed in as an argument during the build (and I'm not passing it myself,
> so I'm guessing its coming from ninja or somewhere else in v8).
> >
> > Apologies for any ignorance on my part -- I've only recently started
> working with c++ so I'm not deeply familiar with the tooling.
> >
> > Cheers,
> > Alex
> >
> > On Friday, September 20, 2024 at 4:53:30 AM UTC-4 Ben Noordhuis wrote:
> >>
> >> On Thu, Sep 19, 2024 at 9:15 PM Alex Dovzhanyn <dovzhan...@gmail.com>
> wrote:
> >> >
> >> > Hey all, I'm trying to follow the steps listed here in the V8 docs to
> build V8 on OSX.
> >> >
> >> > gn args out.gn/x64.release.sample
> >> > shows the generated arguments as:
> >> >
> >> > is_component_build = false
> >> > is_debug = false
> >> > target_cpu = "x64"
> >> > use_custom_libcxx = false
> >> > v8_monolithic = true
> >> > v8_use_external_startup_data = false
> >> >
> >> > However, when I run ninja -C out.gn/x64.release.sample v8_monolith
> >> > the build runs about halfway but ultimately fails with the following
> error:
> >> >
> >> > In file included from ../../src/codegen/external-reference-table.h:8:
> ../../include/v8-memory-span.h:44:36: error: no member named 'enable_view'
> in namespace 'std::ranges' 44 | inline constexpr bool
> std::ranges::enable_view<v8::MemorySpan<T>> = true; | ~~~~~~~~~~~~~^
> ../../include/v8-memory-span.h:44:47: error: expected ';' after top level
> declarator 44 | inline constexpr bool
> std::ranges::enable_view<v8::MemorySpan<T>> = true; | ^ | ; In file
> included from ../../src/codegen/external-reference-table.cc:5: In file
> included from ../../src/codegen/external-reference-table.h:9: In file
> included from ../../src/builtins/accessors.h:9: In file included from
> ../../src/base/bit-field.h:12: In file included from
> ../../src/base/macros.h:13: In file included from
> ../../src/base/logging.h:11: In file included from
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/sstream:184:
> In file included from
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/istream:163:
> In file included from
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/ostream:137:
> In file included from
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/bitset:122:
> In file included from
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string:532:
> In file included from
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/string_view:191:
> ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include/c++/v1/__ranges/enable_view.h:32:23:
> error: redefinition of 'enable_view' 32 | inline constexpr bool enable_view
> = derived_from<_Tp, view_base>; | ^ ../../include/v8-memory-span.h:44:36:
> note: previous definition is here 44 | inline constexpr bool
> std::ranges::enable_view<v8::MemorySpan<T>> = true; | ^ 3 errors generated.
> >> >
> >> > I am building on OSX 12.5 with Xcode 13.4 installed -- using Apple
> clang version 13.1.6 (clang-1316.0.21.2.5).
> >> >
> >> > Any help would be very greatly appreciated!
> >>
> >> For building 13.0 or the main branch a C++20-capable compiler and
> >> standard library are required; enable_view is a C++20-ism. Your
> >> options are:
> >>
> >> 1. Set use_custom_libcxx=true and use the bundled libc++ (assuming
> >> Xcode can handle C++20; I don't know)
> >>
> >> 2. Build an older version. I believe 12.9 is still C++17.
> >
> > --
> > --
> > v8-users mailing list
> > v8-users@googlegroups.com
> > http://groups.google.com/group/v8-users
> > ---
> > You received this message because you are subscribed to the Google
> Groups "v8-users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to v8-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-users/3b58ea5f-acfb-4440-abe5-f2571f060d1en%40googlegroups.com
> .
>
> --
> --
> v8-users mailing list
> v8-users@googlegroups.com
> http://groups.google.com/group/v8-users
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "v8-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/v8-users/E8YcXnlV1w0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> v8-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/v8-users/CAHQurc_C1_Xop-5kzErWNwQZ-_BWa_gxaXok8pD_e36ZQ_Kjyw%40mail.gmail.com
> .
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAPAcDL9AQB-zazAjudOsHU4WOXLActo4Amv6%3DjKRqozAPh-PaQ%40mail.gmail.com.

Reply via email to