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

qcoro: migrate to Conan v2 #18837

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Jul 22, 2023

@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 Jul 24, 2023
3 tasks
@valgur
Copy link
Contributor Author

valgur commented Jul 26, 2023

Closing temporarily to avoid unnecessary load on the CI. Will reopen when I'm actively working on the PR again.

@conan-center-bot

This comment has been minimized.

This was referenced Sep 15, 2023
@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
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

github-actions bot commented Nov 9, 2023

Hooks produced the following warnings for commit 97ef690
qcoro/0.4.0@#61d49973536d17e28db248685d1181c2
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libQCoro6Network.0.dylib' links to system library 'CFNetwork' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libQCoro6Network.dylib' links to system library 'CFNetwork' but it is not in cpp_info.frameworks.
post_package(): WARN: [MISSING SYSTEM LIBS (KB-H043)] Library './lib/libQCoro6Network.0.4.0.dylib' links to system library 'CFNetwork' but it is not in cpp_info.frameworks.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@uilianries
Copy link
Member

uilianries commented Nov 15, 2023

The CI bot failed to post Conan 2.x results, but here is the link: https://c3i.jfrog.io/c3i/misc-v2/summary.html?json=https://c3i.jfrog.io/c3i/misc-v2/logs/pr/18837/6-windows-msvc/qcoro/0.4.0//summary.json

It failed during the test package:

