[HELP!] Error when build Brave Browser on Windows

Hi, I am trying to build the Brave browser but I have an error with shared_ptr class on C++. I thought it is related to Visuatl Studio Windows 11 SDK but it was not resolved even I reinstalled the whole Visual Studio related items. Can someone help me witht this issue?

My Environment:

  • Windows 11 (x64)

Steps I’ve done:

Issue:
After I executed the build command,

> autoninja -C C:\src\out\Component brave -k 1 --offline
ninja: Entering directory `C:\src\out\Component'
[16/63181] CXX obj/third_party/angle/angle_image_util/AstcDecompressorNoOp.obj
FAILED: obj/third_party/angle/angle_image_util/AstcDecompressorNoOp.obj
C:\src\out\redirect_cc\redirect_cc ..\..\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe /c ../../third_party/angle/src/image_util/AstcDecompressorNoOp.cpp /Foobj/third_party/angle/angle_image_util/AstcDecompressorNoOp.obj /nologo /showIncludes "-imsvc../../../Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/include" "-imsvc../../../Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/ATLMFC/include" "-imsvc../../../Program Files/Microsoft Visual Studio/2022/Community/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" -DDCHECK_ALWAYS_ON=1 -DUSE_AURA=1 -D_HAS_NODISCARD -D_CRT_NONSTDC_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -D_LIBCPP_ENABLE_SAFE_MODE=1 "-DCR_CLANG_REVISION=\"llvmorg-18-init-4631-gd50b56d1-1\"" -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=7cf98622abaf832e2d4784889ebc69d5b6fde4d8 -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 -DANGLE_ASSERT_ALWAYS_ON -DANGLE_VMA_VERSION=2003000 -DANGLE_IS_WIN -DANGLE_DEBUG_LAYERS_ENABLED -DANGLE_OUTSIDE_WEBKIT -DANGLE_DELEGATE_WORKERS=1 -DANGLE_USE_ABSEIL -DABSL_ALLOCATOR_NOTHROW=1 -DABSL_CONSUME_DLL -I../../brave/chromium_src -I../../buildtools/third_party/libc++ -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/common/base -I../../third_party/angle/src/common/third_party/xxhash -I../../third_party/abseil-cpp -Xclang -fexperimental-max-bitint-width=256 -I../../.. /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 /Zc:dllexportInlines- -m64 -msse3 -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern /O1 /Ob2 /Oy- /Zc:inline /Gw /clang:-fno-math-errno /Oi /Z7 -gno-codeview-command-line -gcodeview-ghash -Xclang -fuse-ctor-homing /guard:cf /MD -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors /we4244 /we4312 /we4456 /we4458 /we4715 /we4800 /we4838 -Wbad-function-cast -Wconditional-uninitialized -Wextra-semi-stmt -Wfloat-conversion -Winconsistent-missing-destructor-override -Wmissing-field-initializers -Wnewline-eof -Wnon-virtual-dtor -Wredundant-parens -Wreturn-std-move -Wshadow -Wshadow-field -Wtautological-type-limit-compare -Wundefined-reinterpret-cast -Wunneeded-internal-declaration -Wunused-but-set-variable -Wsuggest-destructor-override -Wsuggest-override -Wparentheses -Wrange-loop-analysis -Wstrict-prototypes -Wunreachable-code-aggressive -Wshorten-64-to-32 /std:c++20 -Wno-trigraphs /TP /GR- -I../../third_party/libc++/src/include /Fd"obj/third_party/angle/angle_image_util_cc.pdb"
In file included from ../../third_party/angle/src/image_util/AstcDecompressorNoOp.cpp:9:
../../third_party/angle/src\image_util/AstcDecompressor.h(49,37): error: no template named 'shared_ptr' in namespace 'std'
   49 |     virtual int32_t decompress(std::shared_ptr<WorkerThreadPool> singleThreadPool,
      |                                ~~~~~^
../../third_party/angle/src\image_util/AstcDecompressor.h(50,37): error: no template named 'shared_ptr' in namespace 'std'
   50 |                                std::shared_ptr<WorkerThreadPool> multiThreadPool,
      |                                ~~~~~^
../../third_party/angle/src/image_util/AstcDecompressorNoOp.cpp(22,29): error: no template named 'shared_ptr' in namespace 'std'
   22 |     int32_t decompress(std::shared_ptr<WorkerThreadPool> singleThreadPool,
      |                        ~~~~~^
../../third_party/angle/src/image_util/AstcDecompressorNoOp.cpp(23,29): error: no template named 'shared_ptr' in namespace 'std'
   23 |                        std::shared_ptr<WorkerThreadPool> multiThreadPool,
      |                        ~~~~~^
../../third_party/angle/src/image_util/AstcDecompressorNoOp.cpp(45,49): error: allocating an object of abstract class type 'AstcDecompressorNoOp'   45 |     static AstcDecompressorNoOp *instance = new AstcDecompressorNoOp();
      |                                                 ^
../../third_party/angle/src\image_util/AstcDecompressor.h(49,21): note: unimplemented pure virtual method 'decompress' in 'AstcDecompressorNoOp'
   49 |     virtual int32_t decompress(std::shared_ptr<WorkerThreadPool> singleThreadPool,
      |                     ^
5 errors generated.

Anyone can help me to rseolve the issue? I am stuck with this build phase for 3 days…

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.