Details
-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
None
-
3
-
10758
Description
Cray recently began building some of our Lustre code on CentOS build servers, rather than on SLES. When we did this, we discovered an important difference in RPM macro defaults between the distributions:
On SLES, by default, no debuginfo RPM is created, and the brp-strip macro isn't run. If either the debuginfo RPM is created or the brp-strip macro is run, many/most of the debug symbols are stripped from the .ko files built by Lustre.
On CentOS by default, a debuginfo RPM is created, and the brp-strip macro is run. This means that if you want the debug symbols to be in the various .ko files, you must disable creation of a debuginfo RPM AND not run the brp-strip macro.
Overriding the RPM macros can be done from the spec file, ~/.rpmmacros, or
/etc/rpm/macros .
In particular, you need the following in any of the listed locations:
%global debug_package %
{nil}%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
With this, you will not get a debuginfo RPM and the brp-strip macro will not be run. (brp-strip is called from __os_install_post)
Similarly, you should be able to enable them on systems where they're disabled by default, such as SLES.
I've written a patch that puts these in the spec file and lets you control them with configure options, but I have a few questions:
1) In your opinion, is this an appropriate thing to allow Lustre to configure? The specific concern is overriding the system RPM macros that may be configured somewhere else. Since it's just for Lustre, I think it's OK.
2) My current patch has separate options to enable or disable the debuginfo RPM. (--with-enable-separate-debuginfo, --with-disable-separate-debuginfo), and if neither is provided, you'll get the system RPM macro defaults.
Is this how we want to do it? Should we have separate options for debuginfo and stripping? (Enabling debuginfo effectively enables stripping, even though it doesn't directly call brp-strip)
I think it's reasonable to assume that anyone who's interested in configuring this would either want a separate debuginfo RPM or would like the symbols left in the KO files, IE, non-stripped.
Thoughts?