Re: [Issue of trace-cmd] undefined symbol when import ctracecmd.so in python

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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@xxxxxxxxxxxxxxx/

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




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux