Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1573096

Summary: papi: Partial build flags injection
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: papiAssignee: William Cohen <wcohen>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: lberk, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: papi-5.6.0-5.fc28.src.rpm papi-5.6.0-5.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-11 01:23:36 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:
Bug Depends On:    
Bug Blocks: 1539083    

Description Florian Weimer 2018-04-30 08:03:39 UTC
papi-5.6.0-4.fc28.x86_64 contains several binaries not linked with the standard Fedora linker flags (LDFLAGS) from redhat-rpm-config.  Specifically, the build log contains this:

gcc -ldl  -o papi_version papi_version.o ../libpapi.a

And:

gcc -ldl  -o papi_cost papi_cost.o cost_utils.o ../libpapi.a -lm

So LDFLAGS are missing completely.

See https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildflags.md for information on RPM macros and environment variables provided by the build environment.

Comment 1 William Cohen 2018-04-30 16:23:15 UTC
Not sure why LDFLAGS value not being substituted for @LDFLAGS@ in various places (Makefile.in and utils/Makefile.target.in). See other @*@ variables such as @LDL@ and @PAPICFLAGS@ being correctly replaced. config.log has:

LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
LDL='-ldl'
LIBOBJS=''
LIBRARY='libpapi.a'
...
PAPICFLAGS='-DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE  -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"/usr/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS'


config.status:


S["LDFLAGS"]="-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld"
S["CFLAGS"]="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-swit"\
"ches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -g -Wextra  -Wall"
...
S["PAPICFLAGS"]="-DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE  -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\\\"/usr/include/perfmon/perf_event.h\\\" -D_REENTRANT -D_GN"\
"U_SOURCE -DUSE_COMPILER_TLS"
S["VLIB"]="libpapi.so.$(PAPIVER)"

Comment 2 Fedora Update System 2018-04-30 18:41:02 UTC
papi-5.6.0-5.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-5f7b78636d

Comment 3 Fedora Update System 2018-05-01 14:13:23 UTC
papi-5.6.0-5.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-5f7b78636d

Comment 4 Fedora Update System 2018-05-11 01:23:36 UTC
papi-5.6.0-5.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.