On 21.04.2015 08:48, 饶俊明 wrote:
Hello
When compress libvirt-0.10.2-46.el6.src.rpm to support rbd, then failed;
Error log:
cc1: warnings being treated as errors
storage/storage_backend_rbd.c: In function 'virStorageBackendRBDRefreshPool':
storage/storage_backend_rbd.c:284: error: declaration of 'stat' shadows a global
declaration [-Wshadow]
/usr/include/sys/stat.h:455: error: shadowed declaration is here [-Wshadow]
At top level:
cc1: error: unrecognized command line option "-Wno-suggest-attribute=const"
cc1: error: unrecognized command line option "-Wno-suggest-attribute=pure"
make[3]: *** [libvirt_driver_storage_impl_la-storage_backend_rbd.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/home/ada/rpmbuild/BUILD/libvirt-0.10.2/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/ada/rpmbuild/BUILD/libvirt-0.10.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ada/rpmbuild/BUILD/libvirt-0.10.2'
make: *** [all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.g0IuFq (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.g0IuFq (%build)
Thanks!!!
Seems like this patch needs to be backported:
commit 6100cd985c9958f5590875e80597e26118e58bd9
Author: Michael Chapman <mike(a)very.puzzling.org>
AuthorDate: Wed Dec 11 19:14:51 2013 +1100
Commit: Michal Privoznik <mprivozn(a)redhat.com>
CommitDate: Wed Dec 11 10:18:15 2013 +0100
storage_backend_rbd: rename "stat" variable
This variable shadows the stat(2) function, which only became visible in
this scope as of commit 9cac8639. Rename the variable so it doesn't
conflict.
Signed-off-by: Michael Chapman <mike(a)very.puzzling.org>
v1.2.0-117-g6100cd9
Michal