chromiumembedded / cef

Chromium Embedded Framework (CEF). A simple framework for embedding Chromium-based browsers in other applications.
https://bitbucket.org/chromiumembedded/cef/
Other
3.41k stars 468 forks source link

Issue building cef_sandbox for CEF 114.2.1+gd70a0a8+chromium-114.0.5735.45 on Windows x64 #3519

Closed BdC62 closed 1 year ago

BdC62 commented 1 year ago

Since CEF 114, I'm having issues while attempting to build the cef_sandbox for CEF 114.2.1+gd70a0a8+chromium-114.0.5735.45 on Windows x64. The main "cefclient" build works fine but the sandbox part fails.

Using GN_DEFINES="is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome". And building with "--with-pgo-profiles". With VS2022 17.6.2 and Win 10.0.22621 SDK I get this result:

--> C:\CEF3\download5735\chromium\src\out\Release_GN_x64\args.gn contents:
alternate_cdm_storage_id_key="968b476909da4373b08903c28e859454"
clang_use_chrome_plugins=false
enable_background_mode=false
enable_basic_printing=true
enable_cdm_host_verification=true
enable_cdm_storage_id=true
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_rlz=true
enable_widevine=true
ffmpeg_branding="Chrome"
is_component_build=false
is_debug=false
is_official_build=true
optimize_webui=true
proprietary_codecs=true
target_cpu="x64"
use_perfetto_client_library=false
v8_enable_sandbox=false
-------- Running "ninja -C out\Release_GN_x64 cefclient" in "C:\CEF3\download5735\chromium\src"...
ninja: Entering directory `out\Release_GN_x64'
[57427/57427] LINK cefclient.exe cefclient.exe.pdb
--> C:\CEF3\download5735\chromium\src\out\Release_GN_x64_sandbox\args.gn contents:
alternate_cdm_storage_id_key="968b476909da4373b08903c28e859454"
clang_use_chrome_plugins=false
dcheck_always_on=false
enable_background_mode=false
enable_backup_ref_ptr_support=false
enable_base_tracing=false
enable_basic_printing=true
enable_cdm_host_verification=true
enable_cdm_storage_id=true
enable_nacl=false
enable_print_preview=true
enable_resource_allowlist_generation=false
enable_rlz=true
enable_widevine=true
ffmpeg_branding="Chrome"
forbid_non_component_debug_builds=false
is_cef_sandbox_build=true
is_component_build=false
is_debug=false
is_official_build=false
optimize_webui=true
proprietary_codecs=true
target_cpu="x64"
use_allocator_shim=false
use_custom_libcxx=false
use_partition_alloc=false
use_partition_alloc_as_malloc=false
use_perfetto_client_library=false
v8_enable_sandbox=false
-------- Running "ninja -C out\Release_GN_x64_sandbox cef_sandbox" in "C:\CEF3\download5735\chromium\src"...
ninja: Entering directory `out\Release_GN_x64_sandbox'
[595/868] CXX obj/base/base/registry.obj
FAILED: obj/base/base/registry.obj
..\..\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe /c ../../base/win/registry.cc /Foobj/base/base/registry.obj /nologo /showIncludes:user "-imsvc../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include" "-imsvc../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/ATLMFC/include" "-imsvc../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/VS/include" "-imsvc../../../../../../Program Files (x86)/Windows Kits/10/include/10.0.22621.0/ucrt" "-imsvc../../../../../../Program Files (x86)/Windows Kits/10/include/10.0.22621.0/um" "-imsvc../../../../../../Program Files (x86)/Windows Kits/10/include/10.0.22621.0/shared" "-imsvc../../../../../../Program Files (x86)/Windows Kits/10/include/10.0.22621.0/winrt" "-imsvc../../../../../../Program Files (x86)/Windows Kits/10/include/10.0.22621.0/cppwinrt" "-imsvc../../../../../../Program Files (x86)/Windows Kits/NETFXSDK/4.8/include/um" -DBASE_IMPLEMENTATION -DIS_RAW_PTR_IMPL -D_ENABLE_ATOMIC_ALIGNMENT_FIX -DUSE_AURA=1 -D_HAS_NODISCARD -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS "-DCR_CLANG_REVISION=\"llvmorg-17-init-8029-g27f27d15-3\"" -D_HAS_EXCEPTIONS=0 -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_NI -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBUILDING_CEF_SHARED -DUSING_CHROMIUM_INCLUDES -I../.. -Igen -I../../cef -Iincludes -I../../third_party/abseil-cpp /W4 -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety /WX -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wno-nonportable-include-path -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture -Wshadow -fno-delete-null-pointer-checks -fno-ident -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 /clang:-ffp-contract=off -fcomplete-member-pointers /Gy /FS /bigobj /utf-8 /Zc:twoPhase -ffile-reproducible /Zc:sizedDealloc- /D__WRL_ENABLE_FUNCTION_STATICS__ -fmsc-version=1916 -m64 -msse3 /Brepro -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern /Z7 -gno-codeview-command-line -gcodeview-ghash -Xclang -fuse-ctor-homing /guard:cf /MT -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare /FIbuild/precompile.h -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare -Wexit-time-destructors -Wglobal-constructors /O2 /Ob2 /Oy- /Zc:inline /Gw /Fpobj/base/base_cc.pch /Yubuild/precompile.h /std:c++20 -Wno-trigraphs /TP /GR- /Fd"obj/base/base_cc.pdb"
In file included from ../../base/win/registry.cc:17:
In file included from ../..\base/containers/fixed_flat_map.h:13:
In file included from ../..\base/containers/flat_map.h:14:
../..\base/containers/flat_tree.h(724,10): error: no viable conversion from returned value of type 'decltype(internal::begin(std::forward<const std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10> &>(range), internal::priority_tag<2>()))' (aka 'const std::pair<const base::BasicStringPiece<char>, void **> *') to function return type 'const_iterator' (aka '_Array_const_iterator<std::pair<const base::BasicStringPiece<char, std::char_traits<char>>, void **>, 10ULL>')
  return ranges::begin(body_);
         ^~~~~~~~~~~~~~~~~~~~
