Build Regression Issues

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.

Build Regression Issues

Postby Moonbase » Wed May 24, 2023 4:52 am

Hi

I've been building cef.sln using Visual Studio 2019 and have come across some regression issues.

In short 111 builds ok but 112 produces linker errors related to cef_sandbox.lib.

To be precise this one builds ok.
cef_binary_111.2.2+g1b83ff6+chromium-111.0.5563.65_windows64.tar.bz2

These (and others between them) do not.
cef_binary_112.3.0+gb09c4ca+chromium-112.0.5615.165_windows64.tar.bz2
cef_binary_114.0.4+gcbd0dfc+chromium-114.0.5735.9_windows64_beta.tar.bz2

The link errors are given below but ultimately it looks to me like perhaps some C++ stl changes were made in cefclient.lib which are out of kilter with the settings in cef.sln.

This is a starndard build using the current release of Visual Studio 2019 (16.11.26) with the most recent Windows SDKs (10.0.20358 & 10.0.22000.0).

The sln is made using "cmake -G "Visual Studio 16" -A x64 .." as per instructions.

The cmake output is essentially the same between 111 and 112 - I diffed it and there are two new Windows libs linked in but that's it.

Any thoughts?

All Best

Jos

4> Creating library ../build/tests/cefclient/Release/cefclient.lib and object ../build/tests/cefclient/Release/cefclient.exp
4>cef_sandbox.lib(string_piece.obj) : error LNK2019: unresolved external symbol __std_find_trivial_2 referenced in function "unsigned __int64 __cdecl base::internal::find_first_of(class base::BasicStringPiece<char16_t,struct std::char_traits<char16_t> >,class base::BasicStringPiece<char16_t,struct std::char_traits<char16_t> >,unsigned __int64)" (?find_first_of@internal@base@@YA_KV?$BasicStringPiece@_SU?$char_traits@_S@std@@@2@0_K@Z)
4>cef_sandbox.lib(registry.obj) : error LNK2001: unresolved external symbol __std_find_trivial_2
4>cef_sandbox.lib(thread_id_name_manager.obj) : error LNK2019: unresolved external symbol __std_find_trivial_8 referenced in function "public: void __cdecl base::ThreadIdNameManager::RemoveObserver(class base::ThreadIdNameManager::Observer *)" (?RemoveObserver@ThreadIdNameManager@base@@QEAAXPEAVObserver@12@@Z)
4>cef_sandbox.lib(field_trial.obj) : error LNK2001: unresolved external symbol __std_find_trivial_8
4>cef_sandbox.lib(sys_info_win.obj) : error LNK2019: unresolved external symbol __std_minmax_element_1 referenced in function "private: static int __cdecl base::SysInfo::NumberOfEfficientProcessorsImpl(void)" (?NumberOfEfficientProcessorsImpl@SysInfo@base@@CAHXZ)
4>cef_sandbox.lib(thread_group_impl.obj) : error LNK2019: unresolved external symbol __std_min_element_8 referenced in function "private: unsigned __int64 __cdecl base::internal::ThreadGroupImpl::GetDesiredNumAwakeWorkersLockRequired(void)const " (?GetDesiredNumAwakeWorkersLockRequired@ThreadGroupImpl@internal@base@@AEBA_KXZ)
Moonbase
Newbie
 
Posts: 5
Joined: Wed May 24, 2023 4:29 am

Re: Build Regression Issues

Postby magreenblatt » Wed May 24, 2023 5:18 am

std::find_first_of should be available in C++17 which is supported by VS2019. Are you building your application with /std:c++17 as required?
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Build Regression Issues

Postby Moonbase » Thu May 25, 2023 5:38 am

The cmake creates a solution which is largely but not entirely C++ 17.

Notbly ALL_BUILD and ZERO_CHECK are C++ 14.

However I did try changing them to C++ 17 (in v113) and it did not make any difference - the link errors remained.
Moonbase
Newbie
 
Posts: 5
Joined: Wed May 24, 2023 4:29 am

Re: Build Regression Issues

Postby magreenblatt » Thu May 25, 2023 5:45 am

OK, thanks for testing. I suspect that this is a bug/issue with VS2019. All building/testing of Chromium and CEF is now done with VS2022, so you might want to upgrade to avoid this and any future issues.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Build Regression Issues

Postby Moonbase » Thu May 25, 2023 9:32 am

Matt

You are completely right. :-)

So essentially the build instruxctions in "CMakeLists.txt" are incorrect. They should reference Visual Studio 2022 rather than 2019 and the cmake Visual Studio version should be revved, So this...

# > cmake -G "Visual Studio 16" -A x64 ..

Becomes...

# > cmake -G "Visual Studio 17" -A x64 ..

I have tested from scratch using this and it all works fine with those changes.

MB
Moonbase
Newbie
 
Posts: 5
Joined: Wed May 24, 2023 4:29 am

Re: Build Regression Issues

Postby magreenblatt » Fri May 26, 2023 3:45 am

magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

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