← All tasks
cppzealdocs/zeal #1643Not a task: not reproduced

cmake fails configuring against Qt 6.7.2 because required components are not explicitly listed

envgap__zealdocs__zeal-1643

01 / FAILURE SIGNATURE

As reported upstream

[   14s] error: Bad exit status from /var/tmp/rpm-tmp.ZwSSuE (%build)
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
b9a25f2cbea28e5b44defbc161096b5813b4d0d3
Manifest
src/app/CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

zealdocs/zeal #1643 · read the original issue
Starting from Qt 6.7.2, the `find_package` in [`src/app/CMakeLists.txt`](../tree/main/src/app/CMakeLists.txt#L1) needs to list all necessary Qt6 components needed to build the app. Otherwise, we (openSUSE Tumbleweed) see error like the following when running cmake:



```

[   12s] + cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DCMAKE_INSTALL_PREFIX:STRING=/usr -DCMAKE_MESSAGE_LOG_LEVEL:STRING=STATUS -S . -B build -GNinja -DQT_DISABLE_RPATH:BOOL=ON '-DCMAKE_C_FLAGS:STRING=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -Wno-unused-variable' '-DCMAKE_CXX_FLAGS:STRING=-O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -Wno-unused-variable' '-DCMAKE_EXE_LINKER_FLAGS:STRING=-Wl,--as-needed -Wl,--no-undefined' '-DCMAKE_MODULE_LINKER_FLAGS:STRING=-Wl,--as-needed -Wl,--no-undefined' '-DCMAKE_SHARED_LINKER_FLAGS:STRING=-Wl,--as-needed -Wl,--no-undefined' -DCMAKE_SKIP_INSTALL_RPATH=ON

[   12s] -- The CXX compiler identification is GNU 13.3.0

[   12s] -- Detecting CXX compiler ABI info

[   12s] -- Detecting CXX compiler ABI info - done

[   12s] -- Check for working CXX compiler: /usr/bin/c++ - skipped

[   12s] -- Detecting CXX compile features

[   12s] -- Detecting CXX compile features - done

[   12s] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD

[   12s] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success

[   12s] -- Found Threads: TRUE

[   12s] Building unreleased code. Proceed at your own risk!

[   12s] Cannot find Git metadata, using static version string.

[   12s] Calculated Zeal version: 0.7.1-dev

[   12s] -- Performing Test HAVE_STDATOMIC

[   12s] -- Performing Test HAVE_STDATOMIC - Success

[   12s] -- Found WrapAtomic: TRUE

[   13s] -- Found OpenGL: /usr/lib64/libOpenGL.so

[   13s] -- Found WrapOpenGL: TRUE

[   13s] -- Found XKB: /usr/lib64/libxkbcommon.so (found suitable version "1.7.0", minimum required is "0.5.0")

[   13s] -- Found WrapVulkanHeaders: /usr/include

[   13s] -- Found X11: /usr/include

[   13s] -- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so

[   13s] -- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found

[   13s] -- Looking for gethostbyname

[   13s] -- Looking for gethostbyname - found

[   13s] -- Looking for connect

[   13s] -- Looking for connect - found

[   13s] -- Looking for remove

[   13s] -- Looking for remove - found

[   13s] -- Looking for shmat

[   13s] -- Looking for shmat - found

[   14s] -- Found XCB_XCB: /usr/lib64/libxcb.so (found version "1.17.0")

[   14s] -- Found XCB_KEYSYMS: /usr/lib64/libxcb-keysyms.so (found version "0.4.1")

[   14s] -- Found XCB: /usr/lib64/libxcb.so;/usr/lib64/libxcb-keysyms.so (found version "1.17.0") found components: XCB KEYSYMS

[   14s] -- Found SQLite3: /usr/include (found version "3.46.0")

[   14s] -- Project executable name: zeal

[   14s] CMake Error at /usr/lib64/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:259 (message):

[   14s]   The Concurrent target is mentioned as a dependency for Registry, but not

[   14s]   declared.

[   14s] Call Stack (most recent call first):

[   14s]   /usr/lib64/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:228 (__qt_internal_walk_libs)

[   14s]   /usr/lib64/cmake/Qt6/QtPublicWalkLibsHelpers.cmake:311 (__qt_internal_walk_libs)

[   14s]   /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:651 (__qt_internal_collect_all_target_dependencies)

[   14s]   /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:774 (_qt_internal_finalize_executable)

[   14s]   /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:590:EVAL:1 (qt6_finalize_target)

[   14s]   src/app/CMakeLists.txt:DEFERRED

[   14s] 

[   14s] 

[   14s] -- Configuring incomplete, errors occurred!

[   14s] error: Bad exit status from /var/tmp/rpm-tmp.ZwSSuE (%build)

```



This is fixed by the following patch (against `zeal v0.7.1`):



```diff

---

 src/app/CMakeLists.txt |    2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)



Index: zeal-0.7.1/src/app/CMakeLists.txt

===================================================================

--- zeal-0.7.1.orig/src/app/CMakeLists.txt

+++ zeal-0.7.1/src/app/CMakeLists.txt

@@ -1,4 +1,4 @@

-find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Widgets REQUIRED)

+find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Concurrent Network WebChannel WebEngineWidgets Widgets REQUIRED)

 if (Qt${QT_VERSION_MAJOR}Widgets_VERSION VERSION_LESS QT_MINIMUM_VERSION)

     message(FATAL_ERROR "Qt version >= ${QT_MINIMUM_VERSION} is required.")

 endif()

```
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]