Bug 985105

Summary: Sparse reports "error: attribute '__leaf__': unknown attribute
Product: [Fedora] Fedora Reporter: Chuck Lever <chuck.lever>
Component: sparseAssignee: Jeff Layton <jlayton>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 19CC: jlayton, steved
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sparse-0.4.5.rc1-1.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-28 01:03:14 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:

Description Chuck Lever 2013-07-16 19:31:53 UTC
Description of problem:

Compiling fedfs-utils package on Fedora 19 with CC=cgcc.  Hundreds of warnings like this:

  /usr/include/stdlib.h:594:28: error: attribute '__leaf__': unknown attribute

Each compilation stops reporting errors and warnings, making sparse unusable with system headers on Fedora 19.

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

[cel@seurat fedfs-utils]$ which cgcc
/bin/cgcc
[cel@seurat fedfs-utils]$ cgcc --version
cc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[cel@seurat fedfs-utils]$

How reproducible:

Always.

Steps to Reproduce:
1. Unpack fedfs-utils-0.9.2.tar.gz
2. CC=cgcc ./configure --enable-silent-rules
3. make -s

Actual results:

Hundreds of sparse errors complaining about unknown __leaf__ attribute in system header files, followed by "error: too many errors".

Expected results:

__leaf__ should be ignored.

Additional info:

Compilation is successful, but the diagnostic capabilities of sparse are made useless.

Comment 1 Jeff Layton 2013-07-17 12:08:08 UTC
Looks like we need this patch:

commit b0b4886be5f668959b8c75c9c811059e07b1073a
Author: Ethan Jackson <ethan>
Date:   Tue Jan 17 14:47:11 2012 -0800

    sparse: Add 'leaf' to ignored attributes.
    
    This patch adds the 'leaf' GCC attribute to the list of ignored
    attributes.  Glibc uses this attribute causing the following
    warnings in userspace projects:
    
      /usr/include/stdlib.h:514:26: error: attribute '__leaf__': unknown attribute
    
...but maybe it'd be best to just go ahead and move sparse to 0.4.5.rc1? I've already got a build for it in rawhide...

Comment 2 Fedora Update System 2013-07-17 12:26:19 UTC
sparse-0.4.4-7.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/sparse-0.4.4-7.fc19

Comment 3 Fedora Update System 2013-07-18 06:06:54 UTC
Package sparse-0.4.4-7.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing sparse-0.4.4-7.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13193/sparse-0.4.4-7.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-18 10:46:38 UTC
sparse-0.4.5.rc1-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/sparse-0.4.5.rc1-1.fc19

Comment 5 Fedora Update System 2013-07-28 01:03:14 UTC
sparse-0.4.5.rc1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.