Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt/6.x.x - Adding cross build support (only tested for Windows so far) #8116

Conversation

szigetics
Copy link

Specify library name and version: qt/6.x.x

qt/6.x.x - Adding cross build support (only tested for Windows so far)


  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

@CLAassistant
Copy link

CLAassistant commented Nov 19, 2021

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@ghost
Copy link

ghost commented Nov 19, 2021

I detected other pull requests that are modifying qt/6.x.x recipe:

This message is automatically generated by https://github.com/ericLemanissier/conan-center-conflicting-prs so don't hesitate to report issues/improvements there.

@szigetics szigetics mentioned this pull request Nov 19, 2021
@@ -616,6 +616,13 @@ def _configure_cmake(self):
self._cmake.definitions["FEATURE_pkg_config"] = "ON"
if self.settings.compiler == "gcc" and self.settings.build_type == "Debug" and not self.options.shared:
self._cmake.definitions["BUILD_WITH_PCH"]= "OFF" # disabling PCH to save disk space

if tools.cross_building(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericLemanissier
I'm in no way a qt specialist.
I remember reading to cross build qt for android, you first need a native qt.
Would the following be needed instead? + setting the correct appropriate arguments.

def build_requirements(self):
    if tools.cross_building(self):
        self.build_requires(f"{self.name}/{self.version}")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's the way qt 6 handles cross compilation yes, but I don't think conan allows it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean conan does not generate the required cmake modules for build requirements?
Is there missing something else?
Imho, this deserves to be added to conan.

Copy link
Contributor

@ericLemanissier ericLemanissier Nov 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the thing is that you usually want different options for the build qt (basically just the minimum) from the host qt.

Edit: looks like I am wrong!

Comment on lines -694 to -695
for mask in ["Find*.cmake", "*Config.cmake", "*-config.cmake"]:
tools.remove_files_by_mask(self.package_folder, mask)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines -701 to -706
for m in os.listdir(os.path.join(self.package_folder, "lib", "cmake")):
module = os.path.join(self.package_folder, "lib", "cmake", m, "%sMacros.cmake" % m)
helper_modules = glob.glob(os.path.join(self.package_folder, "lib", "cmake", m, "QtPublic*Helpers.cmake"))
if not os.path.isfile(module) and not helper_modules:
tools.rmdir(os.path.join(self.package_folder, "lib", "cmake", m))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@conan-center-bot
Copy link
Collaborator

Failure in build 2 (3d674697c32bded19e08419c8dfd25bc428427dc):

  • qt/6.0.4@:
    Didn't run or was cancelled before finishing

  • qt/6.1.3@:
    Didn't run or was cancelled before finishing

  • qt/6.2.1@:
    CI failed to create some packages (All logs)

    Logs for packageID 89bd71da113402bac2ceecdfb2b632fe72f0cef8:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=9
    os=Linux
    [options]
    qt:shared=True
    
    [...]
    Core tools:
      qmake tool ............................. yes
    
    Note: When linking against OpenSSL, you can override the default library names through OPENSSL_LIBS. For example: OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked
    Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.
    
    Qt is now configured for building. Just run 'cmake --build . --parallel'
    
    Once everything is built, you must run 'cmake --install .'
    Qt will be installed into '/home/conan/w/BuildSingleReference/.conan/data/qt/6.2.1/_/_/package/89bd71da113402bac2ceecdfb2b632fe72f0cef8'
    
    To configure and build other Qt modules, you can use the following convenience script:
            /home/conan/w/BuildSingleReference/.conan/data/qt/6.2.1/_/_/package/89bd71da113402bac2ceecdfb2b632fe72f0cef8/bin/qt-configure-module
    
    If reconfiguration fails for some reason, try to remove 'CMakeCache.txt' from the build directory 
    
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        BUILD_qtqa
        BUILD_qtrepotools
        CMAKE_EXPORT_NO_PACKAGE_REGISTRY
        CMAKE_INSTALL_BINDIR
        CMAKE_INSTALL_DATAROOTDIR
        CMAKE_INSTALL_INCLUDEDIR
        CMAKE_INSTALL_LIBDIR
        CMAKE_INSTALL_LIBEXECDIR
        CMAKE_INSTALL_OLDINCLUDEDIR
        CMAKE_INSTALL_SBINDIR
    
    
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findpkgconf.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findpkgconf.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findlibelf.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findlibelf.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findwayland.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findwayland.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findninja.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findninja.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findopengl_system.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findopengl_system.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'FindEXPAT.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'FindEXPAT.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findxorg.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findxorg.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,SHARED_LIBRARY>:-Wl,--export-dynamic>' in 'Findlibffi.cmake' file.
    WARN: replace_in_file didn't find pattern '$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,MODULE_LIBRARY>:-Wl,--export-dynamic>' in 'Findlibffi.cmake' file.
    [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] The conan-center repository doesn't allow the packages to contain CMake find modules or config files. The packages have to be located using generators and the declared `cpp_info` information (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H016) 
    [HOOK - conan-center.py] post_package(): ERROR: [CMAKE-MODULES-CONFIG-FILES (KB-H016)] Found files: ./lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindEGL.cmake; ./lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindGLIB2.cmake; ./lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindWayland.cmake; ./lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake; ./lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindX11_XCB.cmake; ./lib/cmake/Qt6/3rdparty/extra-cmake-modules/find-modules/FindXCB.cmake; ./lib/cmake/Qt6/3rdparty/kwin/FindLibdrm.cmake; ./lib/cmake/Qt6/3rdparty/kwin/FindLibinput.cmake; ./lib/cmake/Qt6/3rdparty/kwin/FindXKB.cmake; ./lib/cmake/Qt6/3rdparty/kwin/Findgbm.cmake; ./lib/cmake/Qt6/FindATSPI2.cmake; ./lib/cmake/Qt6/FindCups.cmake; ./lib/cmake/Qt6/FindDB2.cmake; ./lib/cmake/Qt6/FindDirectFB.cmake; ./lib/cmake/Qt6/FindGLESv2.cmake; ./lib/cmake/Qt6/FindGSSAPI.cmake; ./lib/cmake/Qt6/FindGTK3.cmake; ./lib/cmake/Qt6/FindInterbase.cmake; ./lib/cmake/Qt6/FindLibb2.cmake; ./lib/cmake/Qt6/FindLibproxy.cmake; ./lib/cmake/Qt6/FindLibsystemd.cmake; ./lib/cmake/Qt6/FindLibudev.cmake; ./lib/cmake/Qt6/FindMtdev.cmake; ./lib/cmake/Qt6/FindMySQL.cmake; ./lib/cmake/Qt6/FindOracle.cmake; ./lib/cmake/Qt6/FindPPS.cmake; ./lib/cmake/Qt6/FindSlog2.cmake; ./lib/cmake/Qt6/FindTslib.cmake; ./lib/cmake/Qt6/FindWrapAtomic.cmake; ./lib/cmake/Qt6/FindWrapBacktrace.cmake; ./lib/cmake/Qt6/FindWrapBrotli.cmake; ./lib/cmake/Qt6/FindWrapBundledFreetypeConfigExtra.cmake; ./lib/cmake/Qt6/FindWrapBundledHarfbuzzConfigExtra.cmake; ./lib/cmake/Qt6/FindWrapBundledLibpngConfigExtra.cmake; ./lib/cmake/Qt6/FindWrapBundledPcre2ConfigExtra.cmake; ./lib/cmake/Qt6/FindWrapDBus1.cmake; ./lib/cmake/Qt6/FindWrapDoubleConversion.cmake; ./lib/cmake/Qt6/FindWrapFreetype.cmake; ./lib/cmake/Qt6/FindWrapHarfbuzz.cmake; ./lib/cmake/Qt6/FindWrapOpenGL.cmake; ./lib/cmake/Qt6/FindWrapOpenSSL.cmake; ./lib/cmake/Qt6/FindWrapOpenSSLHeaders.cmake; ./lib/cmake/Qt6/FindWrapPCRE2.cmake; ./lib/cmake/Qt6/FindWrapPNG.cmake; ./lib/cmake/Qt6/FindWrapRt.cmake; ./lib/cmake/Qt6/FindWrapSystemFreetype.cmake; ./lib/cmake/Qt6/FindWrapSystemHarfbuzz.cmake; ./lib/cmake/Qt6/FindWrapSystemMd4c.cmake; ./lib/cmake/Qt6/FindWrapSystemPCRE2.cmake; ./lib/cmake/Qt6/FindWrapSystemPNG.cmake; ./lib/cmake/Qt6/FindWrapVulkan.cmake; ./lib/cmake/Qt6/FindWrapVulkanHeaders.cmake; ./lib/cmake/Qt6/FindWrapZLIB.cmake; ./lib/cmake/Qt6/FindXKB_COMMON_X11.cmake; ./lib/cmake/Qt6/FindXRender.cmake; ./lib/cmake/Qt6/FindZSTD.cmake; ./lib/cmake/Qt6/Finddouble-conversion.cmake; ./lib/cmake/Qt6/Qt6Config.cmake; ./lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake; ./lib/cmake/Qt6BuildInternals/StandaloneTests/QtBaseTestsConfig.cmake; ./lib/cmake/Qt6Concurrent/Qt6ConcurrentConfig.cmake; ./lib/cmake/Qt6Core/Qt6CoreConfig.cmake; ./lib/cmake/Qt6CoreTools/Qt6CoreToolsConfig.cmake; ./lib/cmake/Qt6DeviceDiscoverySupportPrivate/Qt6DeviceDiscoverySupportPrivateConfig.cmake; ./lib/cmake/Qt6FbSupportPrivate/Qt6FbSupportPrivateConfig.cmake; ./lib/cmake/Qt6Gui/Qt6GuiConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QComposePlatformInputContextPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QEvdevKeyboardPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QEvdevMousePluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QEvdevTabletPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QEvdevTouchScreenPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QGifPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QICOPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QLinuxFbIntegrationPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QMinimalIntegrationPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QOffscreenIntegrationPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QTuioTouchPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QVncIntegrationPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QXcbGlxIntegrationPluginConfig.cmake; ./lib/cmake/Qt6Gui/Qt6QXcbIntegrationPluginConfig.cmake; ./lib/cmake/Qt6GuiTools/Qt6GuiToolsConfig.cmake; ./lib/cmake/Qt6HostInfo/Qt6HostInfoConfig.cmake; ./lib/cmake/Qt6InputSupportPrivate/Qt6InputSupportPrivateConfig.cmake; ./lib/cmake/Qt6KmsSupportPrivate/Qt6KmsSupportPrivateConfig.cmake; ./lib/cmake/Qt6Network/Qt6NetworkConfig.cmake; ./lib/cmake/Qt6Network/Qt6QTlsBackendCertOnlyPluginConfig.cmake; ./lib/cmake/Qt6Network/Qt6QTlsBackendOpenSSLPluginConfig.cmake; ./lib/cmake/Qt6OpenGL/Qt6OpenGLConfig.cmake; ./lib/cmake/Qt6OpenGLWidgets/Qt6OpenGLWidgetsConfig.cmake; ./lib/cmake/Qt6PrintSupport/Qt6PrintSupportConfig.cmake; ./lib/cmake/Qt6Sql/Qt6QODBCDriverPluginConfig.cmake; ./lib/cmake/Qt6Sql/Qt6QPSQLDriverPluginConfig.cmake; ./lib/cmake/Qt6Sql/Qt6QSQLiteDriverPluginConfig.cmake; ./lib/cmake/Qt6Sql/Qt6SqlConfig.cmake; ./lib/cmake/Qt6Test/Qt6TestConfig.cmake; ./lib/cmake/Qt6Widgets/Qt6WidgetsConfig.cmake; ./lib/cmake/Qt6WidgetsTools/Qt6WidgetsToolsConfig.cmake; ./lib/cmake/Qt6XcbQpaPrivate/Qt6XcbQpaPrivateConfig.cmake; ./lib/cmake/Qt6Xml/Qt6XmlConfig.cmake (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H016) 
    ERROR: [HOOK - conan-center.py] post_package(): Some checks failed running the hook, check the output
    
  • qt/6.2.0@:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@stale
Copy link

stale bot commented Jan 13, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Feb 12, 2022

This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions.

@stale stale bot closed this Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants