All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: trace-cmd python
       [not found] <1524143246.3024.21.camel@sipsolutions.net>
@ 2019-01-04  3:43 ` Steven Rostedt
  2019-01-09 20:36   ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-01-04  3:43 UTC (permalink / raw)
  To: Johannes Berg, linux-trace-devel; +Cc: Tzvetomir Stoyanov

On Thu, 19 Apr 2018 15:07:26 +0200
Johannes Berg <johannes@sipsolutions.net> wrote:

Hi Johannes,

This was buried in my TODO list, and lost. I just noticed it. 

> So, starting again from git clean -fdxq, I observe the following:
> 
> 1) make -j8 install
>    -> errors out with  
> "make[1]: *** No rule to make target '/home/jberg1/sys/trace-cmd/lib/trace-cmd/libtracecmd.a', needed by 'ctracecmd.so'.  Stop."
> 
> 2) make install
>    -> python plugin not installed
>    -> copy it manually  
> 
> 3) running trace-cmd report with plugin_mac80211.py in
> ~/.trace-cmd/plugins/ I see
> 
> failed loading /home/jberg1/.trace-cmd/plugins/mac80211.py
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
>   File "/tmp/tcmd//lib/trace-cmd/python/tracecmd.py", line 22, in <module>
>     from ctracecmd import *
> ImportError: /tmp/tcmd//lib/trace-cmd/python/ctracecmd.so: undefined symbol: traceevent_plugin_free_options_list
> 
> If I remove that from the header file I eventually get down to not
> having __vpr_stat() or something, which seems to indicate that
> ctracecmd.so isn't linked with libtraceevent, only with libtracecmd? But
> adding that to the Makefile didn't change anything, and then I gave up
> and checked out v2.7 instead.
>

I just checked, and this is still an issue today. I'll make sure that
this gets fixed soon.

Thanks for reporting! (even though it got lost in my INBOX :-( )

-- Steve

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

* Re: trace-cmd python
  2019-01-04  3:43 ` trace-cmd python Steven Rostedt
@ 2019-01-09 20:36   ` Steven Rostedt
  2019-01-15 13:09     ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-01-09 20:36 UTC (permalink / raw)
  To: Johannes Berg, linux-trace-devel; +Cc: Tzvetomir Stoyanov

On Thu, 3 Jan 2019 22:43:00 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:


> I just checked, and this is still an issue today. I'll make sure that
> this gets fixed soon.
> 
> Thanks for reporting! (even though it got lost in my INBOX :-( )
> 

OK, I finally got around to looking at this. It was a bit of a pain to
figure out. It was caused by the shuffling of the files around, as that
was needed to do because trace-cmd was getting bigger. This caused the
python ctracecmd.so to lose linking with the proper libraries and
caused the undefined symbols.

I just fixed it and pushed it to the repo. Want to give it a try and
see if it works for you?

Thanks!


-- Steve

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

* Re: trace-cmd python
  2019-01-09 20:36   ` Steven Rostedt
@ 2019-01-15 13:09     ` Johannes Berg
  2019-01-15 14:44       ` Steven Rostedt
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2019-01-15 13:09 UTC (permalink / raw)
  To: Steven Rostedt, linux-trace-devel; +Cc: Tzvetomir Stoyanov

On Wed, 2019-01-09 at 15:36 -0500, Steven Rostedt wrote:
> On Thu, 3 Jan 2019 22:43:00 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
> 
> 
> > I just checked, and this is still an issue today. I'll make sure that
> > this gets fixed soon.
> > 
> > Thanks for reporting! (even though it got lost in my INBOX :-( )
> > 
> 
> OK, I finally got around to looking at this. It was a bit of a pain to
> figure out. It was caused by the shuffling of the files around, as that
> was needed to do because trace-cmd was getting bigger. This caused the
> python ctracecmd.so to lose linking with the proper libraries and
> caused the undefined symbols.
> 
> I just fixed it and pushed it to the repo. Want to give it a try and
> see if it works for you?

Seems to work more or less.

Not sure how I managed to install it into a custom subdirectory of my
$HOME before, and make it load plugins - I can't seem to figure out the
right combination of prefix= and DESTDIR= anymore.

If I symlink it to a place where trace-cmd actually looks for it then I
get errors in python saying pevent_record_data_get() is not defined, but
could be that I'm not importing something right ...

What's a good way to install it into a custom directory without
affecting the whole machine?

johannes


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

* Re: trace-cmd python
  2019-01-15 13:09     ` Johannes Berg
@ 2019-01-15 14:44       ` Steven Rostedt
  2019-01-19  9:12         ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2019-01-15 14:44 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-trace-devel, Tzvetomir Stoyanov

On Tue, 15 Jan 2019 14:09:30 +0100
Johannes Berg <johannes@sipsolutions.net> wrote:


> Seems to work more or less.
> 
> Not sure how I managed to install it into a custom subdirectory of my
> $HOME before, and make it load plugins - I can't seem to figure out the
> right combination of prefix= and DESTDIR= anymore.

DESTDIR is where you want to install it for moving it to another
machine. If you plan on running trace-cmd on the same machine, but
having it look elsewhere, then just using prefix should be enough.

> 
> If I symlink it to a place where trace-cmd actually looks for it then I
> get errors in python saying pevent_record_data_get() is not defined, but

Looks to be an old object that it's linking with, as we replaced all
"pevent_" with "tep_".

> could be that I'm not importing something right ...
> 
> What's a good way to install it into a custom directory without
> affecting the whole machine?

The prefix tells the build to have the executables search that path.
The DESTDIR is for installing in a particular location that you will
move that code to another machine.

e.g.

  make prefix=/usr/local DESTDIR=/tmp/tracecmd install

Will install the executables in /tmp/tracecmd, but when you run those
executables, they will want to look in the /usr/local path.

It should also always search your home directory in ".trace-cmd/plugins"

-- Steve

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

* Re: trace-cmd python
  2019-01-15 14:44       ` Steven Rostedt
@ 2019-01-19  9:12         ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2019-01-19  9:12 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: linux-trace-devel, Tzvetomir Stoyanov

Hi,

> DESTDIR is where you want to install it for moving it to another
> machine. If you plan on running trace-cmd on the same machine, but
> having it look elsewhere, then just using prefix should be enough.

Ok. I think it was partially installed due to bash completion failing,
but I see how I can work around that :)

> > If I symlink it to a place where trace-cmd actually looks for it then I
> > get errors in python saying pevent_record_data_get() is not defined, but
> 
> Looks to be an old object that it's linking with, as we replaced all
> "pevent_" with "tep_".

No - you forgot to replace it in a few places in the python files :-)

You also forgot to include the new trace-seq.h file into python, so it
was again failing on that.

Patch coming.

johannes


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

end of thread, other threads:[~2019-01-19  9:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1524143246.3024.21.camel@sipsolutions.net>
2019-01-04  3:43 ` trace-cmd python Steven Rostedt
2019-01-09 20:36   ` Steven Rostedt
2019-01-15 13:09     ` Johannes Berg
2019-01-15 14:44       ` Steven Rostedt
2019-01-19  9:12         ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.