Skip to content

Build errors when using extended headers #1982

@jphickey

Description

@jphickey

Describe the bug
In Caelum when setting set(MISSION_INCLUDE_CCSDSEXT_HEADER TRUE) to use extended headers, I get a build error due to duplicate typedef of the MSG types:

cfe/modules/msg/option_inc/default_cfe_msg_hdr_priext.h:83:3: error: conflicting types for ‘CFE_MSG_Message_t’
   83 | } CFE_MSG_Message_t;
      |   ^~~~~~~~~~~~~~~~~
cfe/modules/core_api/fsw/inc/cfe_msg_api_typedefs.h:104:31: note: previous declaration of ‘CFE_MSG_Message_t’ was here
  104 | typedef union CFE_MSG_Message CFE_MSG_Message_t;
      |                               ^~~~~~~~~~~~~~~~~

To Reproduce
Enable extended headers in Caelum config, and build.

Expected behavior
Build should succeed.

Code snips
This is because the "typedef" cannot be in both places. In contrast, the standard header (non-extended) defines only the union/struct, not typedef'ed:

union CFE_MSG_Message
{
CCSDS_SpacePacket_t CCSDS; /**< \brief CCSDS Header (Pri or Pri + Ext) */
uint8 Byte[sizeof(CCSDS_SpacePacket_t)]; /**< \brief Byte level access */
};

Whereas the extended header version has a typedef:

typedef union
{
CCSDS_SpacePacket_t CCSDS; /**< \brief CCSDS Header (Pri or Pri + Ext) */
uint8 Byte[sizeof(CCSDS_SpacePacket_t)]; /**< \brief Byte level access */
} CFE_MSG_Message_t;

System observed on:
Ubuntu

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions