[elrepo-devel] perf-xxx.noarch.rpm

Alan Bartlett ajb at elrepo.org
Thu Feb 10 21:45:31 EST 2011


On 10 February 2011 13:34, Dag Wieers <dag at wieers.com> wrote:
> On Thu, 10 Feb 2011, Dag Wieers wrote:
>> On Wed, 9 Feb 2011, Alan Bartlett wrote:
>>> On 8 February 2011 20:52, Steve Clark <sclark at netwolves.com> wrote:

>>>> I can't seem to find the perf-xxx.noarch.rpm for the ml-kernels.

>>> I seem to recall that Dag (Wieers) mentioned the idea of perf support
>>> a number of months ago (before the birth of his daughter :-) ), so
>>> let's see is what Dag's current view on the subject.

>> A perf binary would indeed be useful, but beware, I remember that the
>> binary was specific to a kernel version. So it would mean the binary is
>> versioned as well and the alternatives-infrastructure needs to be used.

That sounds quite reasonable.

>> Hence, the binary needs to be build _with_ the kernel, and probably also
>> ship as part of the kernel RPM. Not sure how Fedora is doing this though.
>> Probably worth looking into.
>
> Reading up on what was send to the list, here a summary of what would be
> needed:
>
>  - Compile the perf binary and package it with the kernel package
>    eg.
>        [root at moria media]# rpm -ql kernel | grep perf
>        /usr/libexec/perf.2.6.32-71.7.1.el6.x86_64
>        /usr/libexec/perf.2.6.32-71.14.1.el6.x86_64
>
>  - Ship the (upstream) perf sub-package, which contains a wrapper shell
>    script that picks up the above binary, and a set of man pages.

Again, that makes sense.

> For RHEL5 the perf sub-package will not be a noarch package (as RHEL5's
> RPM cannot produce noarch sub-packages for arch packages).

Agreed.

So, I've made a couple of tests. I took the
kernel-ml-2.6.35-11.el5.elrepo.src.rpm for my source package and set
the buildid to .pt (perf test) to avoid any confusion. At the point
immediately after the make modules, I slipped in a few lines of
"kludge code" to give me a feeling of what's what.

Curses. :-x The build failed. Here follows the relevant (edited) lines
from the stderr --

[quote]
BUILD/kernel-ml-2.6.35/linux-2.6.35.i686/tools/perf/Makefile:512: No
libdw.h found or old libdw.h found or elfutils is older than 0.138,
disables dwarf support. Please install new elfutils-devel/libdw-dev
BUILD/kernel-ml-2.6.35/linux-2.6.35.i686/tools/perf/Makefile:548: ***
No libelf.h/libelf found, please install
libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
make: *** [tools/perf/] Error 2
[/quote]
Watch out for Gmail's "helpfully" inserted new lines . . .

That build was attempted on our standard RHEL 5.6 build system. It
currently has these packages --

[quote]
[ajb at Duo2 perf]$ cat *.txt
[ajb at Build32R5 ~]$ rpm -qa elfutils\* | sort
elfutils-0.137-3.el5
elfutils-libelf-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
elfutils-libelf-devel-static-0.137-3.el5
elfutils-libs-0.137-3.el5

[ajb at Build32R5 ~]$ rpm -qa libdw\*

[ajb at Build32R5 ~]$ rpm -qa libelf\*

[ajb at Build32R5 ~]$ rpm -qa glibc\* | sort
glibc-2.5-58
glibc-common-2.5-58
glibc-devel-2.5-58
glibc-headers-2.5-58
[/quote]
O.k., so the elfutils-0.137 disables dwarf support -- but that was not
fatal. It falls over as shown on the next line. I'm open to
suggestions, please.

The other test was to take those files over to our RHEL 6.0 build
system and, after applying a spot of "fudge factor" to the spec file,
setting the build in motion.

Curses^2.  :-x The build failed. Here follows the relevant (edited)
lines from the stderr --

[quote]
BUILD/kernel-ml-2.6.35/linux-2.6.35.i686/tools/perf/Makefile:512: No
libdw.h found or old libdw.h found or elfutils is older than 0.138,
disables dwarf support. Please install new elfutils-devel/libdw-dev
BUILD/kernel-ml-2.6.35/linux-2.6.35.i686/tools/perf/Makefile:548: ***
No libelf.h/libelf found, please install
libelf-dev/elfutils-libelf-devel and glibc-dev[el].  Stop.
make: *** [tools/perf/] Error 2
[/quote]
A case of deja vu. The packages on that system are --

[quote]
[ajb at Build32R6 ~]$ rpm -qa elfutils\* | sort
elfutils-0.148-1.el6.i686
elfutils-devel-0.148-1.el6.i686
elfutils-libelf-0.148-1.el6.i686
elfutils-libelf-devel-0.148-1.el6.i686
elfutils-libs-0.148-1.el6.i686

[ajb at Build32R6 ~]$ rpm -qa libdw\*

[ajb at Build32R6 ~]$ rpm -qa libelf\*

[ajb at Build32R6 ~]$ rpm -qa glibc\* | sort
glibc-2.12-1.7.el6_0.3.i686
glibc-common-2.12-1.7.el6_0.3.i686
glibc-devel-2.12-1.7.el6_0.3.i686
glibc-headers-2.12-1.7.el6_0.3.i686
[/quote]
With elfutils-0.148 I'm surprised to see that dwarf support was still
disabled. I see the warning message is written somewhat ambiguously .
. .

[quote]
No libdw.h found or old libdw.h found or elfutils is older than 0.138,
disables dwarf support. Please install new elfutils-devel/libdw-dev
[/quote]

And at that point, I stopped trying to build the perf sub-package.

Any hints will be warmly welcomed. :-)

Alan.



More information about the elrepo-devel mailing list