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

feat(qt): improve qt test_package and fix qt libs dependencies #18650

Closed
wants to merge 9 commits into from

Conversation

ledocc
Copy link
Contributor

@ledocc ledocc commented Jul 19, 2023

Qt have many libs,
each one should be tested to check if link informations is correctly defined in conan recipe with this link test, some libs dependencies have be fixed

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


Qt have many libs,
each one should be tested to check if link informations is correctly defined in conan recipe
with this link test, some libs dependencies have be fixed
@CLAassistant
Copy link

CLAassistant commented Jul 19, 2023

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

🤖 Beep Boop! This pull request is making changes to 'recipes/qt//'.

👋 @ericLemanissier @jwillikers @MartinDelille you might be interested. 😉

@ghost
Copy link

ghost commented Jul 19, 2023

I detected other pull requests that are modifying qt/5.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.

Copy link
Contributor

@ericLemanissier ericLemanissier left a comment

Choose a reason for hiding this comment

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

That's a massive piece of work, thanks !
I'm not sure the test recipe covering all modules is compatible with CCI policy though :/

Comment on lines -1076 to -1077
if self.options.get_safe("with_x11", False):
gui_reqs.append("xorg::xorg")
Copy link
Contributor

Choose a reason for hiding this comment

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

xorg has to be referenced as a requirement of at least one component. Why do You think it's not needed here, wereas qt checks for these libraries during GUI module configuration https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/gui/configure.json#L556 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This dependencies is the first that I try to remove because I know that QtGUI is platform agnostic, and platform dependencies is in platforms plugins. To do this, I add test for QtGui module in test_package. If test can link and run, this mean that dependencies list defined in conanfile is exhaustive.

Now, I have a test to confirm that Xorg is not in QtGUI,

To be precise, xcb_qpa_lib is link against xcb, and platforms/xcb plugins (and platforms/xcb/gl_integrations) is link against xcb_qpa_lib
https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/plugins/platforms/xcb/xcb_qpa_lib.pro#L94
https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/plugins/platforms/xcb/xcb-plugin.pro#L3
https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri#L1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

xorg is referenced by XcbQpa component

Comment on lines 1113 to 1116
widget_reqs = ["Gui"]
if self.options.with_freetype:
widget_reqs.append("freetype::freetype")
_create_module("Widgets", widget_reqs)
Copy link
Contributor

Choose a reason for hiding this comment

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

What makes you think freetype is a requirements of Widgets instead of GUI ? freetype is checked by qt in GUI but not in Widgets

Copy link
Contributor Author

@ledocc ledocc Jul 19, 2023

Choose a reason for hiding this comment

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

Freetype is hidden in fontdatabase, plugins.
Their also are reference in platforms/xcb and platforms/minimal plugin, but I don't know why
The only reference to freetype in .pro/.pri for linking with it are:
https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/platformsupport/fontdatabases/freetype/freetype.pri#L9
https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/plugins/platforms/xcb/nativepainting/nativepainting.pri#L3
https://github.com/qt/qtbase/blob/v5.15.10-lts-lgpl/src/plugins/platforms/minimal/minimal.pro#L17

I will also remove it from QtWidget

@conan-center-bot

This comment has been minimized.

