Red Hat Bugzilla – Bug 985105
Sparse reports "error: attribute '__leaf__': unknown attribute
Last modified: 2014-06-18 03:43:16 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
[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.
Steps to Reproduce:
1. Unpack fedfs-utils-0.9.2.tar.gz
2. CC=cgcc ./configure --enable-silent-rules
3. make -s
Hundreds of sparse errors complaining about unknown __leaf__ attribute in system header files, followed by "error: too many errors".
__leaf__ should be ignored.
Compilation is successful, but the diagnostic capabilities of sparse are made useless.
Looks like we need this patch:
Author: Ethan Jackson <email@example.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...
sparse-0.4.4-7.fc19 has been submitted as an update for Fedora 19.
* 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:
then log in and leave karma (feedback).
sparse-0.4.5.rc1-1.fc19 has been submitted as an update for Fedora 19.
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.