arm64 windows gn from fetch-gn is currently broken

40 views
Skip to first unread message

Hin-Tak Leung

unread,
Aug 14, 2025, 9:31:37 AMAug 14
to skia-discuss
This should be filed at issues.skia.org, but it seems to be disabled at the moment. I can see that there seems to be a spam problem (some guy(s) are filing a lot of bogus bugs), so it may be disabled at the moment. Anyway, the url for arm64-windows gn from fetch-gn seems to be broken. You can try these three -

wget -x -N 'https://chrome-infra-packages.appspot.com/dl/gn/gn/linux-arm64/+/git_revision:b2afae122eeb6ce09c52d63f67dc53fc517dbdc8'
wget -x -N 'https://chrome-infra-packages.appspot.com/dl/gn/gn/windows-arm64/+/git_revision:b2afae122eeb6ce09c52d63f67dc53fc517dbdc8'
wget -x -N 'https://chrome-infra-packages.appspot.com/dl/gn/gn/windows-amd64/+/git_revision:b2afae122eeb6ce09c52d63f67dc53fc517dbdc8'

The 3rd one fails. I am working around this by patching fetch-gn to using the x86_64 binary at the moment (arm64 windows can execute x86_64 binary). I don't know why this fails, as we did use the binary successfully almost exactly two months ago when we released skia-python v138 (I am only of the co-maintainers, and I am trying to prepare for v139/v140 at the moment).

And I hope somebody sort out the issue tracker spamming problem soon.

bungeman

unread,
Aug 14, 2025, 9:35:14 AMAug 14
to skia-discuss
It should be possible to open new Skia issues by selecting the "New" component.

Munashe Dirwayi

unread,
Sep 25, 2025, 1:21:11 PM (14 days ago) Sep 25
to skia-discuss
Having the same issue today, fetch-gn doesn't work.

Munashe Dirwayi

unread,
Sep 25, 2025, 1:21:14 PM (14 days ago) Sep 25
to skia-discuss
Yeah, this still doesn't work to this day currently, this is my solution to bypasssing it by just using x86 (amd64) instead of arm64 for win32

#!/usr/bin/env python3

# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import os
import platform
import shutil
import stat
import sys
import tempfile
import zipfile

from urllib.request import urlopen

os.chdir(os.path.join(os.path.dirname(__file__), os.pardir))

gnzip = os.path.join(tempfile.mkdtemp(), 'gn.zip')
with open(gnzip, 'wb') as f:
  OS  = {'darwin': 'mac', 'linux': 'linux', 'linux2': 'linux', 'win32': 'windows'}[sys.platform]
  cpu = platform.machine().lower()

  if OS == 'windows' and cpu in ('aarch64', 'arm64'):
        print("Warning: Windows ARM64 detected. For some reason, gn on google servers are dead, falling back to x86_64 GN binary")
        cpu = 'amd64'
  else:
        cpu = {'aarch64': 'arm64', 'amd64': 'amd64', 'arm64': 'arm64', 'x86_64': 'amd64'}[cpu]

  rev = 'b2afae122eeb6ce09c52d63f67dc53fc517dbdc8'
  url = 'https://chrome-infra-packages.appspot.com/dl/gn/gn/{}-{}/+/git_revision:{}'.format(
          OS,cpu,rev)
  f.write(urlopen(url).read())

gn_filename = 'gn.exe' if 'win32' in sys.platform else 'gn'
with zipfile.ZipFile(gnzip, 'r') as f:
  f.extract(gn_filename, 'bin')

gn_path = os.path.join('bin', gn_filename)

os.chmod(gn_path,
         stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
         stat.S_IRGRP                | stat.S_IXGRP |
         stat.S_IROTH                | stat.S_IXOTH )

# We'll also copy to a path that depot_tools' GN wrapper will expect to find the binary.
depot_tools_gn_dir = os.path.join('third_party', 'gn')
os.makedirs(depot_tools_gn_dir, exist_ok=True)
shutil.copy(gn_path, os.path.join(depot_tools_gn_dir, gn_filename))

Munashe Dirwayi

unread,
Sep 25, 2025, 1:21:20 PM (14 days ago) Sep 25
to skia-discuss
Test

On Thursday, 14 August 2025 at 15:35:14 UTC+2 bungeman wrote:
Reply all
Reply to author
Forward
0 new messages