Bug 53372 - qt6-declarative: Qt6QmlMacros.cmake не видит плагины из покаталога QmlPlugins
Summary: qt6-declarative: Qt6QmlMacros.cmake не видит плагины из покаталога QmlPlugins
Status: CLOSED NOTABUG
Alias: None
Product: Sisyphus
Classification: Development
Component: qt6-declarative (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Sergey V Turchin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-10 06:03 MSK by Aleksandr Shamaraev
Modified: 2025-03-10 11:34 MSK (History)
1 user (show)

See Also:


Attachments
скрин.jpg (117.86 KB, image/jpeg)
2025-03-10 06:04 MSK, Aleksandr Shamaraev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksandr Shamaraev 2025-03-10 06:03:58 MSK
Здравствуйте.

Данная бага, больше может как вопрос... 

При сборке пакета ScreenPlay

https://git.altlinux.org/people/shad/packages/?p=ScreenPlay.git;a=summary

столкнулся с такой проблемой..если я правильно понимаю то
 /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake
не видит плагинов расположенных в подкаталоге QmlPlugins

следовательно в итоге сборка крашиться, как думаю из-за этого 

я посмотрел строки Qt6QmlMacros.cmake:4216 , если правильно понимаю, он ищет в том же каталоге где и сам Qt6QmlMacros.cmake (скрин во вложении), но это не точно...

часть лога

CMake Warning at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:4216 (message):
  The qml plugin 'qtquickcontrols2fluentwinui3styleimplplugin' is a
  dependency of 'tst_ScreenPlayWorkshop', but the link target it defines
  (Qt6::qtquickcontrols2fluentwinui3styleimplplugin) does not exist in the
  current scope.  The plugin will not be linked.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:861:EVAL:1 (qt6_finalize_target)
  ScreenPlayWorkshop/CMakeLists.txt:DEFERRED


CMake Warning at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:4216 (message):
  The qml plugin 'effectsplugin' is a dependency of 'tst_ScreenPlayWorkshop',
  but the link target it defines (Qt6::effectsplugin) does not exist in the
  current scope.  The plugin will not be linked.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:861:EVAL:1 (qt6_finalize_target)
  ScreenPlayWorkshop/CMakeLists.txt:DEFERRED


CMake Warning at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:4216 (message):
  The qml plugin 'qquicklayoutsplugin' is a dependency of
  'tst_ScreenPlayWorkshop', but the link target it defines
  (Qt6::qquicklayoutsplugin) does not exist in the current scope.  The plugin
  will not be linked.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:861:EVAL:1 (qt6_finalize_target)
  ScreenPlayWorkshop/CMakeLists.txt:DEFERRED


CMake Warning at /usr/lib64/cmake/Qt6Qml/Qt6QmlMacros.cmake:4216 (message):
  The qml plugin 'qmlshapesplugin' is a dependency of
  'tst_ScreenPlayWorkshop', but the link target it defines
  (Qt6::qmlshapesplugin) does not exist in the current scope.  The plugin
  will not be linked.
Call Stack (most recent call first):
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (qt6_import_qml_plugins)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:745 (cmake_language)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:823 (_qt_internal_finalize_executable)
  /usr/lib64/cmake/Qt6Core/Qt6CoreMacros.cmake:861:EVAL:1 (qt6_finalize_target)
  ScreenPlayWorkshop/CMakeLists.txt:DEFERRED

-----
сама компиляция 

[ 62%] Building CXX object ScreenPlayWallpaper/CMakeFiles/ScreenPlayWallpaper.dir/src/basewindow.cpp.o
In file included from /usr/include/qt6/QtQml/QtQml:13,
                 from /usr/src/RPM/BUILD/screenplay-0.15.3/ScreenPlayWallpaper/src/basewindow.h:14,
                 from /usr/src/RPM/BUILD/screenplay-0.15.3/ScreenPlayWallpaper/src/basewindow.cpp:2:
/usr/include/qt6/QtQml/qqml.h: In instantiation of 'int qmlRegisterType(const char*, int, int, const char*) [with T = BaseWindow]':
/usr/src/RPM/BUILD/screenplay-0.15.3/ScreenPlayWallpaper/src/basewindow.cpp:38:32:   required from here
   38 |     qmlRegisterType<BaseWindow>("ScreenPlay.Wallpaper", 1, 0, "Wallpaper");
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtQml/qqml.h:302:25: error: static assertion failed: It is not possible to register an abstract type with qmlRegisterType. Maybe you wanted qmlRegisterUncreatableType or qmlRegisterInterface?
  302 |     static_assert(!std::is_abstract_v<T>,
      |                    ~~~~~^~~~~~~~~~~~~~~~
/usr/include/qt6/QtQml/qqml.h:302:25: note: '!(bool)std::is_abstract_v<BaseWindow>' evaluates to false
make[2]: *** [ScreenPlayWallpaper/CMakeFiles/ScreenPlayWallpaper.dir/build.make:273: ScreenPlayWallpaper/CMakeFiles/ScreenPlayWallpaper.dir/src/basewindow.cpp.o] Error 1
make[2]: Leaving directory '/usr/src/RPM/BUILD/screenplay-0.15.3/x86_64-alt-linux'
make[1]: *** [CMakeFiles/Makefile2:3636: ScreenPlayWallpaper/CMakeFiles/ScreenPlayWallpaper.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/usr/src/RPM/BUILD/screenplay-0.15.3/x86_64-alt-linux'

------

Возможно я сделал что-то не так, либо не доделал, что он не видит плагины...
но я полазил по спекам и к сожалению не увидел как обработать плагины... может плохо искал.

Прошу Вас подсказать по данному вопросу

Заранее благодарю.

С уважением.
Comment 1 Aleksandr Shamaraev 2025-03-10 06:04:38 MSK
Created attachment 17935 [details]
скрин.jpg
Comment 2 Sergey V Turchin 2025-03-10 11:29:17 MSK
Про плагины просто дурацкий Warning.

Ошибка компиляции:
error: static assertion failed: It is not possible to register an abstract type with qmlRegisterType. Maybe you wanted qmlRegisterUncreatableType or qmlRegisterInterface?
  302 |     static_assert(!std::is_abstract_v<T>,
      |                    ~~~~~^~~~~~~~~~~~~~~~
/usr/include/qt6/QtQml/qqml.h:302:25: note: '!(bool)std::is_abstract_v<BaseWindow>' evaluates to false
Comment 3 Aleksandr Shamaraev 2025-03-10 11:34:44 MSK
(Ответ для Sergey V Turchin на комментарий #2)
> Про плагины просто дурацкий Warning.

"век живи, век учись..." 

я понял, спасибо за наставления :)

С уважением