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 1134453

Summary: pkg-config --libs contains cflags
Product: [Fedora] Fedora Reporter: Richard W.M. Jones <rjones>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: agedosier, berrange, clalancette, eblake, itamar, jforbes, laine, libvirt-maint, veillard, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.1.3.6-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1134454 1134455 (view as bug list) Environment:
Last Closed: 2014-09-19 10:13:53 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: 910269, 1134454, 1134455    

Description Richard W.M. Jones 2014-08-27 14:19:53 UTC
Description of problem:

$ pkg-config --libs libvirt
-lvirt -ldl -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic 

obviously only -lvirt and possibly -ldl should be there.

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

libvirt-1.1.3.5-2.fc20.x86_64

Additional info:

Upstream fix is

commit 1167751fcb949b44eddf3d0bfed5473e13c7e94a
Author: Daniel P. Berrange <berrange>
Date:   Fri Jun 20 17:45:05 2014 +0100

    Don't include @LIBS@ in libvirt.pc.in file
    
    The libvirt.pc file we install is ending up polluted with a
    load of compiler flags that should be private to the libvirt
    build. eg
    
    Libs: -L${libdir} -lvirt -ldl -O2 -g -pipe -Wall \
          -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \
          -fstack-protector-strong --param=ssp-buffer-size=4 \
          -grecord-gcc-switches  -m64 -mtune=generic
    
    this is caused by including @LIBS@ in the Libs: line of the
    pkgconfig.pc.in file.

Comment 1 Eric Blake 2014-08-27 14:22:37 UTC
Next build for Fedora will be fixed; this is on the v1.1.3-maint branch now

commit 76ad3133fae206f6ccb3f3c0528c2ec6bd6b62bb
Author: Daniel P. Berrange <berrange>
Date:   Fri Jun 20 17:45:05 2014 +0100

    Don't include @LIBS@ in libvirt.pc.in file
... 
    (cherry picked from commit 1167751fcb949b44eddf3d0bfed5473e13c7e94a)

Comment 2 Fedora Update System 2014-09-14 19:00:34 UTC
libvirt-1.1.3.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-10432/libvirt-1.1.3.6-1.fc20

Comment 3 Fedora Update System 2014-09-19 10:13:53 UTC
libvirt-1.1.3.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.