../..\base/ranges/ranges.h(44,37): note: in instantiation of member function 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::begin' requested here
  return std::forward<Range>(range).begin();
                                    ^
../..\base/ranges/ranges.h(105,20): note: in instantiation of function template specialization 'base::internal::begin<const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>> &>' requested here
  return internal::begin(std::forward<Range>(range),
                   ^
../..\base/ranges/algorithm.h(736,40): note: in instantiation of function template specialization 'base::ranges::begin<const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>> &>' requested here
  return ranges::adjacent_find(ranges::begin(range), ranges::end(range),
                                       ^
../..\base/containers/flat_tree.h(40,18): note: in instantiation of function template specialization 'base::ranges::adjacent_find<const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>> &, base::internal::NotFnImpl<base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::value_compare>, base::identity, std::random_access_iterator_tag>' requested here
  return ranges::adjacent_find(range, base::not_fn(comp)) == ranges::end(range);
                 ^
../..\base/containers/flat_tree.h(644,10): note: in instantiation of function template specialization 'base::internal::is_sorted_and_unique<base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>, base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::value_compare>' requested here
  DCHECK(is_sorted_and_unique(*this, value_comp()));
         ^
../..\base/containers/fixed_flat_map.h(108,10): note: in instantiation of member function 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::flat_tree' requested here
  return FixedFlatMap(
         ^
../../base/win/registry.cc(302,15): note: in instantiation of function template specialization 'base::MakeFixedFlatMapSorted<base::BasicStringPiece<char>, void **, 10ULL, std::less<void>>' requested here
        base::MakeFixedFlatMapSorted<base::StringPiece, void**>({
              ^
../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include\array(29,7): note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'decltype(internal::begin(std::forward<const std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10> &>(range), internal::priority_tag<2>()))' (aka 'const std::pair<const base::BasicStringPiece<char>, void **> *') to 'const _Array_const_iterator<pair<const BasicStringPiece<char>, void **>, 10> &' for 1st argument
class _Array_const_iterator
      ^
../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include\array(29,7): note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'decltype(internal::begin(std::forward<const std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10> &>(range), internal::priority_tag<2>()))' (aka 'const std::pair<const base::BasicStringPiece<char>, void **> *') to '_Array_const_iterator<pair<const BasicStringPiece<char>, void **>, 10> &&' for 1st argument
../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include\array(49,27): note: explicit constructor is not a candidate
    _CONSTEXPR17 explicit _Array_const_iterator(pointer _Parg, size_t _Off = 0) noexcept : _Ptr(_Parg + _Off) {}
                          ^
In file included from ../../base/win/registry.cc:17:
In file included from ../..\base/containers/fixed_flat_map.h:13:
In file included from ../..\base/containers/flat_map.h:14:
../..\base/containers/flat_tree.h(741,10): error: no viable conversion from returned value of type 'decltype(internal::end(std::forward<const std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10> &>(range), internal::priority_tag<2>()))' (aka 'const std::pair<const base::BasicStringPiece<char>, void **> *') to function return type 'const_iterator' (aka '_Array_const_iterator<std::pair<const base::BasicStringPiece<char, std::char_traits<char>>, void **>, 10ULL>')
  return ranges::end(body_);
         ^~~~~~~~~~~~~~~~~~
../..\base/ranges/ranges.h(79,37): note: in instantiation of member function 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::end' requested here
  return std::forward<Range>(range).end();
                                    ^
../..\base/ranges/ranges.h(121,20): note: in instantiation of function template specialization 'base::internal::end<const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>> &>' requested here
  return internal::end(std::forward<Range>(range), internal::priority_tag<2>());
                   ^
../..\base/ranges/algorithm.h(736,62): note: in instantiation of function template specialization 'base::ranges::end<const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>> &>' requested here
  return ranges::adjacent_find(ranges::begin(range), ranges::end(range),
                                                             ^
../..\base/containers/flat_tree.h(40,18): note: in instantiation of function template specialization 'base::ranges::adjacent_find<const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>> &, base::internal::NotFnImpl<base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::value_compare>, base::identity, std::random_access_iterator_tag>' requested here
  return ranges::adjacent_find(range, base::not_fn(comp)) == ranges::end(range);
                 ^
../..\base/containers/flat_tree.h(644,10): note: in instantiation of function template specialization 'base::internal::is_sorted_and_unique<base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>, base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::value_compare>' requested here
  DCHECK(is_sorted_and_unique(*this, value_comp()));
         ^
../..\base/containers/fixed_flat_map.h(108,10): note: in instantiation of member function 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::flat_tree' requested here
  return FixedFlatMap(
         ^
../../base/win/registry.cc(302,15): note: in instantiation of function template specialization 'base::MakeFixedFlatMapSorted<base::BasicStringPiece<char>, void **, 10ULL, std::less<void>>' requested here
        base::MakeFixedFlatMapSorted<base::StringPiece, void**>({
              ^
../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include\array(29,7): note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'decltype(internal::end(std::forward<const std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10> &>(range), internal::priority_tag<2>()))' (aka 'const std::pair<const base::BasicStringPiece<char>, void **> *') to 'const _Array_const_iterator<pair<const BasicStringPiece<char>, void **>, 10> &' for 1st argument
class _Array_const_iterator
      ^
../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include\array(29,7): note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'decltype(internal::end(std::forward<const std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10> &>(range), internal::priority_tag<2>()))' (aka 'const std::pair<const base::BasicStringPiece<char>, void **> *') to '_Array_const_iterator<pair<const BasicStringPiece<char>, void **>, 10> &&' for 1st argument
../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.36.32532/include\array(49,27): note: explicit constructor is not a candidate
    _CONSTEXPR17 explicit _Array_const_iterator(pointer _Parg, size_t _Off = 0) noexcept : _Ptr(_Parg + _Off) {}
                          ^
../../base/win/registry.cc(317,11): error: variable 'entry' with type 'auto *' has incompatible initializer of type 'const_iterator' (aka '_Array_const_iterator<std::pair<const base::BasicStringPiece<char, std::char_traits<char>>, void **>, 10ULL>')
    auto* entry = kMap.find(name);
          ^       ~~~~~~~~~~~~~~~
../../base/win/registry.cc(318,18): error: 'this' argument to member function 'end' has type 'const fixed_flat_map<BasicStringPiece<char, char_traits<char>>, void **, 10ULL, less<void>>' (aka 'const flat_map<base::BasicStringPiece<char, std::char_traits<char>>, void **, std::less<void>, std::array<std::pair<const BasicStringPiece<char, char_traits<char>>, void **>, 10ULL>>'), but function is not marked const
    if (entry == kMap.end()) {
                 ^~~~
../..\base/containers/flat_tree.h(279,12): note: 'end' declared here
  iterator end();
           ^
../..\base/containers/flat_tree.h(1002,48): error: 'this' argument to member function 'end' has type 'const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>', but function is not marked const
  return (eq_range.first == eq_range.second) ? end() : eq_range.first;
                                               ^~~
../../base/win/registry.cc(317,24): note: in instantiation of function template specialization 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::find<const char *>' requested here
    auto* entry = kMap.find(name);
                       ^
../..\base/containers/flat_tree.h(279,12): note: 'end' declared here
  iterator end();
           ^
../..\base/containers/flat_tree.h(1054,16): error: 'this' argument to member function 'end' has type 'const base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>', but function is not marked const
  if (lower == end() || comp(key, *lower))
               ^~~
../..\base/containers/flat_tree.h(1001,19): note: in instantiation of function template specialization 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::equal_range<const char *>' requested here
  auto eq_range = equal_range(key);
                  ^
../../base/win/registry.cc(317,24): note: in instantiation of function template specialization 'base::internal::flat_tree<base::BasicStringPiece<char>, base::internal::GetFirst, std::less<void>, std::array<std::pair<const base::BasicStringPiece<char>, void **>, 10>>::find<const char *>' requested here
    auto* entry = kMap.find(name);
                       ^
../..\base/containers/flat_tree.h(279,12): note: 'end' declared here
  iterator end();
           ^
6 errors generated.
[620/868] CXX obj/base/base/win_util.obj
ninja: build stopped: subcommand failed.
magreenblatt commented 1 year ago

Thanks, we're aware of the issue and are working on a fix.

magreenblatt commented 1 year ago

One of the above errors is https://bugs.chromium.org/p/chromium/issues/detail?id=1311404, with related commentary at https://chromium-review.googlesource.com/c/chromium/src/+/4497048/9..12/base/win/registry.cc#b315. The other error is incorrect selection of begin()/end() specializations from ranges.h.