Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/BUILD_RTI_VALIDATION_REPORT.md
T

7.7 KiB

BUILD_RTI=ON Validation Report

Executive Summary

The Lts/DDS module has been successfully migrated to Qt6 with RTI Connext DDS 7.7 integration enabled (BUILD_RTI=ON). All core DDS targets compile and link successfully in the Docker build environment.

Date: 2026-09-06
Build Environment: Ubuntu 26.04, Qt 6.10.2, RTI Connext DDS 7.7
C++ Standard: C++17 (required for RTI 7.7 compatibility)


Build Results

Successfully Built Targets

Target Library Size Status
ddscore libddscore.so 4.3M ✅
ddsftccore libddsftccore.so 550K ✅
ddsQoS libddsQoS.so 1.6M ✅
ddsconnector libddsconnector.so 4.4M ✅
ddsgen libddsgen.so 3.1M ✅

Build Configuration

# Docker image
legatus-qt6-build:latest

# CMake configuration
cmake -DBUILD_RTI=ON -DCMAKE_CXX_STANDARD=17 ..

# RTI License
/home/torsten/swy/sandbox/rti_license.dat (empty development license)

Issues Resolved

1. Qt5 API Deprecations (Qt6 Migration)

Problem: QByteArray::number() is deprecated/removed in Qt6

Solution: Replace with QString::number(value).toLatin1()

Files Modified:

  • Lts/DDS/FTC/generic_ftc_impl.h (2 occurrences)
  • Lts/DDS/FTS/connext.h (1 occurrence)
  • Lts/DDS/Routing/routing_plugin.h (1 occurrence)
  • Lts/DDS/Generic/generic_data_reader.h (1 occurrence)

2. C++ Standard Compatibility

Problem: RTI 7.7 requires C++17, not C++23

Solution: Changed CMAKE_CXX_STANDARD from 23 to 17 in parent CMakeLists.txt (line 99)

3. AUTOMOC vs Codegen Timing

Problem: AUTOMOC runs at configure time, but codegen macros run at build time. Generated files like core_dtc.h don't exist when moc tries to process them.

Solution:

# Skip AUTOMOC for generated files
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/core_dtc.h SKIP_AUTOMOC ON)

# Manually invoke QT6_WRAP_CPP with proper dependencies
qt6_wrap_cpp(NGLEXTRA_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/core_dtc.h
    OPTIONS -I${CMAKE_SOURCE_DIR}/include -I${CMAKE_SOURCE_DIR}/Lts)

4. RTI Library Path Resolution

Problem: RTI libraries exist on host at /home/torsten/swy/sandbox/external/rti_connext_dds-7.7.0/lib/x64Linux4gcc8.5.0/ but must be mounted to /workspace/external/rti_connext_dds-7.7.0 in container.

Solution: Updated cmake/FindRTI.cmake to search ${CMAKE_SOURCE_DIR}/../../../external/ path

5. PartitionType Enum Conversion

Problem: Both LtsSession::PartitionType and IDL::PartitionType exist with different naming conventions (SCREAMING_SNAKE_CASE vs PascalCase)

Solution: Added conversion functions in lts_session_data_dds.h/.cpp:

IDL::PartitionType toIdlPartitionType(PartitionType type);
PartitionType toPartitionType(IDL::PartitionType type);

6. Missing Fetcher Class

Problem: Legacy version has Fetcher inline helper class and m_guiPluginInterfaces member that were missing from migrated version.

Solution: Added to lts_session_data_dds.h:

  • m_guiPluginInterfaces member variable
  • getForeignGuiInterface<S>() template method
  • Fetcher class inline definition

7. Missing generic_dtc_impl.h

Problem: File was missing from migrated version's include/DDS/DTC/ directory, causing incomplete type errors.

Solution: Copied from legacy version to migrated version.

8. RTI Header Conflicts

Problem: generic_dtc.h had stub definitions for LoanedSamples and SampleInfo that conflicted with RTI's actual headers.

Solution: Added conditional compilation guards:

#ifdef BUILD_RTI
    #include <dds/sub/LoanedSamples.hpp>
    #include <dds/sub/SampleInfo.hpp>
#else
    // Stub definitions for BUILD_RTI=OFF
