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

GN causes "unknown current_cpu arm" error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.15.10, 6.2.0
    • 5.15.7
    • WebEngine
    • None
    • 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

          For Gerrit Dashboard: QTBUG-97961
          # Subject Branch Project Status CR V

          Activity

            People

              michal Michal Klocek
              chrstphrchvz Christopher Chavez
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes