Repository: conan-io/conan-center-index

Issue:
[qt] qt/5.15.2: Webengine failed to build on MacOS 11.3.1
### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **qt/5.15.2**
  * Operating System+version: **macOS 11.3.1**
  * Compiler+version: **apple-clang 12.0**
  * Conan version: **conan 1.39.0**
  * Python version: **Python 2.7.16 & Python 3.9.6**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=12.0
compiler.libcxx=libc++
build_type=Release
[options]
[conf]
[build_requires]
*: openssl/1.1.1k, cmake/3.20.4
[env]
```


### Steps to reproduce (Include if Applicable)
```
conan create . 5.15.2@bincrafters/stable -o qt:shared=True -o qt:qtwebsockets=True -o qt:qtwebengine=True -o qt:qtwebchannel=True -o qt:qtxmlpatterns=True -o qt:qtmultimedia=True -o qt:qttools=True -o qt:qtwebview=True -o qt:gui=True -o qt:qtdeclarative=True -o qt:qtlocation=True --build missing
```

### Logs (Include/Attach if Applicable)
<details><summary>Click to expand log</summary>

```
ERROR at //build/config/mac/mac_sdk.gni:114:5: Script returned non-zero exit code.
    exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines")
    ^----------
Current dir: /Users/builder/.conan/data/qt/5.15.2/bincrafters/stable/build/4819fba7b538b01321fbef38c12a6d76206f8ef1/build_folder/qtwebengine/src/core/release/
Command: /usr/bin/python2 /Users/builder/.conan/data/qt/5.15.2/bincrafters/stable/source/qt5/qtwebengine/src/3rdparty/chromium/build/mac/find_sdk.py --print_sdk_path --print_bin_path 11.3
Returned 1.
stderr:

Traceback (most recent call last):
  File "/Users/builder/.conan/data/qt/5.15.2/bincrafters/stable/source/qt5/qtwebengine/src/3rdparty/chromium/build/mac/find_sdk.py", line 127, in <module>
    print(main())
  File "/Users/builder/.conan/data/qt/5.15.2/bincrafters/stable/source/qt5/qtwebengine/src/3rdparty/chromium/build/mac/find_sdk.py", line 96, in main
    raise Exception('No %s+ SDK found' % min_sdk_version)
Exception: No 11.3+ SDK found

See //components/nacl/features.gni:9:3: whence it was imported.
  import("//build/config/mac/mac_sdk.gni")
  ^--------------------------------------
