Building v119 (branch 6045) fails

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Building v119 (branch 6045) fails

Postby callum » Fri Nov 03, 2023 7:53 am

Code: Select all
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(64,26): error: no member named 'numeric_limits' in namespace 'std'

Windows build of branch 6045 for v119 fails with this error. Same system that builds v118 successfully (Win 11, VS2022 17.7.5, Win 10.0.22621 SDK).

I think the solution is to include <limits> in that source file (it's not present) but since I build from scratch each time, I'm unable to do this.

The Spotify builder-bot seems okay with it - what am I missing on my system ?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Building v119 (branch 6045) fails

Postby callum » Tue Nov 07, 2023 10:35 pm

I haven't seen any new commits to address (since May at least) this so I imagine that means it builds for other people.

I think my system is set up correctly and still builds version 118 - are other people not hitting this?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Building v119 (branch 6045) fails

Postby naoki5 » Wed Nov 08, 2023 1:18 am

viewtopic.php?f=6&t=19591

I am unable to build 5993 (v118) with the same error.
I have not tried the 6045 (v119) build yet.
I was thinking it might be a v118 issue, but if it builds in your environment, then it might be an issue with the environment in which the build is performed.
naoki5
Expert
 
Posts: 107
Joined: Wed Jul 17, 2019 2:44 am

Re: Building v119 (branch 6045) fails

Postby ndesktop » Wed Nov 08, 2023 1:59 am

Built both 118 and 119 with VS2019 and the same SDK. Maybe a repair installation of SDK?
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: Building v119 (branch 6045) fails

Postby callum » Wed Nov 08, 2023 7:51 am

Yeah, I thought maybe I needed a slightly newer version on the SDK so I uninstalled and reinstalled it.

One difference that might be relevant is that I’m building with media codecs turned on.

The build compiles the 61,500 or so source files and fails just after that so perhaps that’s where the media support is introduced. I’ll poke some more today.

Thanks both.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Building v119 (branch 6045) fails

Postby callum » Mon Nov 13, 2023 9:50 pm

Code: Select all
use_custom_libcxx=false
use_partition_alloc=false
use_partition_alloc_as_malloc=false
v8_enable_sandbox=false
-------- Running "ninja -C out\Release_GN_x64_sandbox cef_sandbox" in "C:\cef\6045_64\chromium_git\chromium\src"...
ninja: Entering directory `out\Release_GN_x64_sandbox'
[87/888] CXX obj/base/allocator/partition_allocator/allocator_base/cstring_builder.obj
FAILED: obj/base/allocator/partition_allocator/allocator_base/cstring_builder.obj
..\..\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe /c ../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc /Foobj/base/allocator/partition_allocator/allocator_base/cstring_builder.obj /nologo /showIncludes:user "-imsvc../../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/include" "-imsvc../../../../../../../Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/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" -DUSE_AURA=1 -D_HAS_NODISCARD -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS "-DCR_CLANG_REVISION=\"llvmorg-18-init-4631-gd50b56d1-1\"" -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 -DIS_PARTITION_ALLOC_IMPL -I../.. -Igen /W4 -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -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 /WX -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=1934 -m64 -msse3 -fansi-escape-codes /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 -Wexit-time-destructors /O2 /Ob2 /Oy- /Zc:inline /Gw /clang:-fno-math-errno /std:c++20 -Wno-trigraphs /TP /GR- /Fd"obj/base/allocator/partition_allocator/allocator_base_cc.pdb"
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(64,26): error: no member named 'numeric_limits' in namespace 'std'
   64 |   char buffer[Log10(std::numeric_limits<T>::max()) + 3];
      |                     ~~~~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(64,41): error: 'T' does not refer to a value
   64 |   char buffer[Log10(std::numeric_limits<T>::max()) + 3];
      |                                         ^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(58,20): note: declared here
   58 | template <typename T>
      |                    ^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(64,45): error: no member named 'max' in the global namespace
   64 |   char buffer[Log10(std::numeric_limits<T>::max()) + 3];
      |                                           ~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(162,47): error: no member named 'numeric_limits' in namespace 'std'
  162 |       PutNormalFloatingPoint(value > 0 ? std::numeric_limits<double>::min()
      |                                          ~~~~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(162,68): error: expected '(' for function-style cast or type construction
  162 |       PutNormalFloatingPoint(value > 0 ? std::numeric_limits<double>::min()
      |                                                              ~~~~~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(162,71): error: no member named 'min' in the global namespace
  162 |       PutNormalFloatingPoint(value > 0 ? std::numeric_limits<double>::min()
      |                                                                     ~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(163,48): error: no member named 'numeric_limits' in namespace 'std'
  163 |                                        : -std::numeric_limits<double>::min(),
      |                                           ~~~~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(163,69): error: expected '(' for function-style cast or type construction
  163 |                                        : -std::numeric_limits<double>::min(),
      |                                                               ~~~~~~^
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(163,72): error: no member named 'min' in the global namespace
  163 |                                        : -std::numeric_limits<double>::min(),
      |                                                                      ~~^
9 errors generated.
[108/888] ACTION //sandbox/win:set_appcontainer_acls(//build/toolchain/win:win_clang_x64)
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "..\automate\automate-git.py", line 1389, in <module>
    run(command + build_path + ' cef_sandbox', chromium_src_dir, depot_tools_dir,
  File "..\automate\automate-git.py", line 66, in run
    return subprocess.check_call(
  File "C:\cef\6045_64\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['ninja', '-C', 'out\\Release_GN_x64_sandbox', 'cef_sandbox']' returned non-zero exit status 1.
ERROR: building configuration {'configure': None, 'build': None, 'default': True, 'name': 'default'} returned 1
For more information: try re-running your command with --verbose or --debug


I had another look at this today and it fails right at the end when building cef_sandbox.lib.

We don't use this but I can't find a way to disable building it if automate-git.py is used - just some references to a CMake directive which we do not use.
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Building v119 (branch 6045) fails

Postby callum » Wed Nov 15, 2023 3:01 pm

Code: Select all
C:\cef\6045_64\chromium_git\chromium\src\base\allocator\partition_allocator\partition_alloc_base\strings>git diff cstring_builder.cc
diff --git a/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc
index 2643cda4c1e3e..f1d71446027f8 100644
--- a/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc
+++ b/base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc
@@ -14,6 +14,7 @@

 #include <cmath>
 #include <cstring>
+#include <limits>

 #if BUILDFLAG(PA_DCHECK_IS_ON)
 #include "base/allocator/partition_allocator/partition_alloc_base/check.h"


As expected, manually editing the source after a failed build and including <limits> in the offending source file allows cef_sandbox.lib to build but since our builds use automate-git.py, patching that file is not an option.

I have rechecked my system config several times and everything appears to match the official build requirements.

Any suggestions @magreenblatt ?
callum
Expert
 
Posts: 326
Joined: Mon Feb 23, 2015 6:19 pm

Re: Building v119 (branch 6045) fails

Postby finder2 » Thu Nov 16, 2023 7:15 am

callum wrote:
Code: Select all
../../base/allocator/partition_allocator/partition_alloc_base/strings/cstring_builder.cc(64,26): error: no member named 'numeric_limits' in namespace 'std'

Windows build of branch 6045 for v119 fails with this error. Same system that builds v118 successfully (Win 11, VS2022 17.7.5, Win 10.0.22621 SDK).

I think the solution is to include <limits> in that source file (it's not present) but since I build from scratch each time, I'm unable to do this.

The Spotify builder-bot seems okay with it - what am I missing on my system ?


I have the same error on building compiling out\Debug_GN_x86_sandbox.
Debug_GN_x86 was fine.

Guys, do you know how to turn off Sandbox and x64 versions building?
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Building v119 (branch 6045) fails

Postby finder2 » Fri Nov 17, 2023 2:44 pm

I found out that MSVC/14.37.32822 is not good for building the latest CEF. I compiled 2k files with 14.36.32532 by copying all files from 14.36.32532\include to 14.37.32822\include but then stopped it.
So, the problem is the latest MSVC 14.38.
Now im trying to rollback and find the working version of MSVC like 14.36 or something earlier.
I think that copying all files from 14.36.32532 to 14.37.32822 also may work.
finder2
Mentor
 
Posts: 51
Joined: Fri Jun 13, 2014 1:33 am

Re: Building v119 (branch 6045) fails

Postby magreenblatt » Fri Nov 17, 2023 4:39 pm

A fix for the partition_allocator error (add the necessary include) could also be submitted to Chromium.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Next

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 183 guests