MSYS2 UCRT64 environment does not generate

208 views
Skip to first unread message

Kalen White

unread,
Aug 10, 2023, 8:53:49 AM8/10/23
to skia-discuss
  Followed instructions for checking out and giving path to depot_tools, its a fresh install, hadnt updated or corrupted.  I'm not exactly sure if one needs to 'configure' the depot_tools, but no matter the skia page does not mention that so I didnt do it.

$ gn gen out/Vulkan --args='
is_official_build=false is_debug=false skia_use_xps=false is_component_build=false is_trivial_abi=true werror=true                        skia_use_angle=false skia_use_dng_sdk=false skia_use_dawn=false skia_use_webgl=false
skia_use_webgpu=false skia_use_expat=false skia_use_fontconfig=false skia_use_freetype=true
skia_use_libheif=false skia_use_libjpeg_turbo_decode=false skia_use_libjpeg_turbo_encode=false
skia_use_no_jpeg_encode=false skia_use_libpng_decode=false skia_use_libpng_encode=false
skia_use_no_png_encode=false skia_use_libwebp_decode=false skia_use_libwebp_encode=false
skia_use_no_webp_encode=false  skia_use_lua=false skia_use_piex=false skia_use_system_freetype2=false
skia_use_system_libpng=false skia_use_system_zlib=false skia_use_vulkan=true skia_use_wuffs=false
skia_use_zlib=false skia_enable_ganesh=true skia_enable_sksl=false skia_build_for_debugger=false
skia_enable_sksl_tracing=false skia_enable_skshaper=false skia_enable_skparagraph=false skia_enable_pdf=false
skia_canvaskit_force_tracing=false skia_canvaskit_profile_build=false skia_canvaskit_enable_skp_serialization=false
skia_canvaskit_enable_effects_deserialization=false skia_canvaskit_enable_skottie=false
skia_canvaskit_include_viewer=false skia_canvaskit_enable_pathops=false skia_canvaskit_enable_rt_shader=false
skia_canvaskit_enable_matrix_helper=false skia_canvaskit_enable_canvas_bindings=false skia_canvaskit_enable_font=false
skia_canvaskit_enable_embedded_font=false skia_canvaskit_enable_alias_font=false
skia_canvaskit_legacy_draw_vertices_blend_mode=false skia_canvaskit_enable_debugger=false
skia_canvaskit_enable_paragraph=false skia_canvaskit_enable_webgl=false skia_canvaskit_enable_webgpu=false skia_use_vma=false'
Traceback (most recent call last):
  File "C:/Users/kalen/src/skia/gn/find_msvc.py", line 36, in <module>
    result = find_msvc()
  File "C:/Users/kalen/src/skia/gn/find_msvc.py", line 29, in find_msvc
    paths = subprocess.check_output(command).decode('utf-8').splitlines()
  File "C:\Users\kalen\src\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\kalen\src\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\Users\kalen\src\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Users\kalen\src\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python3\bin\lib\subprocess.py", line 1311, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
ERROR at //gn/BUILDCONFIG.gn:138:14: Script returned non-zero exit code.
    win_vc = exec_script("//gn/find_msvc.py", [], "trim string")
             ^----------
Current dir: C:/Users/kalen/src/skia/out/Vulkan/
Command: C:/Users/kalen/src/depot_tools/bootstrap-2@3_8_10_chromium_26_bin/python3/bin/python3.exe C:/Users/kalen/src/skia/gn/find_msvc.py
Returned 1.

Can skia not be compiled in MSYS2 environment?  The command is failing, one that builds on other environment/os.  That file exists in the root of skia; I acn see it.  The script is just failing to find the current path.  Does this need to be run by cmd and not MSYS2 bash?  I tried replacing the python3 exe with the one that runs in MSYS and it gives the same error. 


Brian Osman

unread,
Aug 10, 2023, 9:00:42 AM8/10/23
to skia-d...@googlegroups.com
Maybe? I don't think anyone on the team has ever tried. Given the path normalization issues (and having both GN and python involved, at least), there's a decent chance that something is getting a path format it doesn't expect (possibly a mix of forward and backward slashes?), or just some other issue.

Kalen White

unread,
Aug 12, 2023, 1:11:54 PM8/12/23
to skia-discuss
Looks like it takes quite a bit of patching to get going but isnt hard.  Its just about forcing it to use Clang -- so no big deal.  Google could easily support this:


Thats the msys2 package for skia which builds a version a bit too previous for me, and I have an integrated build system that pulls source, applies diffs (as that one does) and builds into a prefix install.  

Google SHOULD support cross platform efforts, dont you think?  msys2 is the most popular one.

Kalen White

unread,
Aug 18, 2023, 1:06:13 AM8/18/23
to skia-discuss
I got it working by adding a is_mingw script/function with a state var, and doing a few things in ports.  It was about a day to get it done but I cant use the mingw path because of nVidia libraries, and to such a extent where I cant go forward.  I have the patch overlay tree for the given extern and resultant diff in the repo ar-visions/ion; naming it skia-mingw which is deactivating it.

Kalen White

unread,
Aug 18, 2023, 1:07:02 AM8/18/23
to skia-discuss
My patching was more extensive than what they did in MinGW package.  They werent using Vulkan
Reply all
Reply to author
Forward
0 new messages