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:
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:
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~
- Lookuperror: unknown encoding: cp65001 when executing Python
- onnx-tensorrt/builtin_op_importers.cpp:766:12: error: ‘class nvinfer1::IDeconvolutionLayer’ has no m
- Solution to electron error “cannot find module app”
- Stopping ADB server failed(code -1)
- Unknown error: cannot find chrome binary when running selenium under Linux
- Python packaged *. Exe is running os.popen (cmd)/ subprocess.Popen *. Exe crashes with invalid [winerror 6] handle
- pyvista error: root:GLEW could Missing GL version settlement method
- Solve the problem that the tray of electron system disappears automatically
- How to Fix Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
- Fatal Python error: initfsencoding: unable to load the file system codec
- Microsoft.CppCommon.targets (132,5): how to solve error msb3073?
- The Java command could not find or load the main class
- Mobile app development: installation and configuration of react native
- Install Android SDK — stopping ADB server failed (code – 1)
- An error is reported when the electron Vue Vue component introduces the electron
- AS3.5 Error gradle project sync failed.Basic functionality(e.g.editing,debugging) will not work
- Idapython: the solution of importing “site” failed error
- Linux basic command execution error: the solution of command not found
- [solution] LD: warning: directory not found for option
- Windows git review reported an error. UnicodeDecodeError