Bug 726917 - addition of papi-static package for inclusion of libpapi.a is desirable (Enhancement Request)
Summary: addition of papi-static package for inclusion of libpapi.a is desirable (Enha...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: papi
Version: 14
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: William Cohen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-30 20:05 UTC by Jack Perdue
Modified: 2011-10-25 18:00 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-25 18:00:37 UTC
Type: ---


Attachments (Terms of Use)
adds -static subpackage (1.09 KB, patch)
2011-07-30 20:36 UTC, Jack Perdue
no flags Details | Diff

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


Note You need to log in before you can comment on or make changes to this bug.