#endif

9. DataModification Enum Conflict

Problem: Stub enum in generic_dtc.h (Added, Modified, Removed) conflicted with LtsUtilsCore/data_modification_enum.h (eAdded, eModified, eRemoved).

Solution: Only define stub enum when BUILD_RTI=OFF.


File Changes Summary

File Change Type Description
CMakeLists.txt Modified C++17 standard, RTI path resolution
cmake/FindRTI.cmake Modified Added external/ directory search path
Lts/DDS/Core/CMakeLists.txt Modified AUTOMOC skip, manual QT6_WRAP_CPP
Lts/DDS/QosProfile/CMakeLists.txt Modified Fixed include path
Lts/DDS/DDSConnector/CMakeLists.txt Modified INTERFACE to PUBLIC include
Lts/Common/LtsSession/CMakeLists.txt Modified Added ddsQoS link, fixed include path
Lts/Common/LtsSession/lts_session_data_dds.h Modified Added members, Fetcher class, conversion functions
Lts/Common/LtsSession/lts_session_data_dds.cpp Modified Implemented conversion functions
Lts/DDS/FTC/generic_ftc_impl.h Modified Qt5 API fixes
Lts/DDS/FTS/connext.h Modified Qt5 API fix
Lts/DDS/Routing/routing_plugin.h Modified Qt5 API fix
Lts/DDS/Generic/generic_data_reader.h Modified Qt5 API fix
include/DDS/Core/core.hpp Renamed → core.hpp.stub (was blocking generated file)
include/DDS/Core/core_dtc_types.h Renamed → core_dtc_types.h.stub (was blocking generated files)
include/DDS/DTC/generic_dtc_impl.h Added Copied from legacy
include/DDS/DTC/generic_dtc.h Modified Conditional RTI headers, enum fix
rti_license.dat Created Empty development license

Known Issues (Out of Scope)

1. ddsfts Build Failure

Status: ❌ Not Built
Cause: Missing pdm.idl from ProjectDataManagement module

Details: The ddsfts target depends on IDL files from the ProjectDataManagement module which is not part of the DDS migration scope. The build fails with:

File pdm.idl not found

Resolution Path:

  • Requires ProjectDataManagement module to be migrated first
  • Or create stub pdm.idl for build purposes only

2. ProjectDataManagement Module

Location:

  • Lts/Plugins/ProjectDataManagement/
  • Lts/Services/ProjectDataManagement/

Status: Not migrated
Dependencies: Required by ddsfts and other Project-related plugins

Known Issues:

  • pdm.idl not available for DDS codegen
  • Potential Qt5 API usage (unverified)
  • CMake configuration not updated for Qt6

3. Project Plugin Qt6 Migration Issues

Affected Plugins:

  • ProjectEtsPlugin
  • ProjectAhtcPlugin
  • ProjectPluginBase
  • Other Project* plugins

Error Type: moc "Undefined interface" errors
Status: Pre-existing issues, unrelated to DDS/RTI migration


Validation Checklist

  • RTI license file created and accessible
  • RTI libraries mounted and discoverable by CMake
  • C++17 standard enforced
  • Qt5 API deprecations resolved
  • Code generation runs during build (verified via nddsgen warnings in output)
  • No stub/placeholder files for generated code
  • ddscore builds successfully
  • ddsftccore builds successfully
  • ddsQoS builds successfully
  • ddsconnector builds successfully
  • ddsgen builds successfully
  • ddsfts builds (blocked by pdm.idl)
  • ProjectDataManagement migrated (out of scope)
  • Project plugins Qt6 migration (out of scope)

Recommendations

  1. For ddsfts: Coordinate with ProjectDataManagement team to migrate pdm.idl or create temporary stub
  2. For Project Plugins: Address Qt6 migration issues in parallel workstream
  3. For Future RTI Updates: Document RTI version compatibility matrix (RTI 7.7 → C++17)
  4. For Codegen: Consider caching generated files to speed up clean builds

Contact

For questions about this migration, refer to:

  • Migration prompt: ./prompts/combined-migration-subfolder-dds-rti-compact.prompt.md
  • Build documentation: ./app/Dockerfile
  • RTI configuration: ./cmake/FindRTI.cmake