libtracefs: Remove "traceevent/" from referencing libtraceevent headers
PATCH 1/1 libtracefs: Remove "traceevent/" from referencing libtraceevent headers
From: "Steven Rostedt (VMware)" <[email protected]>
"pkg-config --cflags --libtraceevent" produces the full path to the libtraceevent headers (including the "traceevent/" portion). There is no need to add that part in the headers.
Particularly the one in the main tracefs.h that trace-cmd uses. The version 2.9.4 causes the header to include the libtraceevent/event-parse.h that is local, when it should be using the system headers, and causes it to fail the build.
--- include/tracefs.h | 2 +- src/tracefs-events.c | 2 +- src/tracefs-utils.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
include/tracefs.h +1 -1
@@ -9,7 +9,7 @@#include <sys/stat.h> #include <fcntl.h> #include <sched.h> -#include <traceevent/event-parse.h> +#include <event-parse.h> char *tracefs_get_tracing_file (const char *name);void tracefs_put_tracing_file (char *name);
src/tracefs-events.c +1 -1
@@ -15,7 +15,7 @@#include <fcntl.h> #include <limits.h> -#include <traceevent/kbuffer.h> +#include <kbuffer.h> #include "tracefs.h" #include "tracefs-local.h"
src/tracefs-utils.c +2 -2
@@ -15,8 +15,8 @@#include <unistd.h> #include <errno.h> -#include <traceevent/event-parse.h> -#include <traceevent/event-utils.h> +#include <event-parse.h> +#include <event-utils.h> #include "tracefs.h" #include "tracefs-local.h"
Signature · 1 line
2.31.1
John,
It was libtracefs that had the flaw that made trace-cmd 2.9 fail to build. This patch fixes it. I pushed it to the main branch, and also released a libtracefs-1.2.3 that has this fix as well.
-- Steve
Quoted 59 lines · On Fri, 16 Jul 2021 22:06:49 -0400 Steven Rostedt <[email protected]> wrote:
From: "Steven Rostedt (VMware)" <[email protected]>
"pkg-config --cflags --libtraceevent" produces the full path to the libtraceevent headers (including the "traceevent/" portion). There is no need to add that part in the headers.
Particularly the one in the main
tracefs.hthat trace-cmd uses. The version 2.9.4 causes the header to include thelibtraceevent/event-parse.hthat is local, when it should be using the system headers, and causes it to fail the build.Signed-off-by Steven Rostedt (VMware) <[email protected]>--- include/tracefs.h | 2 +- src/tracefs-events.c | 2 +- src/tracefs-utils.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)include/tracefs.h +1
-1@@ -9,7 +9,7 @@#include <sys/stat.h> #include <fcntl.h> #include <sched.h> -#include <traceevent/event-parse.h> +#include <event-parse.h> char *tracefs_get_tracing_file (const char *name);void tracefs_put_tracing_file (char *name);src/tracefs-events.c +1
-1@@ -15,7 +15,7 @@#include <fcntl.h> #include <limits.h> -#include <traceevent/kbuffer.h> +#include <kbuffer.h> #include "tracefs.h" #include "tracefs-local.h" src/tracefs-utils.c +2
-2@@ -15,8 +15,8 @@#include <unistd.h> #include <errno.h> -#include <traceevent/event-parse.h> -#include <traceevent/event-utils.h> +#include <event-parse.h> +#include <event-utils.h> #include "tracefs.h" #include "tracefs-local.h"
Quoted 23 lines · Steven Rostedt
From: "Steven Rostedt (VMware)" <[email protected]>
"pkg-config --cflags --libtraceevent" produces the full path to the libtraceevent headers (including the "traceevent/" portion). There is no need to add that part in the headers.
Particularly the one in the main
tracefs.hthat trace-cmd uses. The version 2.9.4 causes the header to include thelibtraceevent/event-parse.hthat is local, when it should be using the system headers, and causes it to fail the build.Signed-off-by Steven Rostedt (VMware) <[email protected]>--- include/tracefs.h | 2 +- src/tracefs-events.c | 2 +- src/tracefs-utils.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)include/tracefs.h +0
-0
include/tracefs.h line 12
Quoted 5 lines
include/tracefs.h +1
-1@@ -9,7 +9,7 @@#include <sys/stat.h> #include <fcntl.h> #include <sched.h> -#include <traceevent/event-parse.h> +#include <event-parse.h>
Perhaps we need a similar patch for "trace-cmd.h".
Thanks!
Yordan
Quoted 32 lines
include/tracefs.h +0
-0char *tracefs_get_tracing_file (const char *name);void tracefs_put_tracing_file (char *name);src/tracefs-events.c +1
-1@@ -15,7 +15,7 @@#include <fcntl.h> #include <limits.h> -#include <traceevent/kbuffer.h> +#include <kbuffer.h> #include "tracefs.h" #include "tracefs-local.h" src/tracefs-utils.c +2
-2@@ -15,8 +15,8 @@#include <unistd.h> #include <errno.h> -#include <traceevent/event-parse.h> -#include <traceevent/event-utils.h> +#include <event-parse.h> +#include <event-utils.h> #include "tracefs.h" #include "tracefs-local.h"
Quoted 4 lines · On Mon, 26 Jul 2021 13:25:41 +0300 "Yordan Karadzhov (VMware)"…
Quoted 4 lines
include/tracefs.h +0
-0
Quoted 8 lines
include/tracefs.h line 12
Quoted 6 lines
include/tracefs.h +1
-1@@ -9,7 +9,7 @@#include <sys/stat.h> #include <fcntl.h> #include <sched.h> -#include <traceevent/event-parse.h> +#include <event-parse.h> Perhaps we need a similar patch for "
trace-cmd.h".
Like this?
I pushed it for v2.9 because it was broken if libtraceeevent was installed. I'll make sure it's there for the development branch as well.
-- Steve