Bug 985105 - Sparse reports "error: attribute '__leaf__': unknown attribute
Summary: Sparse reports "error: attribute '__leaf__': unknown attribute
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sparse
Version: 19
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jeff Layton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-16 19:31 UTC by Chuck Lever
Modified: 2014-06-18 07:43 UTC (History)
2 users (show)

Fixed In Version: sparse-0.4.5.rc1-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-28 01:03:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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