ERROR LNK2038 with custom build if compile app with sandbox

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.

ERROR LNK2038 with custom build if compile app with sandbox

Postby jakaw » Tue Jan 29, 2019 12:52 pm

I follow the instructions to build CEF with proprietary codecs suport. My update.bat file is:

Code: Select all
set GN_DEFINES=use_jumbo_build=true is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=c:\code\chromium_git --depot-tools-dir=c:\code\depot_tools --client-distrib --force-build


No errors shows up when execute the update.bat

Building using VS 2017 version 15.8.9 and the CEF version used is 3.3665.1878.g778ee5c

If I try compile with sandbox enabled I get:

Code: Select all
cef_sandbox.lib(*) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in myproject.obj


I woud like to keep sandbox ON for security reasons, but I only can compile my application if sandbox is off.

I realized that cef_sandbox.lib is too small in comparison with file present in http://opensource.spotify.com/cefbuilds/index.html

My custom build has cef_sandbox.lib with ~93Mb and the automated has ~206Mb for Debug. For Release my cef_sandbox.lib has ~44Mb and automated distr in internet has ~74Mb

I dont know what I'm doing wrong.
jakaw
Mentor
 
Posts: 64
Joined: Thu Mar 21, 2013 1:18 pm

Re: ERROR LNK2038 with custom build if compile app with sand

Postby ndesktop » Tue Jan 29, 2019 2:33 pm

Looks like a mix debug/release and/or MT/MD. I remember the message, only not in which case.
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am

Re: ERROR LNK2038 with custom build if compile app with sand

Postby jakaw » Tue Jan 29, 2019 2:45 pm

ndesktop wrote:Looks like a mix debug/release and/or MT/MD. I remember the message, only not in which case.


Yes, maybe. But I didn't change nothing in solution or projects. Just build and compile.
jakaw
Mentor
 
Posts: 64
Joined: Thu Mar 21, 2013 1:18 pm

Re: ERROR LNK2038 with custom build if compile app with sand

Postby magreenblatt » Tue Jan 29, 2019 3:57 pm

Are you creating a binary distribution from your build, and generating project files using CMake? Does cefclient build successfully using that binary distribution with sandbox enabled?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: ERROR LNK2038 with custom build if compile app with sand

Postby jakaw » Tue Jan 29, 2019 4:47 pm

magreenblatt wrote:Are you creating a binary distribution from your build, and generating project files using CMake?

Yes, I'm creating a binary distribution from my build and generating projects with CMake.

magreenblatt wrote: Does cefclient build successfully using that binary distribution with sandbox enabled?

No, cefclient doesn't build successfully, it shows same error:

Code: Select all
cef_sandbox.lib(*.obj) : error LNK2038:mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in binding_test.obj
jakaw
Mentor
 
Posts: 64
Joined: Thu Mar 21, 2013 1:18 pm

Re: ERROR LNK2038 with custom build if compile app with sand

Postby magreenblatt » Tue Jan 29, 2019 6:42 pm

It's possible that the CMake configuration needs to be updated for some build change in master. You might want to try a release branch instead.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: ERROR LNK2038 with custom build if compile app with sand

Postby jakaw » Fri May 31, 2019 8:55 am

magreenblatt wrote:It's possible that the CMake configuration needs to be updated for some build change in master. You might want to try a release branch instead.


I still having this problem.

Now I use the release branch 3626 and the cef_sandbox.lib has different size when I make a custom build with codecs enabled.

My custom build has:

Debug cef_sandbox.lib has ~99Mb
Release cef_sandbox.lib has ~44Mb

For distributable binary:
Debug cef_sandbox.lib has ~211Mb
Release cef_sandbox.lib has ~75Mb

My update.bat file has:
Code: Select all
set GN_DEFINES=use_jumbo_build=true is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2017 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=d:\code\chromium_git --depot-tools-dir=d:\code\depot_tools --client-distrib --force-build --branch=3626


No errors show during build.
jakaw
Mentor
 
Posts: 64
Joined: Thu Mar 21, 2013 1:18 pm


Return to Support Forum

Who is online

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