======== Testing the package: Building ========
qcoro/0.4.0 (test package): Calling build()
qcoro/0.4.0 (test package): Running CMake.configure()
qcoro/0.4.0 (test package): RUN: cmake -G "Visual Studio 16 2019" -DCMAKE_TOOLCHAIN_FILE="C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package/build/msvc-192-x86_64-20-release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" "C:\J2\w\prod-v2\bsr@3\cci-6d1d03de\recipes\qcoro\all\test_package"
-- Using Conan toolchain: C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package/build/msvc-192-x86_64-20-release/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 20 with extensions OFF
-- The CXX compiler identification is MSVC 19.29.30148.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Component target declared 'QCoro::Core'
-- Conan: Component target declared 'QCoro::Network'
-- Conan: Target declared 'qcoro::qcoro'
-- Conan: Component target declared 'Qt6::Core'
-- Conan: Component target declared 'Qt6::Platform'
-- Conan: Component target declared 'Qt6::Gui'
-- Conan: Component target declared 'Qt6::QWindowsIntegrationPlugin'
-- Conan: Component target declared 'Qt6::QWindowsVistaStylePlugin'
-- Conan: Component target declared 'Qt6::QGifPlugin'
-- Conan: Component target declared 'Qt6::QIcoPlugin'
-- Conan: Component target declared 'Qt6::QSQLiteDriverPlugin'
-- Conan: Component target declared 'Qt6::QPSQLDriverPlugin'
-- Conan: Component target declared 'Qt6::Network'
-- Conan: Component target declared 'Qt6::Sql'
-- Conan: Component target declared 'Qt6::Test'
-- Conan: Component target declared 'Qt6::Widgets'
-- Conan: Component target declared 'Qt6::PrintSupport'
-- Conan: Component target declared 'Qt6::OpenGL'
-- Conan: Component target declared 'Qt6::OpenGLWidgets'
-- Conan: Component target declared 'Qt6::Concurrent'
-- Conan: Component target declared 'Qt6::Xml'
-- Conan: Component target declared 'Qt6::EntryPointImplementation'
-- Conan: Component target declared 'Qt6::EntryPointPrivate'
-- Conan: Target declared 'qt::qt'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Target declared 'ZLIB::ZLIB'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/opensa5274c36eb1dd/p/lib/cmake/conan-official-openssl-variables.cmake'
-- Conan: Target declared 'double-conversion::double-conversion'
-- Conan: Target declared 'harfbuzz::harfbuzz'
-- Conan: Target declared 'Freetype::Freetype'
-- Conan: Target declared 'BZip2::BZip2'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/bzip2555cd12ce8ce6/p/lib/cmake/conan-official-bzip2-variables.cmake'
-- Conan: Target declared 'PNG::PNG'
-- Conan: Component target declared 'brotli::brotlicommon'
-- Conan: Component target declared 'brotli::brotlidec'
-- Conan: Component target declared 'brotli::brotlienc'
-- Conan: Target declared 'brotli::brotli'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/freetf6e5a80c6226d/p/lib/cmake/conan-official-freetype-variables.cmake'
-- Conan: Component target declared 'glib::glib-2.0'
-- Conan: Component target declared 'glib::gmodule-no-export-2.0'
-- Conan: Component target declared 'glib::gmodule-export-2.0'
-- Conan: Component target declared 'glib::gmodule-2.0'
-- Conan: Component target declared 'glib::gobject-2.0'
-- Conan: Component target declared 'glib::gthread-2.0'
-- Conan: Component target declared 'glib::gio-2.0'
-- Conan: Component target declared 'glib::gresource'
-- Conan: Component target declared 'glib::gio-windows-2.0'
-- Conan: Target declared 'glib::glib'
-- Conan: Target declared 'libffi::libffi'
-- Conan: Component target declared 'PCRE2::8BIT'
-- Conan: Component target declared 'PCRE2::POSIX'
-- Conan: Component target declared 'PCRE2::16BIT'
-- Conan: Component target declared 'PCRE2::32BIT'
-- Conan: Target declared 'pcre2::pcre2'
-- Conan: Target declared 'Intl::Intl'
-- Conan: Target declared 'Iconv::Iconv'
-- Conan: Component target declared 'SQLite::SQLite3'
-- Conan: Component target declared 'libpq::pgport'
-- Conan: Component target declared 'libpq::pgcommon'
-- Conan: Component target declared 'libpq::pq'
-- Conan: Target declared 'PostgreSQL::PostgreSQL'
-- Conan: Component target declared 'md4c::md4c'
-- Conan: Component target declared 'md4c::md4c-html'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Core/conan_qt_executables_variables.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Core/conan_qt_qt6_coreprivate.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Core/conan_qt_entry_point.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicAppleHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicCMakeHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicCMakeVersionHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicFinalizerHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicFindPackageHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicPluginHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicTargetHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicTestHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicToolHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicWalkLibsHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6/QtPublicWasmToolchainHelpers.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Core/Qt6CoreMacros.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Gui/conan_qt_qt6_guiprivate.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Widgets/conan_qt_qt6_widgetsprivate.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Widgets/Qt6WidgetsMacros.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/qte5466ad8177e1/p/lib/cmake/Qt6Core/Qt6CoreConfigExtras.cmake'
-- Conan: Including build module from 'C:/J2/w/prod-v2/bsr@3/40227/acbac/p/b/qcoro9502a157663b0/p/lib/cmake/QCoro6Coro/QCoroMacros.cmake'
-- Configuring done (5.7s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_POLICY_DEFAULT_CMP0091


-- Build files have been written to: C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package/build/msvc-192-x86_64-20-release

qcoro/0.4.0 (test package): Running CMake.build()
qcoro/0.4.0 (test package): RUN: cmake --build "C:\J2\w\prod-v2\bsr@3\cci-6d1d03de\recipes\qcoro\all\test_package\build\msvc-192-x86_64-20-release" --config Release
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  1>Checking Build System
  Building Custom Rule C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package/CMakeLists.txt
  test_package.cpp
Qt6Core.lib(qlocale_win.cpp.obj) : error LNK2038: mismatch detected for '_COROUTINE_ABI': value '1' doesn't match value '2' in test_package.obj [C:\J2\w\prod-v2\bsr@3\cci-6d1d03de\recipes\qcoro\all\test_package\build\msvc-192-x86_64-20-release\test_package.vcxproj]
Qt6Core.lib(qfactorycacheregistration.cpp.obj) : error LNK2038: mismatch detected for '_COROUTINE_ABI': value '1' doesn't match value '2' in test_package.obj [C:\J2\w\prod-v2\bsr@3\cci-6d1d03de\recipes\qcoro\all\test_package\build\msvc-192-x86_64-20-release\test_package.vcxproj]
     Creating library C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package/build/msvc-192-x86_64-20-release/Release/test_package.lib and object C:/J2/w/prod-v2/bsr@3/cci-6d1d03de/recipes/qcoro/all/test_package/build/msvc-192-x86_64-20-release/Release/test_package.exp
C:\J2\w\prod-v2\bsr@3\cci-6d1d03de\recipes\qcoro\all\test_package\build\msvc-192-x86_64-20-release\Release\test_package.exe : fatal error LNK1319: 2 mismatches detected [C:\J2\w\prod-v2\bsr@3\cci-6d1d03de\recipes\qcoro\all\test_package\build\msvc-192-x86_64-20-release\test_package.vcxproj]

*********************************************************
Recipe 'qcoro/0.4.0 (test package)' cannot build its binary
It is possible that this recipe is not Conan 2.0 ready
If the recipe comes from ConanCenter, report it at https://github.com/conan-io/conan-center-index/issues
If it is your recipe, check if it is updated to 2.0
*********************************************************

ERROR: qcoro/0.4.0 (test package): Error in build() method, line 24
	cmake.build()
	ConanException: Error 1 while executing

@conan-center-bot

This comment has been minimized.

@uilianries
Copy link
Member

Copy link
Contributor

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.

@github-actions github-actions bot added the stale label May 31, 2024
@github-actions github-actions bot removed the stale label Jun 13, 2024
Copy link
Contributor

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.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

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.

@github-actions github-actions bot added the stale label Aug 16, 2024
@valgur
Copy link
Contributor Author

valgur commented Aug 16, 2024

don't close

@github-actions github-actions bot removed the stale label Aug 17, 2024
@conan-center-bot

This comment has been minimized.

@valgur
Copy link
Contributor Author

valgur commented Sep 23, 2024

Missing an assigned reviewer as well. @uilianries (sorry for the spam, let me know if these mentions are unnecessary).

Comment on lines 104 to 105
# Required for Qt's moc and qtpaths
VirtualRunEnv(self).generate(scope="build")
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you really need to inject RunEnv in build scope ? Qt is also in build requirements, so I would have expected that this trick wouldn't be needed.

Copy link
Contributor Author

@valgur valgur Oct 21, 2024

Choose a reason for hiding this comment

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

After experimenting with adding cross-compilation support for the Qt6 recipe recently, I have a strong suspicion the exported Qt CMake modules in combination with the package_info() are not using the correct version of the tools and always rely on the Qt6::moc etc targets from the host profile. This also explains why the VirtualRunEnv is necessary when Qt6 has been built with shared=True.

I suppose the correct solution in this recipe for the time being would be to drop the tool_requires dependency of Qt instead.


def requirements(self):
self.requires("qt/6.3.1")
self.requires("qt/[>=6.6.0 <7]", transitive_headers=True, transitive_libs=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe that qcoro is also compatible with Qt5 looking at the logic in this file: https://github.com/qcoro/qcoro/blob/v0.10.0/cmake/QCoroFindQt.cmake

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, but how would you change the recipe accordingly? Add a "qt": [5, 6] option? The user is already able to force=True an older version, if necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would just change version range by something like this qt/[>=5.15 <7]. I don't see any reason to add an option.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add that, but it probably won't have any real benefit, though. Conan does practically no conflict resolution and will most likely just complain and fail due to the other recipes are not using the newest version that is <7.

Copy link
Member

Choose a reason for hiding this comment

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

This would allow for this to be used when users have an extra dependency on QT that is pinned/resolves to a 5.x version.

If the changes to the recipe to support the older version are just allowing it in the version range, I'd go for it with a comment, otherwise if it's more difficult than that, we can keep the current approach

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

Warning

Conan Center will stop receiving updates for Conan 1.x packages soon - please see announcement.

All green in build 5 (3c9b96231130adef17f74a82089fa6542c0623f9):

  • qcoro/0.10.0:
    No packages built ⚠️ (All logs)

Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 5 (3c9b96231130adef17f74a82089fa6542c0623f9):

  • qcoro/0.10.0:
    Built 4 packages out of 10 (All logs)

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

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

Some comments, thanks!

}

int main(int argc, char **argv) {
QCoreApplication app(argc, argv);
QTimer::singleShot(0, startTask);
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep this call to be able to ensure the compiler is not optimizing away the whole function declaration


def requirements(self):
self.requires("qt/6.3.1")
self.requires("qt/[>=6.6.0 <7]", transitive_headers=True, transitive_libs=True)
Copy link
Member

Choose a reason for hiding this comment

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

This would allow for this to be used when users have an extra dependency on QT that is pinned/resolves to a 5.x version.

If the changes to the recipe to support the older version are just allowing it in the version range, I'd go for it with a comment, otherwise if it's more difficult than that, we can keep the current approach

@AbrilRBS AbrilRBS removed their assignment Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Library qcoro is not compatible with Conan v2
5 participants