Bug 1188045
| Summary: | pmda-papi building tricky against rhel6 papi4+papi5 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Frank Ch. Eigler <fche> | ||||
| Component: | pcp | Assignee: | Nathan Scott <nathans> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Miloš Prchlík <mprchlik> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.7 | CC: | brolley, lberk, mbenitez, mcermak, mprchlik, wcohen | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | pcp-3.10.3-1.el6 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-07-22 06:24:48 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
Because of compability issues the papi-5.1.1 still has the papi-4.3 libraries around in the old places and special steps need to be taken to use the papi-5.1.1 libraries. I think you will need to do something similar to the example configure for oprofile to make it use the newer papi-5.1.1
./configure --with-kernel-support --host=powerpc64-redhat-linux-gnu --target=ppc64-redhat-linux-gnu --build=powerpc64-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-separate-debug-dir=/usr/lib/debug --enable-abi --with-qt-dir=/usr/lib64/qt-3.3 --with-java=/root/rpmbuild/BUILD/oprofile-0.9.9/java-1.6.0-openjdk-1.6.0.0 --with-extra-include=/usr/lib64/papi-5.1.1/usr/include/perfmon --with-extra-libs=/usr/lib64/papi-5.1.1/usr/lib
Note that once code is build nothing needs to be done to get the shared libraries. There is a /etc/ld.so.conf.d/papi-{%arch}.conf to include the newer shared library in the search.
(In reply to William Cohen from comment #1) > --with-extra-include=/usr/lib64/papi-5.1.1/usr/include/perfmon > --with-extra-libs=/usr/lib64/papi-5.1.1/usr/lib Is there some configury magic with which we can look up that /usr/lib64/papi-5.1.1 string generally? First step is to make it possible for pcp to specify other locations for include/lib. Right now there is nothing in the pcp config to allow getting papi (and libpfm for perf_event) in any place other than the default directories. The following upstream pcp commit in conjunction with the papi-5.1.1-10.el6 build should address this bug:
commit 67bec4f21ddcc26a3604f57f927863b316fa33ba
Author: Frank Ch. Eigler <fche>
Date: Fri Feb 27 16:02:21 2015 -0500
pcp configury: let --with-papi=NNNN accept a pkgconfig module too
With this change, it is possible to pick cflags/ldadd bits for
any version of papi that has .pc pkgconfig files, e.g.:
.../configure --with-papi=papi-5
Kindly tested by wcohen on in-progress rhel-6.7 work.
Created attachment 1000931 [details]
build log
... or --with-papi=papi-5 relying on the pkgconfig logic. > ... or --with-papi=papi-5 relying on the pkgconfig logic.
We're tracking several pending 6.7 pcp fixes now, will do an update early next week with this change too.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1300.html |
A git pcp build against rhel6.6 indicates problems. A direct build against % papi-5.1.1-5.el6.x86_64 % papi-debuginfo-5.1.1-5.el6.x86_64 % papi-devel-5.1.1-5.el6.x86_64 succeeds, but turns out to link against the bundled papi-4.1.3 libraries. (I don't know what knob exists in the papi-devel package to let our code select the more modern library to link to.) Running with papi 4.1.3 is not all bad, except when the default papi.control.multiplex=1 is active, we get a crash in libpapi after just a few events are activated: Program received signal SIGSEGV, Segmentation fault. MPX_start (mpx_events=0x17d5ba0) at multiplex.c:810 810 if ( mev->active++ ) { (gdb) p mev $1 = (MasterEvent *) 0x0 (gdb) up #1 0x00007f80921082dd in PAPI_start (EventSet=<value optimized out>) at papi.c:1232 1232 retval = MPX_start( ESI->multiplex.mpx_evset ); (gdb) q With papi.control.multiplex=0'd, by and large the pmda seems to work, even with papi 4.1.3. Ideally, we should: 1) turn off multiplexing-by-default on old papi 2) find a way of linking to new papi in this mixed-version rpm