Bug 2215979 - trace-cmd: FTSBFS, probably after libtraceevent update
Summary: trace-cmd: FTSBFS, probably after libtraceevent update
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: trace-cmd
Version: 9.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jerome Marchand
QA Contact: Qiao Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-19 14:37 UTC by Florian Weimer
Modified: 2023-08-03 02:26 UTC (History)
4 users (show)

Fixed In Version: trace-cmd-2.9.2-10.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-160242 0 None None None 2023-06-20 02:44:51 UTC

Description Florian Weimer 2023-06-19 14:37:39 UTC
I cannot rebuild trace-cmd from source against the current buildroot.  The errors start with:

In file included from /usr/include/traceevent/event-utils.h:13,
                 from trace-hooks.c:12:
/usr/include/traceevent/event-parse.h:25:8: error: redefinition of 'struct tep_record'
   25 | struct tep_record {
      |        ^~~~~~~~~~
In file included from /builddir/build/BUILD/trace-cmd-v2.9.2/lib/trace-cmd/include/private/trace-cmd-private.h:11,
                 from trace-hooks.c:11:
/builddir/build/BUILD/trace-cmd-v2.9.2/include/traceevent/event-parse.h:26:8: note: originally defined here
   26 | struct tep_record {
      |        ^~~~~~~~~~
In file included from /usr/include/traceevent/event-utils.h:13,
                 from trace-hooks.c:12:
/usr/include/traceevent/event-parse.h:48:15: error: conflicting types for 'tep_event_handler_func'; have 'int (*)(struct trace_seq *, struct tep_record *, struct tep_event *, void *)'
   48 | typedef int (*tep_event_handler_func)(struct trace_seq *s,
      |               ^~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/trace-cmd-v2.9.2/lib/trace-cmd/include/private/trace-cmd-private.h:11,
                 from trace-hooks.c:11:
/builddir/build/BUILD/trace-cmd-v2.9.2/include/traceevent/event-parse.h:49:15: note: previous declaration of 'tep_event_handler_func' with type 'tep_event_handler_func' {aka 'int (*)(struct trace_seq *, struct tep_record *, struct tep_event *, void *)'}
   49 | typedef int (*tep_event_handler_func)(struct trace_seq *s,
      |               ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/traceevent/event-utils.h:13,
                 from trace-hooks.c:12:
/usr/include/traceevent/event-parse.h:56:8: error: redefinition of 'struct tep_plugin_option'
   56 | struct tep_plugin_option {
      |        ^~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/trace-cmd-v2.9.2/lib/trace-cmd/include/private/trace-cmd-private.h:11,
                 from trace-hooks.c:11:
/builddir/build/BUILD/trace-cmd-v2.9.2/include/traceevent/event-parse.h:57:8: note: originally defined here
   57 | struct tep_plugin_option {
      |        ^~~~~~~~~~~~~~~~~
In file included from /usr/include/traceevent/event-utils.h:13,
                 from trace-hooks.c:12:

I believe it's because these two headers now have conflicting inclusion guards:

#ifndef _PARSE_EVENTS_H
#define _PARSE_EVENTS_H

vs

#ifndef __TEP_PARSE_EVENTS_H
#define __TEP_PARSE_EVENTS_H

I believe upstream fixed it by dropping these headers in this commit:

commit 6ad8a8a250abaaad0f674a9700cc89a973ba708c
Author: Steven Rostedt (VMware) <rostedt>
Date:   Fri Apr 9 15:47:30 2021 -0400

    trace-cmd: Remove last elements of local libtracefs and libtraceevent
    
    Even though trace-cmd no longer holds the libraries libtracefs and
    libtraceevent, there were some header files still lingering and worse,
    still being used!
    
    Link: https://lore.kernel.org/linux-trace-devel/20210409154730.2c24e7d1@gandalf.local.home
    
    Signed-off-by: Steven Rostedt (VMware) <rostedt>


Note You need to log in before you can comment on or make changes to this bug.