Bug 726917

Summary: addition of papi-static package for inclusion of libpapi.a is desirable (Enhancement Request)
Product: [Fedora] Fedora Reporter: Jack Perdue <ss>
Component: papiAssignee: William Cohen <wcohen>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 14CC: wcohen
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-25 18:00:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
adds -static subpackage none

Description Jack Perdue 2011-07-30 20:05:10 UTC
Description of problem:

At present, as the papi.spec file notes, the static libs for PAPI are excluded from the papi package. i.e.

# Remove the static libraries. Static libraries are undesirable:
# https://fedoraproject.org/wiki/Packaging/Guidelines#Packaging_Static_Libraries
rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a

However, the guidelines cited also mention that, given good reason, a package can include a -static subpackage with said libraries as needed.

PAPI is a bit different than most packages as it is often used in instrumenting pre-existing applications (by some of the tools that use it) for performance profiling.  For example, Rice's HPCTookit includes a utility called hpclink for inserting the needed PAPI code in to statically linked applications. 
(e.g. the PAPI counters in the example at the next link needed libpapi.a)

http://hpctoolkit.org/man/hpclink.html

Although statically linked apps are quite rightly frowned upon there are still times when they are preferred (e.g. on diskless compute nodes in a cluster).

In the case of PAPI, I think it is appropriate to make the static version available.

I do not foresee any requirement for any new package to use it (and thus a "BuildRequires: papi-static" _would_ be a big warning sign).  However, I do foresee the need for a "Requires: papi-static" for any tool like HPCToolkit that might need it for its operation (not that HPCToolkit will be acceptable for distribution by Fedora any time soon since it includes a binary blob from Intel, but for those, like myself (and maybe RPMFusion), who like to package it on our own, a full set of PAPI libs is needed). 

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

papi-4.1.0-1.fc14.x86_64


How reproducible:

Build HPCToolkit with the currently included papi package.  


Steps to Reproduce:
1. yum install papi\*
2. Follow instructions at:
http://www.hpctoolkit.org/software-instructions.html
   be sure to include --with-papi when you configure
3. Try to run hpclink.
  
Actual results:

$ cat hello.c 
#include <stdio.h>
main(){printf("\nHello world\n");}
$ hpclink cc -static hello.c
/usr/bin/ld: cannot find -lpapi
/usr/bin/ld: cannot find -lpfm
(misc. other messages)

Expected/desired results:

libpapi.a and libpfm.a are found.

Comment 1 Jack Perdue 2011-07-30 20:36:20 UTC
Created attachment 515988 [details]
adds -static subpackage

What I am using here as a patch to make HPCToolkit happy.

Comment 2 William Cohen 2011-08-12 19:51:07 UTC
Modified the rawhide version of papi to produce a papi-static subpackage.  Could you try out the papi-4.1.3-3 package in koji?

http://koji.fedoraproject.org/koji/buildinfo?buildID=258354