* Re: [Issue of trace-cmd] undefined symbol when import ctracecmd.so in python
[not found] <CANF=BhZScysm9BchEFytPgOFR4Gx-jeeOV6VpbKnAHZ102onSQ@mail.gmail.com>
@ 2023-07-28 23:36 ` Steven Rostedt
[not found] ` <CANF=BhYAbU+sLYxpaRVA=m0_jgJFr0c+JAAx+HQ4FcTkuSnB7w@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2023-07-28 23:36 UTC (permalink / raw)
To: Sang QianLong; +Cc: Linux Trace Devel, linux-trace-users
I'm Cc'ing the trace users and devel mailing list just to keep this
archived.
On Fri, 28 Jul 2023 11:29:26 +0800
Sang QianLong <hacksonsang@gmail.com> wrote:
> Dear rostedt,
>
> I hope this email finds you well. My name is Hacksonsang, and I am reaching
> out for your assistance regarding a persistent issue I am facing while
> working with "ctracecmd.so" in Python.
>
I have to admit that I personally do not use python, and this code was
added by others.
Note, there's patches to fix the python code, but as I'm not a python
expert, I'm still holding off to applying them.
Not sure if this helps you, but you may want to look at this:
https://patchwork.kernel.org/project/linux-trace-devel/patch/Y+w51nOhNd+PGo/k@slm.duckdns.org/
Does the above help you?
-- Steve
> I am currently using Ubuntu 20.04 with GCC 9.4.0 and Python 3.8.8. The
> problem arises when I try to import "ctracecmd.so" into my Python script. I
> consistently encounter the error message: "Undefined symbol: uncompress."
>
> To address this, I initially attempted to include the "-lz" flag in
> LD_FLAGS, hoping to resolve the "uncompress" issue. However, this action
> resulted in encountering more "undefined symbol" errors, such as
> "tep_plugin_kvm_get_func."
> Upon investigating further, I found that these symbols are defined in the
> "trace-xxx.c" files within the "tracecmd" directory. Unfortunately, it
> appears that the Python/Makefile only utilizes the ".c" files from the
> "lib/trace-cmd" directory during the compilation of "ctracecmd.so." To
> address this limitation, I tried compiling "ctracecmd.so" by including the
> ".c" files from the "tracecmd" directory using "-fpic" compilation.
> Despite these efforts, I am still facing the same issue, and the "undefined
> symbol" errors persist.
>
> Given the situation's complexity, I am seeking your expertise and guidance
> in resolving this matter. I believe that resolving this problem is crucial
> as the functionalities offered by trace-cmd are vital for the successful
> execution of my project.
>
> If there are any specific steps or configurations that I missed or any
> other troubleshooting suggestions you could provide, I would greatly
> appreciate it. Please let me know if you require any additional
> information, logs, or code snippets to understand the issue better. I am
> willing to provide whatever is necessary for a comprehensive analysis.
>
> Thank you so much for your time and consideration. I am eagerly looking
> forward to your valuable insights and assistance.
>
> Best regards
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Issue of trace-cmd] undefined symbol when import ctracecmd.so in python
[not found] ` <CANF=BhYAbU+sLYxpaRVA=m0_jgJFr0c+JAAx+HQ4FcTkuSnB7w@mail.gmail.com>
@ 2023-08-02 13:47 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2023-08-02 13:47 UTC (permalink / raw)
To: Sang QianLong; +Cc: Linux Trace Devel, linux-trace-users
On Wed, 2 Aug 2023 16:13:20 +0800
Sang QianLong <hacksonsang@gmail.com> wrote:
> Hi Steven,
> Thanks for reaching out to me. I appreciate your effort in helping me with
> my persistent issue while working with "ctracecmd.so" in Python.
>
> I understand that you personally do not use Python, and the code was added
> by others. I also appreciate your honesty in not applying the patches yet
> since you are not a Python expert. I have used the patch from
> https://patchwork.kernel.org/project/linux-trace-devel/patch/Y+w51nOhNd+PGo/k@slm.duckdns.org/
> and it works!
>
> Once again, thank you for your help.
>
I could add it with a:
Tested-by: Sang QianLong <hacksonsang@gmail.com>
if you are fine with that.
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-02 13:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CANF=BhZScysm9BchEFytPgOFR4Gx-jeeOV6VpbKnAHZ102onSQ@mail.gmail.com>
2023-07-28 23:36 ` [Issue of trace-cmd] undefined symbol when import ctracecmd.so in python Steven Rostedt
[not found] ` <CANF=BhYAbU+sLYxpaRVA=m0_jgJFr0c+JAAx+HQ4FcTkuSnB7w@mail.gmail.com>
2023-08-02 13:47 ` Steven Rostedt
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).