From 675313c42bc30b2587b84b88ea0276211b517e4f Mon Sep 17 00:00:00 2001 From: Torsten Wierschin Date: Tue, 15 Sep 2026 19:45:14 +0000 Subject: [PATCH] dba775929 (HEAD -> feature/qt6-migration-basis-modules) Removes build folder from repo 691bf21f3 Replace Qt5:: with Qt6:: in 26 CMakeLists.txt files 9db7dd604 Fix Qt5:: target references and add missing participant_info header --- ...der-errors-after-1st-dlb-mergein.prompt.md | 384 ++++++++++++++++++ qt-migration-legatus | 2 +- 2 files changed, 385 insertions(+), 1 deletion(-) create mode 100644 prompts/fix-remaining-cmake-linker-missing-header-errors-after-1st-dlb-mergein.prompt.md diff --git a/prompts/fix-remaining-cmake-linker-missing-header-errors-after-1st-dlb-mergein.prompt.md b/prompts/fix-remaining-cmake-linker-missing-header-errors-after-1st-dlb-mergein.prompt.md new file mode 100644 index 000000000..11a432a4e --- /dev/null +++ b/prompts/fix-remaining-cmake-linker-missing-header-errors-after-1st-dlb-mergein.prompt.md @@ -0,0 +1,384 @@ +Use this prompt as binding task context. Work autonomously, minimally, and reproducibly. Do not ask for confirmation unless the task is destructive, impossible, or source material is missing. + +# Task + +Fix the remaining Qt6 migration configure/build errors in: + +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus + +Current failing log excerpt: + +- CMake cannot find source file: + - /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/ParticipantManagement/participant_info_gui_element_interface.h + +- Multiple Qt6 migrated targets still link against Qt5 imported targets: + - Qt5::Core + - Qt5::Widgets + - Qt5::Network + +Examples from build.log: + +- CnrProxyTester links to Qt5::Widgets +- ConfigX links to Qt5::Widgets +- tDataSampleGenerator links to Qt5::Core +- tDataSampleReceiver links to Qt5::Core +- SettingsRemover links to Qt5::Core +- displayPanelSimulator links to Qt5::Core +- EEMFakeServer links to Qt5::Core +- localDomainFinder links to Qt5::Core +- ParticipantDataGenerator links to Qt5::Core +- qledline links to Qt5::Core +- qledmatrix links to Qt5::Core +- RestClientUi links to Qt5::Widgets +- vapixconfig links to Qt5::Network +- textEditorTest links to Qt5::Core +- GuiElementPlugin links to Qt5::Widgets +- dbUpdate links to Qt5::Widgets +- thp_viewer links to Qt5::Core +- SitMapReplayTest links to Qt5::Core +- LtsRestClient links to Qt5::Core +- LtsWidgets links to Qt5::Network +- svcVideoOverlayManagement links to Qt5::Core +- GuiElementInterface link interface contains Qt5::Core +- PpmParticipantInfoGuiPlugin links to Qt5::Widgets +- ScmDataPlugin links to Qt5::Core +- ScmEditGuiPlugin links to Qt5::Widgets + +# Hard Rules + +Do not modify the Qt5 legacy tree except if explicitly required for comparison only. The actual bugfix must be applied in the Qt6 tree: + +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus + +Do not restore modules removed by: + +- commit 92ad7d468 + - "remove all unneeded module listed from Niklas" + +Do preserve the reinserted LogViewer module from: + +- commit 1fa789767 + - Merge pull request 'Added LogViewer again' (#2) from feature/qt6-migration-added-logview into feature/qt6-migration-basis-modules + +Do not remove targets just to make configure pass unless the target belongs to a module that was intentionally removed and is still accidentally referenced. + +Do not suppress errors. Fix root causes. + +Do not add generated .idl, .h, or .cpp files to the source tree. + +Do not create stubs, dummy files, placeholder files, mock generated files, or handwritten substitutes for missing generated files. + +Generated files from RTI, ndsgen, or KTextTemplate must be produced in the build tree and consumed from the build tree. + +# Main Goals + +1. Fix all remaining Qt5:: target references in the Qt6 tree. +2. Fix the missing ParticipantManagement header reference correctly. +3. Preserve the previous migration rules: + - no removed module resurrection + - no stale artifact dependency + - no source-tree generated outputs + - no regression of previous .IDL warning fixes + - LogViewer remains present and integrated +4. Validate in Docker using the repository's validation flow. + +# Investigation Phase + +Start from the repository root. + +Inspect: + +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus/build.log +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus/cmake/NGLMacros.cmake +- all CMakeLists.txt files related to the failing targets +- any project-specific CMake macros that translate Qt dependencies +- any Qt package discovery logic +- ParticipantManagement plugin CMake files +- GuiElementInterface CMake files +- LogViewer CMake files if they interact with the same plugin/interface system + +Search for literal Qt5 references in the Qt6 tree: + +- Qt5::Core +- Qt5::Widgets +- Qt5::Network +- Qt5::Gui +- Qt5:: +- find_package(Qt5 +- QT5_ +- Qt5Core +- Qt5Widgets +- Qt5Network + +Also search for Qt6 package discovery: + +- find_package(Qt6 +- Qt6::Core +- Qt6::Widgets +- Qt6::Network +- qt_add_ +- qt6_add_ + +Determine whether the project already has a compatibility abstraction for Qt major version, for example: + +- QT_PACKAGE_PREFIX +- QT_VERSION_MAJOR +- QT_LIBRARIES +- NGL Qt helper macros +- project wrapper macros around target_link_libraries + +If such abstraction exists, use it consistently. + +If no abstraction exists, add the smallest safe local fix. + +# Qt5:: to Qt6:: Fix Rules + +For the Qt6 migrated tree, targets must not link to Qt5 imported targets. + +Replace Qt5 imported targets with Qt6 equivalents where appropriate: + +- Qt5::Core -> Qt6::Core +- Qt5::Gui -> Qt6::Gui +- Qt5::Widgets -> Qt6::Widgets +- Qt5::Network -> Qt6::Network +- Qt5::Sql -> Qt6::Sql +- Qt5::Xml -> Qt6::Xml +- Qt5::Test -> Qt6::Test +- Qt5::Concurrent -> Qt6::Concurrent +- Qt5::PrintSupport -> Qt6::PrintSupport +- Qt5::OpenGL -> Qt6::OpenGL or Qt6::OpenGLWidgets depending on actual API usage + +Do not blindly replace inside the Qt5 legacy tree. + +Prefer fixing the central macro or helper that still expands to Qt5:: targets if the failing references originate there. + +Only edit individual target CMakeLists.txt files if the Qt5:: references are local and not generated by a central macro. + +Ensure required Qt6 components are included in find_package(Qt6 COMPONENTS ... REQUIRED) or equivalent. + +If targets link to Qt6::Widgets, make sure Widgets is discovered. + +If targets link to Qt6::Network, make sure Network is discovered. + +If targets link to Qt6::Core, make sure Core is discovered. + +Avoid adding unnecessary Qt components. + +# Missing Header Fix Rules + +Missing file: + +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Plugins/ParticipantManagement/participant_info_gui_element_interface.h + +Investigate why this header is referenced: + +1. Search for: + - participant_info_gui_element_interface.h + - participant_info_gui_element_interface + - ParticipantManagement + - PpmParticipantInfoGuiPlugin + - GuiElementInterface + +2. Determine whether the header: + - exists in the Qt5 legacy tree + - exists in dlbo + - exists under a renamed path in the Qt6 tree + - was intentionally deleted by commit 92ad7d468 + - should be generated by KTextTemplate or another generator + - is a stale source-list reference left behind after module deletion + - belongs to the LogViewer reinsert and must be preserved + +3. If the header is a real source header that still belongs to an active module: + - migrate/copy the real header from the correct current source, not from deleted modules + - adapt minimally for Qt6/C++17 if needed + - update include paths and target_sources correctly + +4. If the header is generated: + - do not create it manually + - fix the generator flow so it is generated in the build tree + - add correct OUTPUT/BYPRODUCTS/DEPENDS/MAIN_DEPENDENCY/WORKING_DIRECTORY/VERBATIM + - add generated output directory to target_include_directories + - ensure generation happens before compilation + - ensure generated .cpp files are registered in target_sources if applicable + +5. If the header belonged to a module removed by 92ad7d468: + - do not restore that module + - remove only the stale reference to the missing header/target/source list + - ensure this does not break preserved LogViewer integration + +6. If the header belongs to the reinserted LogViewer integration: + - preserve the module + - restore the real required file or correct path from the LogViewer reinsert source + - do not remove LogViewer to make the build pass + +# Commit/Regression Checks + +Inspect these commits as references, without blindly replaying them: + +- 92ad7d468 + - module removals must remain preserved + +- be912de9d + - previous .IDL warning fix must not regress + +- 1fa789767 + - LogViewer reinsert must remain preserved + +Check whether the current error was introduced by: +- stale references after module deletion +- incomplete LogViewer reinsert +- incomplete dlbo migration +- copied Qt5 CMake references +- central CMake macro still hardcoding Qt5 +- missing Qt6 find_package components +- generated file path mismatch +- source-tree vs build-tree codegen confusion + +# RTI / Codegen / KTextTemplate Rules + +If any failing target depends on RTI, ndsgen, or KTextTemplate generated files: + +- generated .idl, .h, and .cpp must be created in the build tree +- generated files must not be committed +- generated files must not be consumed from the source tree +- no stale source-tree or developer-local artifacts may be required +- no placeholder or stub generated files may be introduced + +Inspect and fix if needed: + +- add_custom_command(OUTPUT ...) +- BYPRODUCTS +- DEPENDS +- MAIN_DEPENDENCY +- WORKING_DIRECTORY +- COMMAND +- VERBATIM +- target_sources(...) +- target_include_directories(...) +- add_dependencies(...) +- GENERATED + +Prefer output paths under: + +- ${CMAKE_CURRENT_BINARY_DIR} + +unless the repository clearly requires a different build-tree location. + +# Docker Authority + +For the migration environment, only this Dockerfile is authoritative: + +- ./app/Dockerfile + +For validation, use: + +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus/docker_build.sh + +Do not use other Dockerfiles as authority for this task. + +# Container and Mount Rules + +Required general container layout: + +- repository root at /repo +- external dependencies at /repo/external +- RTI 7.7 at /repo/external/rti_connext_dds-7.7.0 +- license file from ./rti_license.dat mounted read-only if RTI requires it + +Existing validation container may use: + +- /workspace + +Respect the project script's mount convention. Do not introduce host-specific assumptions. + +# Validation Requirements + +Before final validation: + +- use a clean or empty build directory +- remove or invalidate stale generated artifacts relevant to the failing targets, or prove they are irrelevant +- ensure no source-tree generated artifacts are consumed +- ensure any required generator runs during the build + +Run validation in Docker. + +At minimum, from: + +- ./qt-migration-legatus/qt6-after/qt6-migrated-legatus + +run: + +- BUILD_RTI=OFF ./docker_build.sh + +If BUILD_RTI=ON is supported and required or relevant, run: + +- BUILD_RTI=ON ./docker_build.sh + +If direct CMake validation is useful inside the container, use clean build directories: + +- cmake -S /repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus -B /repo/build-rti-off -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_RTI=OFF +- cmake --build /repo/build-rti-off --parallel +- ctest --test-dir /repo/build-rti-off --output-on-failure + +If BUILD_RTI=ON is supported: + +- cmake -S /repo/qt-migration-legatus/qt6-after/qt6-migrated-legatus -B /repo/build-rti-on -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_RTI=ON +- cmake --build /repo/build-rti-on --parallel +- ctest --test-dir /repo/build-rti-on --output-on-failure + +Also check whether this command exists and run it if present: + +- ./docker-build.h + +If the command name is a typo or does not exist, report that explicitly and do not invent an equivalent unless the repository clearly documents one. + +# Expected Fix Outcome + +The fix is successful only if: + +- CMake no longer reports the missing participant_info_gui_element_interface.h source file error +- no active Qt6 target links to Qt5::Core, Qt5::Widgets, Qt5::Network, or any other Qt5:: imported target +- required Qt6 components are discovered correctly +- removed modules from 92ad7d468 remain removed +- LogViewer reinsert from 1fa789767 remains preserved +- no generated files are checked into the source tree +- generated files, if involved, are produced and consumed from the build tree +- BUILD_RTI=OFF configures and builds without RTI or license requirements +- BUILD_RTI=ON is only reported successful if real RTI/codegen execution and fresh generated outputs are proven + +# If Blocked + +Do not fake success. + +Report exactly: + +- failing command +- key error output +- whether the issue is project, path, merge, codegen, Docker, RTI/license, or environment related +- what was fixed safely +- what remains blocked +- whether BUILD_RTI=OFF was validated +- whether BUILD_RTI=ON was validated or not fully validated +- whether stale artifacts were ruled out +- whether generated files were involved + +# Final Report + +Keep the final report short and factual. + +Report: + +- status: validated, partially validated, or blocked +- root cause of the Qt5:: target references +- root cause of missing participant_info_gui_element_interface.h +- files changed +- CMake/generator changes made +- confirmation that removed modules from 92ad7d468 were not restored +- confirmation that LogViewer from 1fa789767 was preserved +- whether RTI/codegen/KTextTemplate was involved +- whether output placement remained build-tree only +- exact Docker/build commands used +- result of BUILD_RTI=OFF ./docker_build.sh +- result of BUILD_RTI=ON ./docker_build.sh if run +- result of ./docker-build.h if present +- remaining failures, blockers, or risks diff --git a/qt-migration-legatus b/qt-migration-legatus index 691bf21f3..dba775929 160000 --- a/qt-migration-legatus +++ b/qt-migration-legatus @@ -1 +1 @@ -Subproject commit 691bf21f3ea7b5de47eebdb89caf0d9ca4d4f284 +Subproject commit dba77592929efa6e815f6e8fe2a412d75caa3d64