See //BUILD.gn:18:1: whence it was imported.
import("//components/nacl/features.gni")
^--------------------------------------
Project ERROR: GN run error!
make[3]: *** [sub-gn_run-pro-make_first] Error 3
make[2]: *** [sub-core-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtwebengine-make_first] Error 2
qt/5.15.2@bincrafters/stable:
qt/5.15.2@bincrafters/stable: ERROR: Package '4819fba7b538b01321fbef38c12a6d76206f8ef1' build failed
qt/5.15.2@bincrafters/stable: WARN: Build folder /Users/builder/.conan/data/qt/5.15.2/bincrafters/stable/build/4819fba7b538b01321fbef38c12a6d76206f8ef1
ERROR: qt/5.15.2@bincrafters/stable: Error in build() method, line 689
        self.run(self._make_program(), run_environment=True)
        ConanException: Error 2 while executing DYLD_LIBRARY_PATH="/Users/builder/.conan/data/bison/3.7.1/_/_/package/ef2ed909580d08f58dee7d2eaa04c4b8c95b08cf/lib:/Users/builder/.conan/data/flex/2.6.4/_/_/package/ef2ed909580d08f58dee7d2eaa04c4b8c95b08cf/lib:/Users/builder/.conan/data/pcre2/10.37/_/_/package/2d8245d819a6b7543095d62df5d99244060071ba/lib:/Users/builder/.conan/data/double-conversion/3.1.5/_/_/package/6a83d7f783e7ee89a83cf2fe72b5f5f67538e2a6/lib:/Users/builder/.conan/data/freetype/2.10.4/_/_/package/f4924bd3b94e155cbf790d74ba3a3c29ccc81e89/lib:/Users/builder/.conan/data/libjpeg/9d/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib:/Users/builder/.conan/data/sqlite3/3.36.0/_/_/package/264f180b28ff91ffa6d05e858eb8e55cc6c1a073/lib:/Users/builder/.conan/data/libmysqlclient/8.0.25/_/_/package/97c732aa3dd032b38cd549bd7305e62dec344d85/lib:/Users/builder/.conan/data/libpq/13.2/_/_/package/6615b55b95ff43a02a83c3955d071acd71dad079/lib:/Users/builder/.conan/data/odbc/2.3.9/_/_/package/5f4c4ed8ddf27bb70b22f93ac66b6827fc5411d1/lib:/Users/builder/.conan/data/openal/1.21.0/_/_/package/6a83d7f783e7ee89a83cf2fe72b5f5f67538e2a6/lib:/Users/builder/.conan/data/openssl/1.1.1k/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib:/Users/builder/.conan/data/bzip2/1.0.8/_/_/package/75fe66fbfe61230e9fcbb361f13b6b3baa483e0a/lib:/Users/builder/.conan/data/libpng/1.6.37/_/_/package/88955cec2844f731470e07bd44ce5a3a24ec88b7/lib:/Users/builder/.conan/data/brotli/1.0.9/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib:/Users/builder/.conan/data/zstd/1.5.0/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib:/Users/builder/.conan/data/lz4/1.9.3/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib:/Users/builder/.conan/data/libiconv/1.16/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib:/Users/builder/.conan/data/zlib/1.2.11/_/_/package/647afeb69d3b0a2d3d316e80b24d38c714cc6900/lib" DYLD_FRAMEWORK_PATH="" make

```
</details>


### Notes
If we look in details the following file 
`/Users/builder/.conan/data/qt/5.15.2/bincrafters/stable/source/qt5/qtwebengine/src/3rdparty/chromium/build/mac/find_sdk.py`

We can see that SDK 11+ are not supported
```
  sdks = [re.findall('^MacOSX(10\.\d+)\.sdk$', s) for s in os.listdir(sdk_dir)]
  sdks = [s[0] for s in sdks if s]  # [['10.5'], ['10.6']] => ['10.5', '10.6']
  sdks = [s for s in sdks  # ['10.5', '10.6'] => ['10.6']
          if parse_version(s) >= parse_version(min_sdk_version)]
  if not sdks:
    raise Exception('No %s+ SDK found' % min_sdk_version)
```


Discussion:
Do you think it is this bug https://bugreports.qt.io/browse/QTBUG-83318 ? If yes, then It should be fixed by using this patch https://github.com/bincrafters/conan-qt/commit/b1bf33c9d2edb5d3eee5bdfdb5b303ba76801c22
Maybe https://github.com/bincrafters/conan-qt/commit/ff830dfe90564065bdd8511aebce41bc4570263b could help too
Seems  bincrafters/conan-qt@ff830df should do the job.

I'll try both and let you know the result

Thanks !
I've applied both patch and it works now ! Thanks !

Resolving patch:
diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py
--- a/recipes/qt/5.x.x/conanfile.py
+++ b/recipes/qt/5.x.x/conanfile.py
@@ -928,6 +928,8 @@ def _create_plugin(pluginname, libname, type, requires):
             _create_module("QuickTest", ["Test"])
 
         if self.options.qttools and self.options.gui and self.options.widgets:
+            self.cpp_info.components["qtLinguistTools"].names["cmake_find_package"] = "LinguistTools"
+            self.cpp_info.components["qtLinguistTools"].names["cmake_find_package_multi"] = "LinguistTools"
             _create_module("UiPlugin", ["Gui", "Widgets"])
             self.cpp_info.components["qtUiPlugin"].libs = [] # this is a collection of abstract classes, so this is header-only
             self.cpp_info.components["qtUiPlugin"].libdirs = []


Test patch: