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 958290

Summary: gtk-doc.make runs afoul of "%global _hardened_build 1"
Product: [Fedora] Fedora Reporter: Dan Williams <dcbw>
Component: gtk-docAssignee: Matthias Clasen <mclasen>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-30 20:53:18 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: 853199    

Description Dan Williams 2013-04-30 20:26:50 UTC
gcc: fatal error: /usr/lib/rpm/redhat/redhat-hardened-cc1: attempt to rename spec 'cc1_options' to already defined spec 'rh_cc1_options_old'
compilation terminated.
Compilation of scanner failed: 
make[3]: *** [scan-build.stamp] Error 1

for which the fix is apparently to remove CFLAGS and LDFLAGS from a line because they got specified already in the definition of GTKDOC_CC and GTKDOC_LD:

diff -up NetworkManager-0.9.8.1/gtk-doc.make.foo NetworkManager-0.9.8.1/gtk-doc.make
--- NetworkManager-0.9.8.1/gtk-doc.make.foo	2013-04-30 15:16:13.049980141 -0500
+++ NetworkManager-0.9.8.1/gtk-doc.make	2013-04-30 15:17:41.525874040 -0500
@@ -108,7 +108,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_
 	            scanobj_options="--verbose"; \
 	        fi; \
 	    fi; \
-	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" \
 	    gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
 	else \
 	    for i in $(SCANOBJ_FILES) ; do \

Comment 1 Matthias Clasen 2013-04-30 20:52:10 UTC
this is a deficiency of the way the hardened build macro is implemented. I proposed a fix for that here: https://bugzilla.redhat.com/show_bug.cgi?id=892837

Comment 2 Matthias Clasen 2013-04-30 20:53:18 UTC

*** This bug has been marked as a duplicate of bug 892837 ***