recipes/qt/5.x.x/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/qt/5.x.x/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/qt/5.x.x/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/qt/5.x.x/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/qt/5.x.x/test_package/conanfile.py Outdated Show resolved Hide resolved
recipes/qt/5.x.x/test_package/conanfile.py Outdated Show resolved Hide resolved
ledocc and others added 3 commits July 19, 2023 18:21
Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
Co-authored-by: ericLemanissier <ericLemanissier@users.noreply.github.com>
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Aug 7, 2023
3 tasks
@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 3 (a98ea8a4eb45fe2ced2d77e575f2c3d18fdeb069):

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

    Logs for packageID 8b45f593ce88d21827e7621d89a2153124bd7d49:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=5
    os=Linux
    [options]
    qt:shared=False
    
    [...]
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicuuc.a
    -- Library icui18n found /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicui18n.a
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicui18n.a
    -- Library icutu found /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicutu.a
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicutu.a
    -- Library icutest found /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicutest.a
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicutest.a
    -- Library icuio found /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicuio.a
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/icu/73.2/_/_/package/980215d0c67ac9b4bcb6c34a43716e6531af0d43/lib/libicuio.a
    -- Library zstd found /home/conan/w/prod-v1/BuildSingleReference/.conan/data/zstd/1.5.5/_/_/package/ff7e1eda45846fc95249ac3e0c50da0e296272b3/lib/libzstd.a
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/zstd/1.5.5/_/_/package/ff7e1eda45846fc95249ac3e0c50da0e296272b3/lib/libzstd.a
    -- Library zstd found /home/conan/w/prod-v1/BuildSingleReference/.conan/data/zstd/1.5.5/_/_/package/ff7e1eda45846fc95249ac3e0c50da0e296272b3/lib/libzstd.a
    -- Found: /home/conan/w/prod-v1/BuildSingleReference/.conan/data/zstd/1.5.5/_/_/package/ff7e1eda45846fc95249ac3e0c50da0e296272b3/lib/libzstd.a
    -- Configuring done
    -- Generating done
    CMake Error at /home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_package/target.cmake:4 (add_executable):
      Cannot find source file:
    
        test_package-Core.cpp
    
      Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
      .hpp .hxx .in .txx
    Call Stack (most recent call first):
      /home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_package/target.cmake:35 (add_qt_executable)
      /home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_package/target.cmake:50 (add_qt_exe)
      CMakeLists.txt:14 (include)
    
    
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        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
        CONAN_COMPILER_VERSION
        CONAN_EXPORTED
        CONAN_IN_LOCAL_CACHE
    
    
    CMake Generate step failed.  Build files cannot be regenerated correctly.
    ERROR: qt/5.15.7 (test package): Error in build() method, line 118
    	self._build_with_cmake_find_package_multi()
    while calling '_build_with_cmake_find_package_multi', line 112
    	cmake.configure()
    	ConanException: Error 1 while executing cd '/home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_v1_package/build/0bd11cf99b3d466cd4120aa3c3fccf3ce0fc35bc' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="OFF" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="5" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCMAKE_CXX_FLAGS="-m64" -DCMAKE_SHARED_LINKER_FLAGS="-m64" -DCMAKE_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DCMAKE_INSTALL_PREFIX="/home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_v1_package/build/0bd11cf99b3d466cd4120aa3c3fccf3ce0fc35bc/package" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_PREFIX_PATH="/home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_v1_package/build/0bd11cf99b3d466cd4120aa3c3fccf3ce0fc35bc" -DCMAKE_MODULE_PATH="/home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_v1_package/build/0bd11cf99b3d466cd4120aa3c3fccf3ce0fc35bc" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -Wno-dev '/home/conan/w/prod-v1/BuildSingleReference/cci-8f629288/recipes/qt/5.x.x/test_v1_package'
    
  • qt/5.15.9@:
    Didn't run or was cancelled before finishing

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

  • qt/5.15.8@:
    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.

@ghost ghost mentioned this pull request Aug 10, 2023
3 tasks
@stale
Copy link

stale bot commented Sep 17, 2023

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 stale bot added the stale label Sep 17, 2023
@ghost ghost mentioned this pull request Oct 5, 2023
3 tasks
@ghost ghost mentioned this pull request Oct 29, 2023
3 tasks
@ghost ghost mentioned this pull request Nov 25, 2023
3 tasks
@ghost ghost mentioned this pull request Dec 26, 2023
3 tasks
@ghost ghost mentioned this pull request Jan 19, 2024
3 tasks
@ghost ghost mentioned this pull request Feb 5, 2024
3 tasks
@ghost ghost mentioned this pull request Mar 8, 2024
3 tasks
Copy link
Contributor

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

@github-actions github-actions bot closed this Apr 22, 2024
@leha-bot
Copy link
Contributor

@ledocc hello, sorry for mentioning, may you continue work on this PR? It looks like that it's almost complete and looks great for early detecting some nasty link errors

@ledocc
Copy link
Contributor Author

ledocc commented Apr 29, 2024

@ledocc hello, sorry for mentioning, may you continue work on this PR? It looks like that it's almost complete and looks great for early detecting some nasty link errors

Hi @leha-bot, no problem for mentioning me.

I no longer work on this PR this comment. But I continue on my side to fix qt dependencies.

I also think a test that link and run for each library is require in conan's test_package. But seem that's not CCI policy.

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.

5 participants