trace-cmd python
A message that is not in the archive (sent off-list or not yet received): [email protected]
On Thu, 19 Apr 2018 15:07:26 +0200
Johannes Berg <[email protected]> wrote:
Hi Johannes,
This was buried in my TODO list, and lost. I just noticed it.
Quoted 20 lines
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 manually3) running trace-cmd report with
plugin_mac80211.pyin ~/.trace-cmd/plugins/ I seefailed 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
Quoted 6 lines
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 theMakefiledidn'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
Quoted 5 lines · On Thu, 3 Jan 2019 22:43:00 -0500 Steven Rostedt <[email protected]> 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
Quoted 10 lines · Steven Rostedt
Quoted 5 lines · On Thu, 3 Jan 2019 22:43:00 -0500 Steven Rostedt <[email protected]> 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 :-( )
Quoted 8 lines
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
Quoted 5 lines · On Tue, 15 Jan 2019 14:09:30 +0100 Johannes Berg <[email protected]>…
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.
Quoted 3 lines
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_".
Quoted 4 lines
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
Hi,
Quoted 3 lines
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 :)
Quoted 5 lines
Quoted 2 lines
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, butLooks 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