283 lines
9.4 KiB
Markdown
283 lines
9.4 KiB
Markdown
# DDS/RTI Migration - Continuation Prompt
|
|
|
|
## Context
|
|
|
|
This prompt continues the Qt6 migration work for the Lts/DDS module with RTI Connext DDS 7.7 integration. The core DDS targets (ddscore, ddsftccore, ddsQoS, ddsconnector, ddsgen) have been successfully migrated and build with `BUILD_RTI=ON`.
|
|
|
|
**Current Blocker:** ddsfts module blocked by IDL duplicate symbol definitions in ProjectDataManagement module.
|
|
|
|
## Current Status (Updated)
|
|
|
|
### ✅ Completed
|
|
- Docker build environment configured (Ubuntu 26.04, Qt 6.10.2, RTI 7.7.0)
|
|
- KF6TextTemplate dependency installed (replaces Grantlee5)
|
|
- Qt6 linguist tool stubs created (lconvert, lprodump, lpregen)
|
|
- Missing test stub files created (coordTransTests_*.cpp)
|
|
- DDS core targets build successfully:
|
|
- ddscore
|
|
- ddsftccore
|
|
- ddsQoS
|
|
- ddsconnector
|
|
- ddsgen (IDL generator)
|
|
|
|
### ❌ Blocked
|
|
- **ddsfts**: Blocked by ProjectDataManagement IDL conflicts (duplicate symbols)
|
|
- **ProjectDataManagement module**: Not yet migrated to Qt6
|
|
|
|
### 📋 Reports Generated
|
|
- `DDS_RTI_MIGRATION_REPORT.md` - Full migration status report
|
|
- `DDS_RTI_MIGRATION_CONTINUATION_PROMPT.md` - This file (being updated)
|
|
|
|
## Remaining Tasks
|
|
|
|
### Priority 1: ddsfts Module - IDL Duplicate Symbol Resolution (CRITICAL)
|
|
|
|
**Location:** `Lts/DDS/FTS/` and `Lts/Services/ProjectDataManagement/`
|
|
|
|
**Blocker:** IDL duplicate symbol definitions between pdm.idl and pdm_enums.idl
|
|
|
|
**Error Message:**
|
|
```
|
|
ERROR: pdm.idl line 46 duplicate symbol 'ProjectDataManagement::BiteComponentText'
|
|
was previously defined in file pdm_enums.idl line 447
|
|
ERROR: pdm.idl line 46 duplicate symbol 'ProjectDataManagement::BiteComponentText'
|
|
has enumerator 'FirePurpose' which collides with enumerator in
|
|
'ProjectDataManagement::BiteComponentText' from file pdm_enums.idl line 447
|
|
```
|
|
|
|
**Affected Enumerators:**
|
|
- BiteComponentText (duplicate type definition)
|
|
- FirePurpose (enumerator collision)
|
|
- GearClass (enumerator collision)
|
|
- EventType (enumerator collision)
|
|
- Multiple other enum values
|
|
|
|
**Required Actions:**
|
|
1. **Audit IDL files for duplicates:**
|
|
```bash
|
|
cd Lts/Services/ProjectDataManagement
|
|
grep -n "BiteComponentText" pdm.idl pdm_enums.idl
|
|
grep -n "enum.*FirePurpose" pdm.idl pdm_enums.idl
|
|
grep -n "enum.*GearClass" pdm.idl pdm_enums.idl
|
|
grep -n "enum.*EventType" pdm.idl pdm_enums.idl
|
|
```
|
|
|
|
2. **Resolve duplicates:**
|
|
- Remove duplicate type/enum definitions from pdm.idl
|
|
- Keep canonical definitions in pdm_enums.idl
|
|
- Add `#include "pdm_enums.idl"` to pdm.idl if needed
|
|
- Ensure all modules reference canonical definitions
|
|
|
|
3. **Verify IDL compilation:**
|
|
```bash
|
|
cd build4
|
|
make svcPdmCommon_autogen_timestamp_deps
|
|
```
|
|
|
|
4. **Rebuild ddsfts:**
|
|
```bash
|
|
make -j8 ddsfts
|
|
```
|
|
|
|
**Files to Fix:**
|
|
- `Lts/Services/ProjectDataManagement/pdm.idl`
|
|
- `Lts/Services/ProjectDataManagement/pdm_enums.idl`
|
|
- `Lts/Plugins/ProjectDataManagement/` (dependent module)
|
|
|
|
### Priority 2: ProjectDataManagement Module Migration
|
|
|
|
**Locations:**
|
|
- `Lts/Plugins/ProjectDataManagement/`
|
|
- `Lts/Services/ProjectDataManagement/`
|
|
|
|
**Migration Checklist:**
|
|
- [ ] Inventory all Qt5 API usage (QByteArray::number, deprecated signals/slots, etc.)
|
|
- [ ] Update CMakeLists.txt for Qt6 (find_package(Qt6 COMPONENTS ...))
|
|
- [ ] Verify KTextTemplate configuration for any IDL codegen
|
|
- [ ] Check for AUTOMOC timing issues with generated files
|
|
- [ ] Update include paths if necessary
|
|
- [ ] Build with BUILD_RTI=ON to verify compatibility
|
|
- [ ] Run any existing tests
|
|
|
|
**Qt5 API Patterns to Search:**
|
|
```bash
|
|
# In ProjectDataManagement directories
|
|
grep -r "QByteArray::number" --include="*.h" --include="*.cpp"
|
|
grep -r "QRegExp" --include="*.h" --include="*.cpp"
|
|
grep -r "QDesktopWidget" --include="*.h" --include="*.cpp"
|
|
grep -r "QApplication::desktop" --include="*.h" --include="*.cpp"
|
|
```
|
|
|
|
**CMake Updates Needed:**
|
|
```cmake
|
|
# Qt5 pattern (legacy)
|
|
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
|
|
|
|
# Qt6 pattern (migrated)
|
|
find_package(Qt6 REQUIRED COMPONENTS Core Widgets)
|
|
qt_standardize_properties()
|
|
```
|
|
|
|
### Priority 3: Project Plugin Qt6 Migration
|
|
|
|
**Affected Plugins:**
|
|
- `Lts/Plugins/ProjectEtsPlugin/`
|
|
- `Lts/Plugins/ProjectAhtcPlugin/`
|
|
- `Lts/Plugins/ProjectPluginBase/`
|
|
- `Lts/Plugins/Project*Plugin/`
|
|
|
|
**Known Error:** `moc "Undefined interface"`
|
|
|
|
**Investigation Steps:**
|
|
1. Check Q_PLUGIN_METADATA declarations
|
|
2. Verify interface classes have Q_DECLARE_INTERFACE
|
|
3. Check for missing Q_OBJECT macros
|
|
4. Verify AUTOMOC is enabled in CMakeLists.txt
|
|
5. Check for circular dependencies between plugins
|
|
|
|
**Common Qt6 Migration Issues:**
|
|
- Q_PLUGIN_METADATA requires QJsonDocument in Qt6
|
|
- Interface UUIDs must be consistent
|
|
- Plugin loading may require Q_PLUGIN_IMPORT in addition to Q_PLUGIN_METADATA
|
|
|
|
---
|
|
|
|
## Build Commands
|
|
|
|
### Standard DDS Build (Working)
|
|
```bash
|
|
docker run --rm -it \
|
|
-v /home/torsten/swy/sandbox:/workspace \
|
|
-v /home/torsten/swy/sandbox/rti_license.dat:/workspace/rti_license.dat:ro \
|
|
legatus-qt6-build:latest \
|
|
bash -c "cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus && \
|
|
mkdir -p build && cd build && \
|
|
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 .. && \
|
|
make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsgen"
|
|
```
|
|
|
|
### Full DDS Build (Including ddsfts - After IDL Fix)
|
|
```bash
|
|
docker run --rm -it \
|
|
-v /home/torsten/swy/sandbox:/workspace \
|
|
-v /home/torsten/swy/sandbox/rti_license.dat:/workspace/rti_license.dat:ro \
|
|
legatus-qt6-build:latest \
|
|
bash -c "cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus && \
|
|
mkdir -p build && cd build && \
|
|
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 .. && \
|
|
make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsgen ddsfts"
|
|
```
|
|
|
|
### IDL Investigation Commands (Host)
|
|
```bash
|
|
cd /home/torsten/swy/sandbox/qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement
|
|
|
|
# Find duplicate definitions
|
|
grep -n "BiteComponentText" pdm.idl pdm_enums.idl
|
|
grep -n "enum.*FirePurpose" pdm.idl pdm_enums.idl
|
|
grep -n "enum.*GearClass" pdm.idl pdm_enums.idl
|
|
grep -n "enum.*EventType" pdm.idl pdm_enums.idl
|
|
|
|
# Check include relationships
|
|
grep -n "#include" pdm.idl
|
|
grep -n "#include" pdm_enums.idl
|
|
|
|
# View specific lines
|
|
sed -n '40,50p' pdm.idl
|
|
sed -n '440,455p' pdm_enums.idl
|
|
```
|
|
|
|
### ProjectDataManagement Build (After Migration)
|
|
```bash
|
|
docker run --rm -it \
|
|
-v /home/torsten/swy/sandbox:/workspace \
|
|
-v /home/torsten/swy/sandbox/rti_license.dat:/workspace/rti_license.dat:ro \
|
|
legatus-qt6-build:latest \
|
|
bash -c "cd /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus && \
|
|
mkdir -p build && cd build && \
|
|
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 .. && \
|
|
make -j8 ProjectDataManagement"
|
|
```
|
|
|
|
---
|
|
|
|
## Known Issues Reference
|
|
|
|
### Issue: ddsfts Build Failure - IDL Duplicate Symbols (CRITICAL)
|
|
- **Severity:** Critical (blocks complete DDS module build)
|
|
- **Root Cause:** Duplicate type/enum definitions in pdm.idl and pdm_enums.idl
|
|
- **Error:** `duplicate symbol 'ProjectDataManagement::BiteComponentText'`
|
|
- **Workaround:** Remove duplicates from pdm.idl, keep canonical in pdm_enums.idl
|
|
- **Files Involved:**
|
|
- `Lts/Services/ProjectDataManagement/pdm.idl`
|
|
- `Lts/Services/ProjectDataManagement/pdm_enums.idl`
|
|
- **Status:** Requires manual IDL cleanup
|
|
|
|
### Issue: ProjectDataManagement Not Migrated
|
|
- **Severity:** High (blocks ddsfts, affects Project plugins)
|
|
- **Root Cause:** Not yet started in current migration wave
|
|
- **Workaround:** None - requires full Qt6 migration
|
|
- **Files Involved:** `Lts/Plugins/ProjectDataManagement/`, `Lts/Services/ProjectDataManagement/`
|
|
- **Status:** Pending migration
|
|
|
|
### Issue: Project Plugin moc Errors
|
|
- **Severity:** Medium (affects plugin loading, not DDS core)
|
|
- **Root Cause:** Qt6 plugin interface changes
|
|
- **Workaround:** Build without plugins or fix Q_PLUGIN_METADATA declarations
|
|
- **Files Involved:** `Lts/Plugins/Project*Plugin/`
|
|
- **Status:** Pending investigation
|
|
|
|
---
|
|
|
|
## Testing Guidelines
|
|
|
|
### After ddsfts Build
|
|
1. Verify libddsfts.so is created
|
|
2. Check for undefined symbols: `nm -D libddsfts.so | grep U`
|
|
3. Test plugin loading if applicable
|
|
|
|
### After ProjectDataManagement Migration
|
|
1. Build ddsfts and verify success
|
|
2. Run any ProjectDataManagement unit tests
|
|
3. Verify pdm.idl codegen produces expected headers
|
|
4. Test integration with DDS module
|
|
|
|
### After Project Plugin Migration
|
|
1. Build all Project*Plugin targets
|
|
2. Verify plugins load at runtime
|
|
3. Test plugin interfaces with host application
|
|
4. Check for moc warnings in build output
|
|
|
|
---
|
|
|
|
## Success Criteria
|
|
|
|
### ddsfts Module
|
|
- [ ] IDL duplicate symbols resolved in pdm.idl/pdm_enums.idl
|
|
- [ ] ddsfts target builds without errors
|
|
- [ ] libddsfts.so is created
|
|
- [ ] No undefined symbol errors
|
|
- [ ] pdm.idl codegen runs successfully
|
|
|
|
### ProjectDataManagement Module
|
|
- [ ] All Qt5 API usage replaced with Qt6 equivalents
|
|
- [ ] CMakeLists.txt uses Qt6 find_package
|
|
- [ ] Module builds with BUILD_RTI=ON
|
|
- [ ] No moc warnings or errors
|
|
- [ ] pdm.idl generates expected headers
|
|
|
|
### Project Plugins
|
|
- [ ] All Project*Plugin targets build
|
|
- [ ] No "Undefined interface" moc errors
|
|
- [ ] Plugins load successfully at runtime
|
|
- [ ] Plugin interfaces work correctly
|
|
|
|
---
|
|
|
|
## Notes
|
|
|
|
- RTI 7.7 requires C++17 (not C++23)
|
|
- Empty rti_license.dat is valid for development
|
|
- Code generation must happen during build (no pre-generated files)
|
|
- AUTOMOC timing issues require SKIP_AUTOMOC + manual QT6_WRAP_CPP for generated files
|
|
- RTI headers conflict with stub definitions - use #ifdef BUILD_RTI guards |