3 Replies Latest reply on Sep 18, 2018 11:03 PM by thull

    How to enable the debuginfo for the libraries of OFED?

    thull

      Hi,

      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

        • Re: How to enable the debuginfo for the libraries of OFED?
          thull

          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?

            • Re: How to enable the debuginfo for the libraries of OFED?
              alkx

              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 <RPM>

              $tar xf <TAR>

              $cd <CREATED FOLDER>

              $./autogen.sh ( if necessary)
              $./configure --prefix=<PREFIX> --enable-debug$make -j <N> install

              export LD_LIBRARY_PATH=<PREFIX>/lib (or lib64)

              1 of 1 people found this helpful