Bug 985105 - Sparse reports "error: attribute '__leaf__': unknown attribute
Sparse reports "error: attribute '__leaf__': unknown attribute
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: sparse (Show other bugs)
19
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Jeff Layton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-16 15:31 EDT by Chuck Lever
Modified: 2014-06-18 03:43 EDT (History)
2 users (show)

See Also:
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-27 21:03:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chuck Lever 2013-07-16 15:31:53 EDT
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 08:08:08 EDT
Looks like we need this patch:

commit b0b4886be5f668959b8c75c9c811059e07b1073a
Author: Ethan Jackson <ethan@nicira.com>
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 08:26:19 EDT
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 02:06:54 EDT
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 06:46:38 EDT
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-27 21:03:14 EDT
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.

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