Hi,
In our case we are always using the system Python.
We don't have a main depot_tools on our systems, and only use a very limited set of the third_party module's scripts (essentially CIPD and a heavily customized gclient, since we generally use git submodules)
As I recall we had issues with at least some of the bootstrapped tools, so we are avoiding them after getting burned, and additionally, we have our own versions of several tools in the depot_tools, so we definitely don't want depot_tools at the front of the path.
On 30 June, 2023 17:23:02 (-04:00), Christian Biesinger wrote:
> If that's the case, it could probably be fixed by ensuring that
> depot_tools is first in the path (like the build instructions say)?
>
> Christian
>
> On Fri, Jun 30, 2023 at 5:21 PM yngve via Chromium-dev
> wrote:
> >
> > Hi,
> >
> > It sounds like you are using Python 3.11.2 or newer.
> >
> > That version of Python cannot be used with Chromium's mojom scripts until
https://crbug.com/1422178 (which I reported 4 months ago) has been fixed.
> >
> > I recommend that you revert to 3.11.1 or older.
> >
> > The cause of the problem is a change to how relative paths are handled, and some mojom file paths are on the form //foo, which are considered UNC paths by the newer python versions
> >
> > On 29 June, 2023 21:48:39 (-04:00), 吴锦林 wrote:
> >
> > Hey, I clone my source code to C:chrome\src, and use autoninja -C out\debug chrome to build chromium... and this error happened..
> >
> > ``` c++
> > PS C:\chrome\src> autoninja -C out\book chrome
> > "C:\Users\18f\Desktop\18_floor\source_code\build_chromium_tools\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\python3.exe" C:\Users\18f\Desktop\18_floor\source_code\build_chromium_tools\depot_tools\ninja.py -C out\book chrome -j 22
> > ninja: Entering directory `out\book'
> > [212/36225] ACTION //chrome/browser/media:mojo_bindings_ts__generator(//build/toolchain/win:win_clang_x64)
> >
> >
> > [224/36214] ACTION //chrome/browser/new_tab_page/modules/history_clusters:mojo_bindings_ts__generator(//build/toolchain/win:win_clang_x64)
> > FAILED: gen/chrome/browser/new_tab_page/modules/history_clusters/history_clusters.mojom-webui.ts
> > C:/Users/18f/AppData/Local/Programs/Python/Python311/python3.exe ../../mojo/public/tools/bindings/mojom_bindings_generator.py --use_bundled_pylibs -o gen generate -d ../../ -I ../../ --bytecode_path gen/mojo/public/tools/bindings --filelist=__chrome_browser_new_tab_page_modules_history_clusters_mojo_bindings_ts__generator___build_toolchain_win_win_clang_x64__rule..rsp -g typescript --scrambled_message_id_salt_path ../../chrome/VERSION
> >
> > Traceback (most recent call last):
> > File "C:\chrome\src\mojo\public\tools\bindings\mojom_bindings_generator.py", line 418, in
> > ret = main()
> > ^^^^^^
> > File "C:\chrome\src\mojo\public\tools\bindings\mojom_bindings_generator.py", line 413, in main
> > return args.func(args, remaining_args)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "C:\chrome\src\mojo\public\tools\bindings\mojom_bindings_generator.py", line 275, in _Generate
> > processor._GenerateModule(
> > File "C:\chrome\src\mojo\public\tools\bindings\mojom_bindings_generator.py", line 243, in _GenerateModule
> > generator.GenerateFiles(filtered_args)
> > File "C:\chrome\src\mojo\public\tools\bindings\generators\mojom_ts_generator.py", line 264, in GenerateFiles
> > self.WriteWithComment(self._GenerateWebUiModule(),
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "C:\chrome\src\mojo\public\tools\mojom\mojom\generate\template_expander.py", line 34, in GeneratorInternal
> > parameters = generator(*args, **kwargs2)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "C:\chrome\src\mojo\public\tools\bindings\generators\mojom_ts_generator.py", line 250, in _GenerateWebUiModule
> > return self._GetParameters()
> > ^^^^^^^^^^^^^^^^^^^^^
> > File "C:\chrome\src\mojo\public\tools\bindings\generators\mojom_ts_generator.py", line 216, in _GetParameters
> > self._GetJsModuleImports(),
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^
> > File "C:\chrome\src\mojo\public\tools\bindings\generators\mojom_ts_generator.py", line 617, in _GetJsModuleImports
> > os.path.relpath(
> > File "", line 754, in relpath
> > ValueError: path is on mount '\\\\history_cluster_types.mojom-webui.js', start on mount 'C:'
> > [240/36196] ACTION //chrome/browser/ui/webui/access_code_cast:mojo_bindings_ts__generator(//build/toolchain/win:win_clang_x64)
> >
> > [241/36194] ACTION //chrome/browser/ui/webui/app_home:mojo_bindings_ts__generator(//build/toolchain/win:win_clang_x64)
> >