Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97961

GN causes "unknown current_cpu arm" error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.7
    • Fix Version/s: 6.2.0
    • Component/s: WebEngine
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      Attempting to build QtWebEngine 5.15.7 on macOS for Apple Silicon (ARM 64-bit) encounters an error:

      ERROR at //build/config/mac/BUILD.gn:44:5: Assertion failed.
      assert(false, "unknown current_cpu $current_cpu")
      ^-----
      unknown current_cpu arm
      See //build/config/BUILDCONFIG.gn:411:23: which caused the file to be included.
      _linker_configs = [ "//build/config/mac:strip_all" ]
      ^-----------------------------
      Project ERROR: GN run error!

      This appears to be caused by GN setting the host_cpu variable to arm rather than arm64; by default, host_cpu is used to set target_cpu, which in turn is used to set current_cpu (see src/3rdparty/chromium/build/config/BUILDCONFIG.gn). But src/3rdparty/chromium/build/config/mac/BUILD.gn only recognizes current_cpu as possibly being set to arm64, and not arm.

      Newer versions of GN, including the version(s) present on branches of the qtwebengine-chromium repository newer than the 87-based branch, correctly set host_cpu to arm64 on macOS ARM64. Commit for the very small code change that corrected the behavior: https://gn.googlesource.com/gn/+/f45a703d8fd97817529e00a70ca4bae75abec3e3%5E%21/#F0

      Can this change please be backported/cherry-picked to the 87-based branch of qtwebengine-chromium for inclusion in future QtWebEngine 5.15.x releases?

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              qt_webengine_team Qt WebEngine Team
              Reporter:
              chrstphrchvz Christopher Chavez
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes