Bug 1295694

Summary: pcp building against papi4 instead of available papi5
Product: Red Hat Enterprise Linux 6 Reporter: Miloš Prchlík <mprchlik>
Component: pcpAssignee: Nathan Scott <nathans>
Status: CLOSED ERRATA QA Contact: Miloš Prchlík <mprchlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: brolley, fche, lberk, mbenitez, mgoodwin
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcp-3.10.9-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 21:13:20 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:

Description Miloš Prchlík 2016-01-05 09:44:41 UTC
Description of problem:


As discussed in https://bugzilla.redhat.com/show_bug.cgi?id=1188045 pmda_papi.so in RHEL6.7 (pcp-3.10.3-3.el6)) was linked against papi5 (papi-5.1.1, libpapi.so.5) because of these pcp.spec lines:

%if !%{disable_papi}
%define _with_papi --with-papi=/usr/lib64/papi-5.1.1/usr
%endif

These are gone in pcp-3.10.9-2.el6:

%if !%{disable_papi}
%global _with_papi --with-papi=yes
%endif

... which leads to pmcd_papi.so being linked against /usr/lib64/libpapi.so.4.1.3.0. This looks a regression to me.


Version-Release number of selected component (if applicable):

pcp-3.10.9-2.el6


How reproducible:


Steps to Reproduce:
1. simple rebuild of pcp package with papi installed (rpmbuild -bc pcp.spec) is enough to get src/pmdas/papi/pmda_papi.so and check it by ldd
2.
3.


Actual results:

pcp-3.10.9-2.el6:
root@x86-64-v11 tmp2]# ldd /var/lib/pcp/pmdas/papi/pmda_papi.so 
        linux-vdso.so.1 =>  (0x00007ffce2aec000)
        libpapi.so => /usr/lib64/papi-4.1.3/libpapi.so (0x00007effcff4b000)

local scratch build:
[root@x86-64-v11 ~]# ldd /tmp/tmp.PfUvrQwhwJ/BUILD/pcp-3.10.9/src/pmdas/papi/pmda_papi.so 
        linux-vdso.so.1 =>  (0x00007ffcb69ba000)
        libpapi.so => /usr/lib64/papi-4.1.3/libpapi.so (0x00007fdf9d45c000)
        ...


Expected results:

local scratch build:
[root@x86-64-v11 ~]# ldd /tmp/tmp.PfUvrQwhwJ/BUILD/pcp-3.10.9/src/pmdas/papi/pmda_papi.so 
        linux-vdso.so.1 =>  (0x00007ffcb6d2f000)
        libpapi.so.5 => /usr/lib64/papi-5.1.1/usr/lib/libpapi.so.5 (0x00007f0cc5d6b000)

pcp-3.10.3-3.el6:
[root@x86-64-v11 tmp2]# ldd /root/tmp2/var/lib/pcp/pmdas/papi/pmda_papi.so 
        linux-vdso.so.1 =>  (0x00007ffdc554e000)
        libpapi.so.5 => /usr/lib64/papi-5.1.1/usr/lib/libpapi.so.5 (0x00007fb86c619000)



Additional info:

Comment 2 Miloš Prchlík 2016-01-12 09:37:14 UTC
Works on x86_64 and ppc64 (s390x does not support papi at all), but fails on x86. While spec file is passing the --with-papi option a 5.1.1 papi version, it's forcing /usr/lib64/papi-5.1.1/usr directory, and there's no /usr/lib64 on x86. Non-existent directory in gcc's -L option leads to gcc picking 4.1.3 libpapi.so by default.

Comment 4 Miloš Prchlík 2016-02-08 09:46:00 UTC
Verified for build pcp-3.10.9-5.el6.

Comment 6 errata-xmlrpc 2016-05-10 21:13:20 UTC
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-2016-0825.html