lttng-tools-2.14.0-rc1: ODR violation
Norbert Lange via lttng-dev <[email protected]> Tue, 17 Jun 2025 13:00:44 +0200
| Newsgroups | org.lttng.lists.lttng-dev |
|---|---|
| Message-ID | <CADYdroPQ-E4JGj=mhQkkRNv4PVgpXuN07fQpg9-r0TifsJpQ5w@mail.gmail.com> |
Hello,
enum communication_state exists twice with already diverging definitions.
I am not sure if its a functional issue now, but this sound like it
can cause fun bughunts in the future.
(enabling lto helps finding that kinda stuff)
../../../../src/lib/lttng-ctl/clear.cpp:26:6: warning: type
'communication_state' violates the C++ One Definition Rule [-Wodr]
26 | enum communication_state {
| ^
../../../../src/lib/lttng-ctl/destruction-handle.cpp:25:6: note: an
enum with different value name is defined in another translation unit
25 | enum communication_state {
| ^
../../../../src/lib/lttng-ctl/clear.cpp:29:2: note: name
'COMMUNICATION_STATE_END' differs from name
'COMMUNICATION_STATE_RECEIVE_PAYLOAD' defined in another translation
unit
29 | COMMUNICATION_STATE_END,
| ^
../../../../src/lib/lttng-ctl/destruction-handle.cpp:28:2: note:
mismatching definition
28 | COMMUNICATION_STATE_RECEIVE_PAYLOAD,
| ^
Regards, Norbert