Bug #1156
closedRedeclaration of rcu symbols when adding UST tracepoints to tools
0%
Description
As discussed offline, I am adding a monitoring thread to lttng-tools that monitors udev events and adds a lttng-ust event when <something> happens.
When trying to compile with lttng-ust tracepoints, I get compilation errors about redeclarations of rcu-related symbols defined in urcu-bp.h, included by ust includes and urcu.h included by tools, as the following output shows:
In file included from /usr/local/include/urcu-bp.h:62:0,
from /usr/local/include/lttng/tracepoint-rcu.h:30,
from /usr/local/include/lttng/tracepoint.h:29,
from udev-monitor-provider.h:36,
from udev-monitor.c:37:
/usr/local/include/urcu/static/urcu-bp.h:57:6: error: nested redefinition of ‘enum rcu_state’
enum rcu_state {
^~~~~~~
/usr/local/include/urcu/static/urcu-bp.h:57:6: error: redeclaration of ‘enum rcu_state’
In file included from /usr/local/include/urcu.h:59:0,
from lttng-sessiond.h:22,
from udev-monitor.c:26:
/usr/local/include/urcu/static/urcu.h:77:6: note: originally defined here
enum rcu_state {
^~~~~~~
In file included from /usr/local/include/urcu-bp.h:62:0,
from /usr/local/include/lttng/tracepoint-rcu.h:30,
from /usr/local/include/lttng/tracepoint.h:29,
from udev-monitor-provider.h:36,
from udev-monitor.c:37:
/usr/local/include/urcu/static/urcu-bp.h:58:2: error: redeclaration of enumerator ‘RCU_READER_ACTIVE_CURRENT’
RCU_READER_ACTIVE_CURRENT,
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/urcu.h:59:0,
from lttng-sessiond.h:22,
from udev-monitor.c:26:
/usr/local/include/urcu/static/urcu.h:78:2: note: previous definition of ‘RCU_READER_ACTIVE_CURRENT’ was here
RCU_READER_ACTIVE_CURRENT,
^~~~~~~~~~~~~~~~~~~~~~~
Files