rticommunity / rticommunity/rticonnextdds-examples
Compile and Run issues with /examples/recording_service/pluggable_storage/cpp/ running on Windows.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 148
- Forks
- 153
- PR merge metrics
- No merged PRs in 30d
Description
Information
- RTI Product: RTI Connext
- Version: 6.0.1
- Operating system: Windows 10
- Compiler: VS2017
- Compiler version:
- Additional information:
What is the current behavior?
a) cmake step to build not functional in Windows x64 world. cmake assumes x86.
Windows build needs Arch A64
cmake -DCONNEXTDDS_DIR=%NDDSHOME% -DCONNEXTDDS_ARCH=x64Win64VS2015 -A x64 -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
Without cmake architecture -A xx Link fails due to x64 compile and x86 link.
b) In addition the windows compile fails.
Windows VS 2017 needs NOMINMAX to be defined. I defined it in FileStorageReader.cxx line 12..
#ifdef WIN32
#define NOMINMAX 1
#endif
#include "FileStorageReader.hpp"
c) The run commands are incorrect foe VS2017. VS2017 puts binaries in build\Release.
Therefore for Windows world the it has to be as follows:
cd build/Release
build\Release\HelloMsg_publisher 0
build\Release\HelloMsg_subscriber 0
d) Given above the command to run the recording and replay services are also incorrect. It needs to look like the following for Windows:
cd build/Release
rtirecordingservice -cfgFile ....\pluggable_storage_example.xml -cfgName CppFileWriterExample -domainIdBase 0
cd build/Release
rtireplayservice -cfgFile ....\pluggable_replay_example.xml -cfgName CppFileReaderExample -domainIdBase 0
e) When doing playback. Playback fails because output .dat file is written specifically for Linux. Therefore when built and run on Windows the line terminator is incorrect.
My correction was as follows:
In FileStorage writer Lines 225 ..
#ifndef WIN32
if (prefix != std::string("")) {
#else
if (prefix != std::string("\r")) {
#endif
f) With this it all works on Windows. However, the build has WARNINGS. I had to make following changes to both RTI and example files as follows:
F:\RTI\rti_connext_dds-6.0.1\include\rti\recording\storage\detail\StorageStreamReaderForwarder.hpp
Line 90 needs to be:
*array_length = (int)forwarder->sample_seq_.size();
F:\RTI\rti_connext_dds-6.0.1\include\rti\recording\storage\detail\StorageStreamInfoReaderForwarder.hpp
Line 93 needs to be:
*array_length = (int)forwarder->sample_seq_.size();
D:\NDDS\Irwin\Support\Case46885RecorderCrash\pluggable_storage\cpp\FileStorageWriter.cxx
Line 140 needs to be:
const int32_t count = (int)sample_seq.size();
Line 182: needs to be:
const int32_t count = (int32_t)sample_seq.size();
Steps to reproduce the issue.
Just run it out of the box on Windows.
What is the expected behavior?
Suggested solutions
See above.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in /examples/recording_service/pluggable_storage/cpp/ by reviewing its CMake configuration and Windows run instructions, then inspect FileStorageReader.cxx and FileStorageWriter.cxx. Reproduce the x64 build and recording/replay commands on Windows; done means the example compiles without the reported warnings and playback succeeds with the generated .dat file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- backend, build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100