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

Chromium build breaks with Xcode 11

    XMLWordPrintable

Details

    • macOS
    • 13a336137a77bcc17fcdeaade3900a25a4e61e74 (qt/qtwebengine/5.13)

    Description

      There are two build breaks in 3rdparty/chromium with Xcode 11 (that ships with macOS 10.15 SDK). One happens at compile time of QWebEngineCore:

      In file included from gen/base/base_jumbo_12.cc:13:
      In file included from ./../../../../../qt5/qtwebengine/src/3rdparty/chromium/base/metrics/field_trial_memory_mac.cc:14:
      ../../../../../qt5/qtwebengine/src/3rdparty/chromium/base/mac/foundation_util.h:60:16: error: typedef 'OpaqueSecCertificateRef' cannot be referenced with a struct specifier
      typedef struct OpaqueSecCertificateRef* SecCertificateRef;
      {{ ^}}
      ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:91:33: note: declared here
      typedef struct __SecCertificate OpaqueSecCertificateRef;
      {{ ^}}
      In file included from gen/base/base_jumbo_12.cc:13:
      In file included from ./../../../../../qt5/qtwebengine/src/3rdparty/chromium/base/metrics/field_trial_memory_mac.cc:14:
      ../../../../../qt5/qtwebengine/src/3rdparty/chromium/base/mac/foundation_util.h:61:16: error: typedef 'OpaqueSecKeyRef' cannot be referenced with a struct specifier
      typedef struct OpaqueSecKeyRef* SecKeyRef;
      {{ ^}}
      ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:114:25: note: declared here
      typedef struct __SecKey OpaqueSecKeyRef;
      {{ ^}}
      In file included from gen/base/base_jumbo_12.cc:13:
      In file included from ./../../../../../qt5/qtwebengine/src/3rdparty/chromium/base/metrics/field_trial_memory_mac.cc:14:
      ../../../../../qt5/qtwebengine/src/3rdparty/chromium/base/mac/foundation_util.h:62:36: error: typedef redefinition with different types ('struct OpaqueSecPolicyRef *' vs 'struct __SecPolicy *')
      typedef struct OpaqueSecPolicyRef* SecPolicyRef;
      {{ ^}}
      ../../../../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Security.framework/Headers/SecBase.h:122:49: note: previous definition is here
      typedef struct CF_BRIDGED_TYPE(id) __SecPolicy *SecPolicyRef;
      {{ ^}}
      3 errors generated.

      The other one — at link time of QWebEngineCore:

      Undefined symbols for architecture x86_64:
        "_kCWScanKeyMerge", referenced from:
            device::(anonymous namespace)::CoreWlanApi::GetAccessPointData(std::_1::set<device::AccessPointData, device::AccessPointDataLess, std::_1::allocator<device::AccessPointData> >*) in wifi_data_provider_mac.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      make[5]: *** [/Users/dmik/Coding/qt/qt5-13-1-p6-dev-build/qtbase/lib/QtWebEngineCore.framework/QtWebEngineCore] Error 1
      make[4]: *** [release-all] Error 2
      make[4]: *** Waiting for unfinished jobs....
      Undefined symbols for architecture x86_64:
        "_kCWScanKeyMerge", referenced from:
            device::(anonymous namespace)::CoreWlanApi::GetAccessPointData(std::_1::set<device::AccessPointData, device::AccessPointDataLess, std::_1::allocator<device::AccessPointData> >*) in wifi_data_provider_mac.o
      ld: symbol(s) not found for architecture x86_64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)

      The first problem is already fixed upstream by this change: https://chromium.googlesource.com/chromium/src/+/acd3f7caf5fc1fc15d49be1392ab3fae11545300. A bunch of files in this change are new as it's for Chromium 77.* while QtWebEngine 5.13.1 is still based on Chromium 73.* AFAICT. But the needed patches apply cleanly and it builds fine then.

      As for the second problem, I couldn't find any solution upstream. I also failed to find any info on how to properly refer to _kCWScanKeyMerge in the 10.15 SDK. I got an impression that it's deprecated since long and has just been eventually removed from the latest SDK. But the symbol is still present in the actual CoreWLAN library so it was a matter of a simple hack to make it available to Qt. The hack implies patching this file:

      /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreWLAN.framework/Versions/Current/CoreWLAN.tbd

      (patch attached).

      Once the two above patches are done, I can successfully build QtWebEngine (as well as QtBase, QtDeclarative, QtMacExtras, QtSVG, QtWebChannel and QtWebSockets). Quick testing shows that it works as good as the version built by the 10.14 SDK.

      Attachments

        Issue Links

          Activity

            People

              pvarga Peter Varga
              dmik Dmitriy Kuminov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: