Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers
@ 2021-07-17  2:06 Steven Rostedt
  2021-07-17  3:00 ` Steven Rostedt
  2021-07-26 10:25 ` Yordan Karadzhov (VMware)
  0 siblings, 2 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-17  2:06 UTC (permalink / raw)
  To: Linux Trace Devel; +Cc: John 'Warthog9' Hawley

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

"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.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/tracefs.h    | 2 +-
 src/tracefs-events.c | 2 +-
 src/tracefs-utils.c  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/tracefs.h b/include/tracefs.h
index 7e1927b..2649417 100644
--- a/include/tracefs.h
+++ b/include/tracefs.h
@@ -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);
diff --git a/src/tracefs-events.c b/src/tracefs-events.c
index 7febc2a..8d84838 100644
--- a/src/tracefs-events.c
+++ b/src/tracefs-events.c
@@ -15,7 +15,7 @@
 #include <fcntl.h>
 #include <limits.h>
 
-#include <traceevent/kbuffer.h>
+#include <kbuffer.h>
 
 #include "tracefs.h"
 #include "tracefs-local.h"
diff --git a/src/tracefs-utils.c b/src/tracefs-utils.c
index 6750336..600cdf2 100644
--- a/src/tracefs-utils.c
+++ b/src/tracefs-utils.c
@@ -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"
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers
  2021-07-17  2:06 [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers Steven Rostedt
@ 2021-07-17  3:00 ` Steven Rostedt
  2021-07-26 10:25 ` Yordan Karadzhov (VMware)
  1 sibling, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-17  3:00 UTC (permalink / raw)
  To: Linux Trace Devel; +Cc: John 'Warthog9' Hawley


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


On Fri, 16 Jul 2021 22:06:49 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> "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.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>  include/tracefs.h    | 2 +-
>  src/tracefs-events.c | 2 +-
>  src/tracefs-utils.c  | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/tracefs.h b/include/tracefs.h
> index 7e1927b..2649417 100644
> --- a/include/tracefs.h
> +++ b/include/tracefs.h
> @@ -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);
> diff --git a/src/tracefs-events.c b/src/tracefs-events.c
> index 7febc2a..8d84838 100644
> --- a/src/tracefs-events.c
> +++ b/src/tracefs-events.c
> @@ -15,7 +15,7 @@
>  #include <fcntl.h>
>  #include <limits.h>
>  
> -#include <traceevent/kbuffer.h>
> +#include <kbuffer.h>
>  
>  #include "tracefs.h"
>  #include "tracefs-local.h"
> diff --git a/src/tracefs-utils.c b/src/tracefs-utils.c
> index 6750336..600cdf2 100644
> --- a/src/tracefs-utils.c
> +++ b/src/tracefs-utils.c
> @@ -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"
>  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers
  2021-07-17  2:06 [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers Steven Rostedt
  2021-07-17  3:00 ` Steven Rostedt
@ 2021-07-26 10:25 ` Yordan Karadzhov (VMware)
  2021-07-26 15:24   ` Steven Rostedt
  1 sibling, 1 reply; 4+ messages in thread
From: Yordan Karadzhov (VMware) @ 2021-07-26 10:25 UTC (permalink / raw)
  To: Steven Rostedt, Linux Trace Devel; +Cc: John 'Warthog9' Hawley



On 17.07.21 г. 5:06, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> "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.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
> ---
>   include/tracefs.h    | 2 +-
>   src/tracefs-events.c | 2 +-
>   src/tracefs-utils.c  | 4 ++--
>   3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/tracefs.h b/include/tracefs.h
> index 7e1927b..2649417 100644
> --- a/include/tracefs.h
> +++ b/include/tracefs.h
> @@ -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


>   
>   char *tracefs_get_tracing_file(const char *name);
>   void tracefs_put_tracing_file(char *name);
> diff --git a/src/tracefs-events.c b/src/tracefs-events.c
> index 7febc2a..8d84838 100644
> --- a/src/tracefs-events.c
> +++ b/src/tracefs-events.c
> @@ -15,7 +15,7 @@
>   #include <fcntl.h>
>   #include <limits.h>
>   
> -#include <traceevent/kbuffer.h>
> +#include <kbuffer.h>
>   
>   #include "tracefs.h"
>   #include "tracefs-local.h"
> diff --git a/src/tracefs-utils.c b/src/tracefs-utils.c
> index 6750336..600cdf2 100644
> --- a/src/tracefs-utils.c
> +++ b/src/tracefs-utils.c
> @@ -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"
>   
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers
  2021-07-26 10:25 ` Yordan Karadzhov (VMware)
@ 2021-07-26 15:24   ` Steven Rostedt
  0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2021-07-26 15:24 UTC (permalink / raw)
  To: Yordan Karadzhov (VMware)
  Cc: Linux Trace Devel, John 'Warthog9' Hawley

On Mon, 26 Jul 2021 13:25:41 +0300
"Yordan Karadzhov (VMware)" <y.karadz@gmail.com> wrote:

> > diff --git a/include/tracefs.h b/include/tracefs.h
> > index 7e1927b..2649417 100644
> > --- a/include/tracefs.h
> > +++ b/include/tracefs.h
> > @@ -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?

  https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/commit/?h=trace-cmd-stable-v2.9&id=c3bf2ced24528debba6e6c48c77e3868cdb3dec1


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17  2:06 [PATCH] libtracefs: Remove "traceevent/" from referencing libtraceevent headers Steven Rostedt
2021-07-17  3:00 ` Steven Rostedt
2021-07-26 10:25 ` Yordan Karadzhov (VMware)
2021-07-26 15:24   ` Steven Rostedt

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git