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

[package] qt/6.5.0: HttpServer CMake target never found #18775

Closed
asconcepcion opened this issue Jul 21, 2023 · 0 comments · Fixed by #18778
Closed

[package] qt/6.5.0: HttpServer CMake target never found #18775

asconcepcion opened this issue Jul 21, 2023 · 0 comments · Fixed by #18778
Labels
bug Something isn't working

Comments

@asconcepcion
Copy link

Description

The cmake target Qt6::HttpServer is never found when running cmake:

CMake Error at tests/CMakeLists.txt:18 (target_link_libraries):
  Target "tests" links to:

    Qt6::HttpServer

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

That happens even if the module is enabled in the conanfile.txt:

[requires]
qt/6.4.2
nlohmann_json/3.10.5

# These are not direct dependencies but their
# versions need to be fixed to resolve conflicts.
glib/2.76.3
openssl/1.1.1t

[generators]
CMakeToolchain
CMakeDeps
pkg_config
virtualrunenv

[options]
qt:shared=True
qt:qtmqtt=True
qt:qthttpserver=True
qt:qtwebsockets=True

# Disable GUI-related options that are enabled by default
qt:gui=False
qt:widgets=False
qt:with_x11=False

Package and Environment Details

  • Package Name/Version: qt/6.5.0
  • Operating System+version: Linux Ubuntu 23.04
  • Compiler+version: GCC 12.2.0
  • Conan version: conan 1.60.1
  • Python version: Python 3.11.2

Conan profile

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=12
compiler.libcxx=libstdc++11
build_type=Release
compiler.cppstd=17
[options]
[build_requires]
[env]

Steps to reproduce

Using the conanfile.txt file indicated in the description, run the conan install command:

conan install . --build=missing -if install-dir -pr:b=default

And then run cmake:

cmake -DCMAKE_TOOLCHAIN_FILE=install-dir/conan_toolchain.cmake ../ -DCMAKE_BUILD_TYPE=Release

Logs

Click to expand log
-- Using Conan toolchain: /app/install-dir/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 17 with extensions OFF
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Conan: Component target declared 'Qt6::Core'
-- Conan: Component target declared 'Qt6::Platform'
-- Conan: Component target declared 'Qt6::QSQLiteDriverPlugin'
-- Conan: Component target declared 'Qt6::QPSQLDriverPlugin'
-- Conan: Component target declared 'Qt6::QODBCDriverPlugin'
-- Conan: Component target declared 'Qt6::Network'
-- Conan: Component target declared 'Qt6::Sql'
-- Conan: Component target declared 'Qt6::Test'
-- Conan: Component target declared 'Qt6::Concurrent'
-- Conan: Component target declared 'Qt6::Xml'
-- Conan: Component target declared 'Qt6::Qml'
-- Conan: Component target declared 'Qt6::QmlModels'
-- Conan: Component target declared 'Qt6::QmlImportScanner'
-- Conan: Component target declared 'Qt6::QmlWorkerScript'
-- Conan: Component target declared 'Qt6::Mqtt'
-- Conan: Component target declared 'Qt6::WebSockets'
-- Conan: Target declared 'qt::qt'
-- Conan: Target declared 'ZLIB::ZLIB'
-- 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 'BZip2::BZip2'
-- Conan: Including build module from '/conan-cache/.conan/data/bzip2/1.0.8/_/_/package/3cfc45772763dad1237052f26c1fe8b2bae3f7d2/lib/cmake/conan-official-bzip2-variables.cmake'
-- Conan: Target declared 'double-conversion::double-conversion'
-- Conan: Component target declared 'ICU::data'
-- Conan: Component target declared 'ICU::dt'
-- Conan: Component target declared 'ICU::uc'
-- Conan: Component target declared 'ICU::i18n'
-- Conan: Component target declared 'ICU::in'
-- Conan: Component target declared 'ICU::io'
-- Conan: Component target declared 'ICU::tu'
-- Conan: Component target declared 'ICU::test'
-- Conan: Target declared 'icu::icu'
-- Conan: Component target declared 'OpenSSL::Crypto'
-- Conan: Component target declared 'OpenSSL::SSL'
-- Conan: Target declared 'openssl::openssl'
-- Conan: Including build module from '/conan-cache/.conan/data/openssl/1.1.1t/_/_/package/2a19826344ff00be1c04403f2f8e7008ed3a7cc6/lib/cmake/conan-official-openssl-variables.cmake'
-- 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 'odbc::_odbc'
-- Conan: Component target declared 'odbc::odbcinst'
-- Conan: Component target declared 'odbc::odbccr'
-- Conan: Target declared 'ODBC::ODBC'
-- Conan: Target declared 'libtool::libtool'
-- Conan: Target declared 'automake::automake'
-- Conan: Target declared 'autoconf::autoconf'
-- Conan: Target declared 'm4::m4'
-- Conan: Target declared 'Iconv::Iconv'
-- 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 '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6Core/conan_qt_executables_variables.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6Core/conan_qt_qt6_coreprivate.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicWasmToolchainHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicWalkLibsHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicToolHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicFindPackageHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicFinalizerHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicPluginHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicCMakeVersionHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicCMakeHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicTestHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicTargetHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicDependencyHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6/QtPublicAppleHelpers.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6Core/Qt6CoreMacros.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6Qml/conan_qt_qt6_qmlprivate.cmake'
-- Conan: Including build module from '/conan-cache/.conan/data/qt/6.5.0/_/_/package/588cbec34572a5f42280ef786f270ce4ad560886/lib/cmake/Qt6Qml/Qt6QmlMacros.cmake'
-- Configuring done
CMake Error at CMakeLists.txt:17 (target_link_libraries):
  Target "addressbookserver" links to:

    Qt::HttpServer

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.
@asconcepcion asconcepcion added the bug Something isn't working label Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant