linux-trace-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Brian Hutchinson <b.hutchman@gmail.com>
Cc: linux-trace-users@vger.kernel.org
Subject: Re: Having difficulty trying to cross-compile latest trace-cmd
Date: Thu, 30 Jun 2022 09:24:05 -0400	[thread overview]
Message-ID: <20220630092405.6d842368@gandalf.local.home> (raw)
In-Reply-To: <CAFZh4h87S5xoYisfN53SVBfXaCHKH1dwao_12L55K6Bq2Gd2Gg@mail.gmail.com>

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

  reply	other threads:[~2022-06-30 13:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30  4:20 Having difficulty trying to cross-compile latest trace-cmd Brian Hutchinson
2022-06-30 13:24 ` Steven Rostedt [this message]
2022-06-30 13:56   ` Brian Hutchinson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220630092405.6d842368@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=b.hutchman@gmail.com \
    --cc=linux-trace-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).