How to enable the debuginfo for the libraries of OFED?


I am debugging an issue and the function call tracing is needed. But with some debugging tools like perf, no symbol could be found. “nm” tool couldn’t get any symbol.

I checked the mlnxofedinstall script and there is a list of the debuginfo files for CentOS, but in the OFED downloaded from the official website, no such package could be found and installed, even with the “–add-kernel-support”. (e.g. the libs of mlx5 and ibverbs)

Several years ago, someone asked such question but no answer. So could some expert share the step to rebuild the packages with debuginfo to make the debugging convenient.

Many thanks

Hi Alkx,

Thanks a lot for your guide. I just read this reply. In the past days, I use the method of rpm patching and rebuilding, force installation for the debugging. It works and I can get the symbols, but very complex. The method you provided here seems to be very flexible. I will try this next time.

When I rebuild the packages, the debuginfo package is there! Then I check the building logs and files, it seems that all the user-space libs are not re-built at all. Only the kernel rpms are built.

I didn’t find the switch in the script to rebuild the user-space libs, then could any expert help this?

Instead of re-compiling RPMS, I would suggest to have a folder with sources of the libraries compiled with debug symbols and use LD_LIBRARY_PATH to load files from this folder. That gives you much more flexibility when debugging the issue as you can make the changes on the fly, recompile in a second and use it. Also it doesn’t require root access in order to install RPM. You might use newer version of libibverbs, libxml5 and other libraries in that way.

The general instruction is to open a RPM, extract archive, configure with customer prefix and run make install. For run time, use LD_LIBRARY_PATH. For example,

$rpm2cio -id

$tar xf


$./ ( if necessary)

$./configure --prefix= --enable-debug

$make -j install

export LD_LIBRARY_PATH=/lib (or lib64)