linux-trace-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Having difficulty trying to cross-compile latest trace-cmd
@ 2022-06-30  4:20 Brian Hutchinson
  2022-06-30 13:24 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Hutchinson @ 2022-06-30  4:20 UTC (permalink / raw)
  To: linux-trace-users

Hi,

I've been using trace-cmd 2.9.1 from a yocto build but I want to try
out the sql synthetic events ultil and it looks like I need to go to
the latest to get that.

After reading this:

https://www.spinics.net/lists//linux-trace-devel/msg08977.html

.... thanks Steven for rescuing the orphans but I guess I'm a
red-headded step child trying to cross-compile all of this (on Ubuntu
20.04 machine) for a iMX8MM SoC.  And you're right, Makefiles do suck!
 Especially ones you didn't write yourself and you try to figure out
what others were trying to do.

I'm struggling to cross-compile everything.

I checked out the latest libtraceevent and that cross-compiled ok (I'm
using a sdk I built from Yocto ex: source
/opt/poky.3.1.7/environment-setup-aarch64-poky-linux) but the install
wouldn't work until I used DESTDIR to point the install somewhere
other than Ubuntu directories.

I checked out libtracefs and it wouldn't build until I fooled around
and set TEST_LIBTRACEEVENT to point specifically to the
libtraceevent.pc file in the directory used in libtraceevent DISTDIR
path I set.

Once I got past that I started having issues with libtracefs failing
to find include files (event-parse.h, trace-seq.h etc.) that lived in
the libtraceevent repo.  I created a symlink for one of them but then
ran into others and gave up figuring I was going about this wrong way
and it was time to admit defeat and just ask how you cross compile
this without building packages for Ubuntu.

Thanks,

Brian

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

* Re: Having difficulty trying to cross-compile latest trace-cmd
  2022-06-30  4:20 Having difficulty trying to cross-compile latest trace-cmd Brian Hutchinson
@ 2022-06-30 13:24 ` Steven Rostedt
  2022-06-30 13:56   ` Brian Hutchinson
  0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2022-06-30 13:24 UTC (permalink / raw)
  To: Brian Hutchinson; +Cc: linux-trace-users

On Thu, 30 Jun 2022 00:20:57 -0400
Brian Hutchinson <b.hutchman@gmail.com> wrote:

> Hi,

Hi Brian,

> 
> I've been using trace-cmd 2.9.1 from a yocto build but I want to try
> out the sql synthetic events ultil and it looks like I need to go to
> the latest to get that.
> 
> After reading this:
> 
> https://www.spinics.net/lists//linux-trace-devel/msg08977.html
> 
> .... thanks Steven for rescuing the orphans but I guess I'm a
> red-headded step child trying to cross-compile all of this (on Ubuntu
> 20.04 machine) for a iMX8MM SoC.  And you're right, Makefiles do suck!
>  Especially ones you didn't write yourself and you try to figure out
> what others were trying to do.
> 
> I'm struggling to cross-compile everything.
> 
> I checked out the latest libtraceevent and that cross-compiled ok (I'm
> using a sdk I built from Yocto ex: source
> /opt/poky.3.1.7/environment-setup-aarch64-poky-linux) but the install
> wouldn't work until I used DESTDIR to point the install somewhere
> other than Ubuntu directories.
> 
> I checked out libtracefs and it wouldn't build until I fooled around
> and set TEST_LIBTRACEEVENT to point specifically to the
> libtraceevent.pc file in the directory used in libtraceevent DISTDIR
> path I set.
> 
> Once I got past that I started having issues with libtracefs failing
> to find include files (event-parse.h, trace-seq.h etc.) that lived in
> the libtraceevent repo.  I created a symlink for one of them but then
> ran into others and gave up figuring I was going about this wrong way
> and it was time to admit defeat and just ask how you cross compile
> this without building packages for Ubuntu.

I haven't tried cross compiling in a while, and do not have a setup to do
so at the moment (no cross glibc on my machines).

But I do try to make it easier for distros to package these. In
the trace-cmd repo, there's a make-trace-cmd.sh[1] script that sets the
proper variables. This can also be used on libtraceevent and libtracefs.

Perhaps that can work with a cross compile environment too?

-- Steve

[1] https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/tree/make-trace-cmd.sh

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

* Re: Having difficulty trying to cross-compile latest trace-cmd
  2022-06-30 13:24 ` Steven Rostedt
@ 2022-06-30 13:56   ` Brian Hutchinson
  0 siblings, 0 replies; 3+ messages in thread
From: Brian Hutchinson @ 2022-06-30 13:56 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-trace-users

On Thu, Jun 30, 2022 at 9:24 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Thu, 30 Jun 2022 00:20:57 -0400
> Brian Hutchinson <b.hutchman@gmail.com> wrote:
>
> > Hi,
>
> Hi Brian,
>
> >
> > I've been using trace-cmd 2.9.1 from a yocto build but I want to try
> > out the sql synthetic events ultil and it looks like I need to go to
> > the latest to get that.
> >
> > After reading this:
> >
> > https://www.spinics.net/lists//linux-trace-devel/msg08977.html
> >
> > .... thanks Steven for rescuing the orphans but I guess I'm a
> > red-headded step child trying to cross-compile all of this (on Ubuntu
> > 20.04 machine) for a iMX8MM SoC.  And you're right, Makefiles do suck!
> >  Especially ones you didn't write yourself and you try to figure out
> > what others were trying to do.
> >
> > I'm struggling to cross-compile everything.
> >
> > I checked out the latest libtraceevent and that cross-compiled ok (I'm
> > using a sdk I built from Yocto ex: source
> > /opt/poky.3.1.7/environment-setup-aarch64-poky-linux) but the install
> > wouldn't work until I used DESTDIR to point the install somewhere
> > other than Ubuntu directories.
> >
> > I checked out libtracefs and it wouldn't build until I fooled around
> > and set TEST_LIBTRACEEVENT to point specifically to the
> > libtraceevent.pc file in the directory used in libtraceevent DISTDIR
> > path I set.
> >
> > Once I got past that I started having issues with libtracefs failing
> > to find include files (event-parse.h, trace-seq.h etc.) that lived in
> > the libtraceevent repo.  I created a symlink for one of them but then
> > ran into others and gave up figuring I was going about this wrong way
> > and it was time to admit defeat and just ask how you cross compile
> > this without building packages for Ubuntu.
>
> I haven't tried cross compiling in a while, and do not have a setup to do
> so at the moment (no cross glibc on my machines).
>
> But I do try to make it easier for distros to package these. In
> the trace-cmd repo, there's a make-trace-cmd.sh[1] script that sets the
> proper variables. This can also be used on libtraceevent and libtracefs.
>
> Perhaps that can work with a cross compile environment too?
>
> -- Steve
>
> [1] https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/tree/make-trace-cmd.sh

Thanks Steve, I'll give it a look.

I could give you my sdk wink, wink ... if you want a shiny (well, it's
a bit dated, but hey, it is a LTS release) NXP iMX8MM toolchain.

I started by trying to update my trace-cmd yocto recipe to just pull
the latest but it ran into not finding the include files too so that's
what led me to just trying to build it outside Yocto manually to
understand how to build it.

Later,

Brian

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

end of thread, other threads:[~2022-06-30 14:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-30  4:20 Having difficulty trying to cross-compile latest trace-cmd Brian Hutchinson
2022-06-30 13:24 ` Steven Rostedt
2022-06-30 13:56   ` Brian Hutchinson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).