I haven’t compiled a new version of CEF for a long time. Recently, chrome mentioned that there is a 23% performance improvement in version 91 https://blog.chromium.org/2021/05/chrome-is-faster-in-m91.html Is there such a big improvement?So I want to have a try. As a matter of course, I used my own script to compile. As a result, I encountered a “wonderful” problem. Here is a brief record.
When compiling CEF 4472 (chromium 91) with auto git.py, an error is suddenly reported after the script finishes executing CEF patch apply
Generating CEF project files...
Creating D:\google\cef_new\chromium\src\out\Debug_GN_x86 directory.
ERROR at //.gn:65:20: Assignment had no effect.
no_check_targets = [
^
You set the variable "no_check_targets" here and it was unused before it went
out of scope.
Traceback (most recent call last):
File "D:\google\cef_new\chromium\src\cef\tools\gclient_hook.py", line 146, in <module>
RunAction(src_dir, cmd)
File "D:\google\cef_new\chromium\src\cef\tools\gclient_util.py", line 35, in RunAction
gclient_utils.CheckCallAndFilter(
File "D:\google\cef_new\depot_tools\gclient_utils.py", line 673, in CheckCallAndFilter
raise subprocess2.CalledProcessError(
subprocess2.CalledProcessError: Command 'gn gen out\\Debug_GN_x86 --ide=vs2019 --sln=cef --filters=//cef/*' returned non-zero exit status 1 in D:\google\cef_new\chromium\src
Traceback (most recent call last):
File "D:\google\cef_new\automate-git.py", line 1462, in <module>
run('%s %s' % (python_exe, tool), cef_src_dir, depot_tools_dir)
File "D:\google\cef_new\automate-git.py", line 69, in run
return subprocess.check_call(
File "C:\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['D:\\google\\cef_new\\depot_tools\\python3.bat', 'D:\\google\\cef_new\\chromium\\src\\cef\\tools\\gclient_hook.py']' returned non-zero exit status 1.
No is defined in chromium. Src. GN_ check_ Targets, but not used. At first, I thought it was my own depot_ Tools version is wrong (I have many depots on my machine_ Tools), and then switch the various branches, commit or not. So, it’s better to add some logs in the python script to see what’s going on.
Through the above error prompt, an error is reported when executing GN Gen
, and then through reading CEF/tools/gclient_ hook.py、gclient_ Util.py, to Depot_ In this file, the main function looks for the GN executable file in these two locations:
gclient_ paths.GetPrimarySolutionPath()gclient_ paths.GetBuildtoolsPlatformBinaryPath()
I made up these two paths in gn.py. The first result is:
D:\google\cef_new\chromium\src\third_party\gn\gn.exe
Take a look, third_ There is no GN or gn.exe under Party, so we will use the second method to get the path. The second result is:
D:\Electron\electron\src\buildtools\win\gn.exe
Hey, hey, hey?How did you get under electron?So that's the problem.
The next troubleshooting is relatively simple. Check the implementation of getbuildtools platform binarypath (located in depot)_ Gclient in tools folder_ Paths. Py), the original path is controlled by an environment variable chromium_ BUILDTOOLS_ Path
(see function getbuildtoolspath
), and then check the windows system environment variables. I really don't know when there is such an environment variable. I can't remember. Was it manually added when I compiled the electron source code a few months ago
up to now, we have finally come to the conclusion that we have deleted chromium_ BUILDTOOLS_ Path, recompile. Under normal circumstances, the GN to be used should be located under - chromium - SRC - buildtools - win \
. All right, call it a day~
Read More:
- Unity “Feature `out variable declaration’ cannot be used because it is not part of the C# 4.0” error
- “ XX.app ”It is damaged and cannot be opened. You should move it to the wastebasket.
- quill Cannot import ImageResize. Are you sure it was registered?
- Can’t find Python executable “D:\python3\python.exe”, you can set the PYTHON env variable.
- It is invalid to submit the content directly after pasting it on the mobile terminal of Vue HTML5 editor
- Add a new springboot, and it will appear unable to read meta data for class when it is dependent
- When a system is deployed on weblogic12.2.1.3, it reports an error “IllegalStateException zip file closed”. When it is deployed on weblogic12.2.1.2, it does not report an error and can be accessed normally.
- ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
- It will appear as soon as it is turned on BTServer.exe -Application error (0xc0150002)
- A solution to automatically convert special characters into Unicode when taking out data from MySQL and encapsulating it into JSON
- JS Mobile Page to determine whether it is iPhone X, and then set the corresponding height of the element?
- The spring boot project was first created, pom.xml The error is Maven configuration problem. How to solve it?
- An error was reported on the command line of Vue when it first wrote a small project: expected indentation of 4 spaces but found 6
- Inline JavaScript is not enabled. Is it set in your options?
- When installing software in Ubuntu, it prompts: E: You don’t have enough free space in /var/cache/apt/archives/.
- Global variable error: unboundlocalerror: local variable ‘l’ referenced before assignment
- TIDB-kafka server: Message was too large, server rejected it to avoid allocation error
- How to set the custom blood bar UI in UE4 and how to call it
- Set path environment variable through cmd
- Arduino ide 1.6.9 problems encountered error:’TKD2′ was not declared in this scope