- Wrap FIND_PACKAGE(RTI) in IF(NOT TARGET RTI::nddsc) condition - Prevents placeholder targets from overwriting manually configured RTI:: targets - Manual configuration creates RTI:: targets when BUILD_RTI=ON and RTI found - FIND_PACKAGE only called as fallback when manual config doesn't create targets Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: 01M1CT3XSQXCX9RQR6WM9DG3GH
314 lines
13 KiB
Markdown
314 lines
13 KiB
Markdown
# Qt5/C++11 to Qt6/C++17 Migration Status
|
|
|
|
**Datum**: 2026-08-31
|
|
**Submodule Branch**: `feature/qt6-migration-basis-modules` @ d176b5e
|
|
**Docker-Image**: `migration-pipeline:ubuntu26.04`
|
|
**C++ Standard**: C++17 (⚠️ RTI 7.7 kompatibel nur mit C++17, NICHT C++23)
|
|
|
|
---
|
|
|
|
## 📊 Gesamtübersicht
|
|
|
|
| Bereich | Status | BUILD_RTI=OFF | BUILD_RTI=ON | Notes |
|
|
|---------|--------|---------------|--------------|-------|
|
|
| **Lts/Common** | ✅ Vollständig | ✅ Build OK | ✅ Configure OK | Tests: 1/1 bestanden |
|
|
| **Lts/DDS** | 🟡 DTC-Generation | ⚠️ 45 Fehler | ⚠️ 45 Fehler | RTI Headers in MOC, ngl_codegen Build |
|
|
| **Lts/Plugins** | 🟡 Teilweise | ⚠️ Build-Fehler | ⚠️ Build-Fehler | Externe Dependencies fehlen |
|
|
| **Lts/Projects** | 🟡 Struktur vorhanden | ✅ Configure OK | ✅ Configure OK | Warning: jsonschema app nicht gefunden |
|
|
| **Lts/Proxies** | 🟡 Struktur vorhanden | ✅ Configure OK | ✅ Configure OK | - |
|
|
| **Lts/Services** | 🟡 Struktur vorhanden | ✅ Configure OK | ✅ Configure OK | - |
|
|
| **TetraIF** | 🟡 Teilweise | ✅ Configure OK | ✅ Configure OK | - |
|
|
| **Z-Module** | 🟡 Teilweise | ⚠️ Build-Fehler | ⚠️ Build-Fehler | Externe Dependencies fehlen |
|
|
|
|
---
|
|
|
|
## 🔧 Behobene Probleme
|
|
|
|
### 1. FileStatus-Enum-Konflikt (✅ Behoben)
|
|
**Problem**: `FileStatus` war bedingt definiert (int für BUILD_RTI=OFF, enum class für BUILD_RTI=ON)
|
|
**Lösung**: Einheitliche `enum class FileStatus` Definition für beide Varianten
|
|
**Files**: `flm_enums.hpp`, `flm_db.h`
|
|
|
|
### 2. QDebug operator<< für enum class (✅ Behoben)
|
|
**Problem**: `enum class` wird nicht implizit zu int konvertiert für QDebug
|
|
**Lösung**: Expliziter `operator<<` in `flm_enums.hpp` implementiert
|
|
**Files**: `flm_enums.hpp`
|
|
|
|
### 3. Qt6Location Missing (✅ Behoben)
|
|
**Problem**: Qt6Location Modul fehlte im Docker-Image
|
|
**Lösung**: `qtlocation` und `qtpositioning` zu aqt install-qt Command hinzugefügt
|
|
**Files**: `app/Dockerfile`
|
|
|
|
### 4. RTI Target-Kollisionen (✅ Behoben)
|
|
**Problem**: ALIAS Targets für `ddsftc`, `ddsfts`, `ddsconnector` kollidierten mit Module-level Definitions
|
|
**Ursache**:
|
|
- FindRTI.cmake erstellt nur Targets für: `nddscore`, `nddsc`, `nddscpp2`, `rtiroutingservice`
|
|
- `ddsftc`, `ddsfts`, `ddsconnector` existieren nicht in RTI 7.7.0
|
|
- Lts/DDS/FTC/CMakeLists.txt erstellt eigene INTERFACE Targets für diese Libraries
|
|
|
|
**Lösung**:
|
|
- ALIAS Targets nur für existierende RTI-Libraries erstellen (`nddscore`, `nddsc`, `nddscpp2`)
|
|
- KEINE INTERFACE-Placeholder für nicht-existierende Libraries
|
|
- Module definieren ihre eigenen Targets (ddsftc, ddsfts, ddsconnector)
|
|
|
|
**Files**: `CMakeLists.txt` (Zeilen 254-285)
|
|
|
|
### 5. Grantlee Template Namespace Resolution (✅ Behoben)
|
|
**Problem**: DTC-Generierung erzeugte falsche Namespace-Referenzen (`Core::CurrentRunningState` statt `::Core::CurrentRunningState`)
|
|
**Fehler**: `'CurrentRunningState' in namespace 'Core' does not name a type` (45 Fehler)
|
|
**Lösung**: Absolute Namespace-Resolution in Grantlee Templates (`::{{ namespace }}::{{ dt.type }}`)
|
|
**Files**: `svc_dtc.h.grantlee`, `svc_dtc_impl.cpp.grantlee`, `svc_dtc_impl.h.grantlee`
|
|
|
|
### 6. RTI Detection mit DDS_PATH (✅ Behoben)
|
|
**Problem**: CMake FindRTI.cmake fand RTI 7.7.0 nicht automatisch
|
|
**Lösung**: `DDS_PATH=/repo/external/rti_connext_dds-7.7.0/` setzen
|
|
**Status**: CMake findet RTI-Directory und Libraries (nddscore, nddsc, nddscpp2, rtiroutingservice)
|
|
**Files**: `cmake/FindRTI.cmake` (unterstützt DDS_PATH env var)
|
|
|
|
### 7. codegen_base Library Built (✅ Behoben)
|
|
**Status**: codegen_base erfolgreich als Shared Library gebaut (19/19 Targets)
|
|
**Problem**: ngl_codegen Executable nicht als separates Target gefunden
|
|
**Ursache**: ngl_codegen benötigt BUILD_GRANTLEE=ON und Grantlee5::Templates (Qt5-basiert)
|
|
**Nächster Schritt**: BUILD_GRANTLEE-Strategie entscheiden (Qt5 Grantlee oder Qt6-Alternative)
|
|
|
|
---
|
|
|
|
## ⚠️ Bekannte Probleme
|
|
|
|
### 1. ngl_codegen Build (🔴 Aktiv)
|
|
**Problem**: ngl_codegen Tool wird nicht gebaut
|
|
**Ursache**: BUILD_GRANTLEE=ON benötigt Grantlee5 (Qt5-basiert), nicht verfügbar in Qt6-Umgebung
|
|
**Optionen**:
|
|
- Option A: Grantlee5 im Docker-Image nachinstallieren (Qt5-Dependency)
|
|
- Option B: Code-Generation ohne Grantlee (manuell oder alternatives Template-System)
|
|
- Option C: ngl_codegen aus Qt5-Build kopieren
|
|
**Auswirkung**: DTC-Files können nicht neu generiert werden
|
|
|
|
### 2. Externe Dependencies fehlen (BUILD_RTI=ON)
|
|
**Fehler**: `/usr/bin/ld.bfd: cannot find -lsvcIsmCommon: No such file or directory`
|
|
**Betroffene Module**: IsmShared, andere Module mit externen Libraries
|
|
**Ursache**: Externe Libraries (svcIsmCommon, etc.) sind im Docker-Container nicht verfügbar
|
|
**Workaround**: BUILD_RTI=OFF für Build-Tests ohne RTI-Dependencies
|
|
**Lösung**: CI muss externe Dependencies bereitstellen oder optional verlinken
|
|
|
|
### 3. NGLLogger Include-Pfad Warning
|
|
**Warning**: `cc1plus: warning: /repo/build/Z/src/NGLLogger/Z/src/NGLLogger: No such file or directory`
|
|
**Ursache**: Falscher Include-Pfad in CMake-Konfiguration
|
|
**Status**: Kosmetisch, Build läuft trotzdem
|
|
|
|
### 4. jsonschema Application nicht gefunden
|
|
**Warning**: `Projects: application 'jsonschema' not found, cannot validate apps.json files`
|
|
**Status**: Kosmetisch, beeinflusst Build nicht
|
|
|
|
### 5. RTI Include Paths für MOC
|
|
**Problem**: MOC benötigt beide RTI Include-Pfade (ndds/hpp UND ndds)
|
|
**Status**: CMAKE_AUTOMOC_INCLUDE_DIRECTORIES korrekt konfiguriert, vererbt RTI_INCLUDE_DIRS
|
|
**Verbleibende Fehler**: 45 DTC-Compilation errors trotz Template-Fix
|
|
|
|
---
|
|
|
|
## 📝 Letzte Änderungen
|
|
|
|
### CMakeLists.txt (RTI Target-Kollisionen behoben)
|
|
```cmake
|
|
# Vorher (falsch):
|
|
IF(BUILD_RTI AND TARGET RTI::nddsc)
|
|
ADD_LIBRARY(ddsconnector INTERFACE) # Kollision!
|
|
ENDIF()
|
|
|
|
# Nachher (korrekt):
|
|
IF(BUILD_RTI AND TARGET RTI::nddsc)
|
|
# Nur ALIAS für existierende RTI-Libraries
|
|
ADD_LIBRARY(RTI::nddscore ALIAS RTI::nddscore)
|
|
ADD_LIBRARY(RTI::nddsc ALIAS RTI::nddsc)
|
|
ADD_LIBRARY(RTI::nddscpp2 ALIAS RTI::nddscpp2)
|
|
# ddsftc/ddsfts/ddsconnector werden von Modulen selbst erstellt
|
|
ENDIF()
|
|
```
|
|
|
|
### flm_enums.hpp (QDebug operator<<)
|
|
```cpp
|
|
#include <QDebug>
|
|
|
|
inline QDebug operator<<(QDebug debug, FileStatus status)
|
|
{
|
|
QDebugStateSaver saver(debug);
|
|
debug.nospace();
|
|
switch (status) {
|
|
case FileStatus::Valid: debug << "FileStatus::Valid"; break;
|
|
case FileStatus::Deleted: debug << "FileStatus::Deleted"; break;
|
|
default: debug << "FileStatus::Unknown(" << static_cast<int>(status) << ")"; break;
|
|
}
|
|
return debug;
|
|
}
|
|
```
|
|
|
|
### app/Dockerfile (Qt6Location)
|
|
```dockerfile
|
|
RUN python3 -m aqt install-qt linux desktop 6.8.3 gcc_64 \
|
|
-m qtbase qtdeclarative qttools qtcharts qtdatavis3d \
|
|
qtlocation qtpositioning \
|
|
--outputdir /opt/Qt
|
|
```
|
|
|
|
---
|
|
|
|
## 🧪 Build-Status
|
|
|
|
### BUILD_RTI=OFF
|
|
- ✅ Configure: Erfolgreich
|
|
- ⚠️ Build: Teilweise erfolgreich (externe Dependencies fehlen)
|
|
|
|
### BUILD_RTI=ON
|
|
- ✅ Configure: Erfolgreich (nach Target-Kollision-Fix)
|
|
- ⚠️ Build: Teilweise erfolgreich (externe Dependencies fehlen)
|
|
|
|
---
|
|
|
|
## 📋 Nächste Schritte
|
|
|
|
1. **Externe Dependencies klären**: svcIsmCommon und andere externe Libraries verfügbar machen
|
|
2. **Lts/Plugins Migration**: Verbleibende Untermodule migrieren
|
|
3. **Lts/Services Migration**: Verbleibende Untermodule migrieren
|
|
4. **TetraIF abschließen**: Restliche Migration durchführen
|
|
5. **Vollständigen Build testen**: Mit allen verfügbaren Dependencies
|
|
|
|
---
|
|
|
|
## 📌 Wichtige Hinweise
|
|
|
|
- **qt5-before/qt5-legatus-legacy**: READ-ONLY, keine Änderungen erlaubt!
|
|
- **Git Hooks**: `entire hooks git post-commit` verursacht lange Commit-Laufzeiten
|
|
- **Submodule**: `qt-migration-legatus` zeigt auf `feature/qt6-migration-basis-modules`
|
|
- **Externe Dependencies**: Liegen in `./external/` (RTI, ArcGIS)
|
|
|
|
---
|
|
|
|
**Letztes Update**: 2026-09-30
|
|
**Nächster Checkpoint**: RTI Target-Kollisionen behoben
|
|
|
|
---
|
|
|
|
## 📊 RTI 7.7 Migration - Detaillierte Analyse
|
|
|
|
### BUILD_RTI Dateien (85 Dateien identifiziert)
|
|
|
|
#### Core Infrastructure (4 Dateien)
|
|
- `include/Core/core_types.h`
|
|
- `Lts/Common/LtsElevation/lts_elevation_manager.{cpp,h}`
|
|
- `Lts/Common/LtsSession/lts_session.{cpp,h}`
|
|
- `Lts/Common/LtsSession/lts_session_manager.{cpp,h}`
|
|
- `Lts/Common/LtsSession/lts_session_data_dds.{cpp,h}`
|
|
|
|
#### DDS Core Module (12 Dateien)
|
|
- `Lts/DDS/Core/pacemaker.{cpp,h}`
|
|
- `Lts/DDS/Core/topic_lock_master.h`
|
|
- `Lts/DDS/DDSConnector/dds_connector.{cpp,h}`
|
|
- `Lts/DDS/Generic/generic_base.h`
|
|
- `Lts/DDS/Generic/subscriber_listener.h`
|
|
- `Lts/DDS/FTS/{connext,generic_fts,generic_fts_impl,generic_fts_internal}.{h,cpp}`
|
|
- `Lts/DDS/Routing/routing_plugin.h`
|
|
|
|
#### DTC/DTS Generierung (1 Datei + generierte)
|
|
- `include/DDS/DTC/generic_dtc.h`
|
|
- Build-generierte DTC-Dateien in `build_rti_on/Lts/DDS/DTC/`
|
|
|
|
#### Service Module (15 Dateien)
|
|
**AudioVideoManagement:**
|
|
- `include/AudioVideoManagement/{avm_enums.hpp,avm_export.h,svcavmcommon_export.h}`
|
|
- `Lts/Services/AudioVideoManagement/svcavmcommon_export.h`
|
|
- `Lts/Services/OperatorManagement/opm_dtc_impl_custom.cpp`
|
|
|
|
**ProjectDataManagement:**
|
|
- `include/ProjectDataManagement/pdm_translation.h`
|
|
- `Lts/Services/ProjectDataManagement/stubs/{pdm_db_stub,pdm_enums_stub,pdm_stub}.hpp`
|
|
- `Lts/Services/ProjectDataManagement/stubs/ProjectDataManagement/pdm.hpp`
|
|
|
|
**RoutingServiceNG:**
|
|
- `Lts/Services/RoutingServiceNG/stubs/{routing_plugin_stub.h,topic_type_plugin_stub.hpp}`
|
|
|
|
**Andere Services:**
|
|
- `include/Evaluations/evl_db_impl.h`
|
|
- `include/ExerciseEventManagement/{eem_export.h,eem_types.h}`
|
|
- `include/ExerciseManagement/exm_db.h`
|
|
- `include/FileManagement/{flm_db.h,flm_db_impl.h,flm_enums.hpp,flm_ftc.h}`
|
|
- `include/FilterManagement/{flt_dts.h,flt_fts.h}`
|
|
- `include/GuezNasat/svcgnacommon_export.h`
|
|
- `include/InfrastructureManagement/ism_db_impl.h`
|
|
- `include/OperatorManagement/opm_db.h`
|
|
- `include/ParticipantManagement/ppm_db_impl.h`
|
|
- `include/RecordingManagement/rec_db_impl.h`
|
|
- `include/Services/PresentationManagement/pre_ftc.h`
|
|
|
|
#### LtsUtils & Widgets (4 Dateien)
|
|
- `include/LtsUtils/LtsUtilsCore/data_modification_enum.h`
|
|
- `include/LtsUtilsGuiDds/ltsutilsguidds_export.h`
|
|
- `Lts/Common/LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/{ltsutilsdds_export.h,request_helper.{cpp,h}}`
|
|
- `Lts/Common/LtsWidgets/ltswidgets_export.h`
|
|
|
|
#### Proxies (9 Dateien)
|
|
- `Lts/Proxies/CombatNetRadio/Helper/cnr_frequency_planning_helper.{cpp,h}`
|
|
- `Lts/Proxies/DifferentialGPS/tetra_if.cpp`
|
|
- `Lts/Proxies/TrainingAreaBase/{dds_handler,main_handler,recv_from_dds_aes}.{cpp,h}`
|
|
- `Lts/Proxies/TrainingAreaBase/pdm_handler.h`
|
|
- `Lts/Proxies/TrainingAreaBase/stubs/{tab_db_stub,tab_enums_stub,tab_stub}.hpp`
|
|
- `Lts/Proxies/TrainingAreaBase/stubs/tab_topic_type_plugin_stub.cpp`
|
|
|
|
#### Plugins (4 Dateien)
|
|
- `Lts/Plugins/OperatorManagement/Gui/Common/operator_dialog_model.{cpp,h}`
|
|
- `Lts/Plugins/ParticipantManagement/Gui/ParticipantOrgChart/org_chart_main.{cpp,h}`
|
|
|
|
#### Tests (3 Dateien)
|
|
- `tests/test_build_rti_guards.cpp`
|
|
- `tests/test_rti_integration.cpp`
|
|
- `tests/test_saa_telegrams.cpp`
|
|
|
|
#### Export Header (12 Dateien)
|
|
- `include/LtsProjectionWorkstation/ltsprojectionworkstation_export.h`
|
|
- `include/LtsScriptTimeline/ltsscripttimeline_export.h`
|
|
- `include/DDS/Generic/ddsgen_export.h`
|
|
|
|
### Migrations-Kategorien
|
|
|
|
#### 🔴 REMOVE (zu entfernen)
|
|
- Legacy RTI 5.3.1 generierte Dateien (falls vorhanden)
|
|
- Inkompatible DDS-Code-Passagen
|
|
|
|
#### 🟡 KEEP_OFF_ONLY (nur mit BUILD_RTI=OFF)
|
|
- Export-Header Dateien (*_export.h)
|
|
- Stub-Dateien für DTC/DTS
|
|
- Wrapper-Klassen ohne RTI-spezifische API
|
|
|
|
#### 🟠 PATCH (anzupassen)
|
|
- **Prio 1**: DDS Core (pacemaker, topic_lock_master, dds_connector)
|
|
- **Prio 2**: FTS/FTC Implementierungen
|
|
- **Prio 3**: Service-DB-Impls (flm_db_impl, evl_db_impl, etc.)
|
|
- **Prio 4**: Routing Plugin
|
|
- **Prio 5**: Proxy DDS Handler
|
|
|
|
#### 🟢 VERIFY (zu verifizieren)
|
|
- Enum-Definitionen (flm_enums.hpp, eem_types.h, etc.)
|
|
- Type-Translation-Header (pdm_translation.h)
|
|
- Test-Dateien
|
|
|
|
### Fortschritt
|
|
|
|
| Phase | Status | Dateien | Beschreibung |
|
|
|-------|--------|---------|--------------|
|
|
| **Phase 1: Analyse** | ✅ Abgeschlossen | 85 | Alle BUILD_RTI Dateien identifiziert und kategorisiert |
|
|
| **Phase 2: DDS Core** | ⏳ Ausstehend | ~12 | Pacemaker, DDSConnector, FTS/FTC |
|
|
| **Phase 3: Services** | ⏳ Ausstehend | ~25 | DB-Impls, DTC-Integration |
|
|
| **Phase 4: Proxies** | ⏳ Ausstehend | ~9 | TAB, CNR, TetraIF |
|
|
| **Phase 5: Tests** | ⏳ Ausstehend | 3 | Integrationstests anpassen |
|
|
|
|
### Nächste Schritte
|
|
|
|
1. ✅ **Inventur abgeschlossen** - 85 BUILD_RTI Dateien identifiziert
|
|
2. ✅ **Kategorisierung erstellt** - Prioritäten festgelegt
|
|
3. ⏳ **DDS Core migrieren** - Foundation für alle anderen Module
|
|
4. ⏳ **DTC/DTS Generierung** - Grantlee Templates final anpassen
|
|
5. ⏳ **Service-Implementierungen** - DB-Impls migrieren
|
|
6. ⏳ **Proxy-Layer** - TAB, CNR, TetraIF
|
|
7. ⏳ **Integrationstests** - BUILD_RTI=ON validieren
|
|
|