fastddsgen template asks for headers which doesn't exist or which are misplaced in the install process
Closed this issue · 1 comments
I am trying to understand and study the eProsima at my work.
I am trying to compile the minimal working example in the website:
https://fast-dds.docs.eprosima.com/en/latest/fastdds/getting_started/simple_app/simple_app.html
I am using Ubuntu 22.04. Note also that compilation of Fast-DDS only works with colcon, and fails with CMake. But this is not the problem I want to address here. The problem at hand is fastddsgen creates a header which asks for other header files with erroneous paths or names. Or so far as I can tell, there are missing headers I should have. I have tried it installing fast-dds with and without python bindings.
This stg file asks for a file :
src/fastddsgen/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg:#include <fastcdr/cdr/fixed_size_string.hpp>
whose name is actually found at found at:
#include <fastcdr/utils/fixed_size_string.hpp>
I have changed TypesHeader.stg to point to the utils location instead of fastcdr/cdr/fixed_size_string.hpp.
However, this same file, in the following line, asks for an optional.hpp header file at "fastcdr/xcdr/optional.hpp"
/home/<user_home>/workspace_DDSHelloWorld/src/HelloWorld.h:33:10: fatal error: fastcdr/xcdr/optional.hpp: No such file or directory
Well, this one is trickier, since grep doesn't find any other reference to this file in my directory, with the exception of the template:
G7-7588:~/Fast-DDS-python$ grep -r optional.hpp
src/fastddsgen/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg:#include <fastcdr/xcdr/optional.hpp>
build/fastddsgen/src/main/java/com/eprosima/fastcdr/idl/templates/TypesHeader.stg:#include <fastcdr/xcdr/optional.hpp>
build/fastddsgen/build/resources/main/com/eprosima/fastcdr/idl/templates/TypesHeader.stg:#include <fastcdr/xcdr/optional.hpp>
find also doesn't find any file there.
G7-7588:~/Fast-DDS-python$ find /Fast-DDS-python -name optional.hpp/Fast-DDS-python$
G7-7588:
I am clueless with this other problem.
Thanks for the report, @vitoramj
The latest Fast DDS-Gen release has just changed the major version. According to the Semantic versioning followed in eProsima's repositories, this implies a major API break. Consequently, you cannot expect eProsima's products to build against this new version until the release process for every eProsima product is complete. Please, if you are building Fast DDS, use the latest stable branch, 2.11.x and the versions specified for that specific branch. Fast DDS master is not expected to work currently with Fast CDR v2.0.0 nor Fast DDS-Gen v3.0.0 until the migration to the new API is complete.
Please, just ensure that in your workspace you are using the stable versions/branches for Fast CDR and Fast DDS-Gen. Fast CDR v1.1.1 and Fast DDS-Gen v2.5.1 are the latest releases working with the current Fast DDS version.
I am going to close this issue as this is expected behavior due to the migration process to a new API.