[libvirt] make check error

Hi guys, I made a automated test for the libvirt code in git source repository right now, It reported a check error. The operation steps and error info are as following: ubuntu@ubuntu:~/github/libvirt.git$ ./autogen.sh ubuntu@ubuntu:~/github/libvirt.git$ ./configure --enable-werror ubuntu@ubuntu:~/github/libvirt.git$ make check ............ make check-local make[3]: Entering directory `/home/ubuntu/github/libvirt.git/daemon' GEN check-augeas make[3]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon' make[2]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon' make[1]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon' Making check in tools make[1]: Entering directory `/home/ubuntu/github/libvirt.git/tools' GEN libvirt-guests.sh make check-am make[2]: Entering directory `/home/ubuntu/github/libvirt.git/tools' CC virsh-virsh.o CC virsh-virsh-console.o CC virsh-virsh-domain.o virsh-domain.c: In function 'cmdMetadata': virsh-domain.c:6857:10: error: declaration of 'remove' shadows a global declaration [-Werror=shadow] cc1: all warnings being treated as errors make[2]: *** [virsh-virsh-domain.o] Error 1 make[2]: Leaving directory `/home/ubuntu/github/libvirt.git/tools' make[1]: *** [check] Error 2 make[1]: Leaving directory `/home/ubuntu/github/libvirt.git/tools' make: *** [check-recursive] Error 1 What's the problem? Thanks. BTW, The code version is: ubuntu@ubuntu:~/github/libvirt.git$ git branch -a -v * master 7655ed0 conf: Don't corrupt metadata on OOM remotes/origin/HEAD -> origin/master remotes/origin/master 7655ed0 conf: Don't corrupt metadata on OOM ------------------ Best regards! GuanQiang 2013-09-17

On 09/17/13 13:31, hzguanqiang@corp.netease.com wrote:
Hi guys, I made a automated test for the libvirt code in git source repository right now, It reported a check error.
The operation steps and error info are as following:
ubuntu@ubuntu:~/github/libvirt.git$ ./autogen.sh ubuntu@ubuntu:~/github/libvirt.git$ ./configure --enable-werror ubuntu@ubuntu:~/github/libvirt.git$ make check ............ make check-local make[3]: Entering directory `/home/ubuntu/github/libvirt.git/daemon' GEN check-augeas make[3]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon' make[2]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon' make[1]: Leaving directory `/home/ubuntu/github/libvirt.git/daemon' Making check in tools make[1]: Entering directory `/home/ubuntu/github/libvirt.git/tools' GEN libvirt-guests.sh make check-am make[2]: Entering directory `/home/ubuntu/github/libvirt.git/tools' CC virsh-virsh.o CC virsh-virsh-console.o CC virsh-virsh-domain.o virsh-domain.c: In function 'cmdMetadata': virsh-domain.c:6857:10: error: declaration of 'remove' shadows a global declaration [-Werror=shadow]
Your system is apparently polluting the global namespace with a symbol named remove. I'll post patches soon.
cc1: all warnings being treated as errors make[2]: *** [virsh-virsh-domain.o] Error 1 make[2]: Leaving directory `/home/ubuntu/github/libvirt.git/tools' make[1]: *** [check] Error 2 make[1]: Leaving directory `/home/ubuntu/github/libvirt.git/tools' make: *** [check-recursive] Error 1
Peter

On 09/17/2013 05:43 AM, Peter Krempa wrote:
On 09/17/13 13:31, hzguanqiang@corp.netease.com wrote:
Hi guys, I made a automated test for the libvirt code in git source repository right now, It reported a check error.
The operation steps and error info are as following:
CC virsh-virsh-domain.o virsh-domain.c: In function 'cmdMetadata': virsh-domain.c:6857:10: error: declaration of 'remove' shadows a global declaration [-Werror=shadow]
Your system is apparently polluting the global namespace with a symbol named remove. I'll post patches soon.
In particular, <stdio.h> declares remove(), and your system has an older gcc that loves to warn about the conflict (newer gcc seems to be a bit quieter about it, though, which is why it snuck in in the first place). At any rate, we've frequently patched problems like this in the past, such as in commit cbe31911. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 09/17/13 13:43, Peter Krempa wrote:
On 09/17/13 13:31, hzguanqiang@corp.netease.com wrote:
Hi guys, I made a automated test for the libvirt code in git source repository right now, It reported a check error.
The operation steps and error info are as following:
ubuntu@ubuntu:~/github/libvirt.git$ ./autogen.sh ubuntu@ubuntu:~/github/libvirt.git$ ./configure --enable-werror ubuntu@ubuntu:~/github/libvirt.git$ make check
...
Your system is apparently polluting the global namespace with a symbol named remove. I'll post patches soon.
Should be now fixed: commit 6bf4c779841f858872003ffe6a97df395b2940e6 Author: Peter Krempa <pkrempa@redhat.com> Date: Tue Sep 17 13:40:08 2013 +0200 virsh: Don't shadow global variable "remove" in cmdMetadata Some systems apparently have a global variable/function called remove and thus break compilation of virsh-domain.c. Rename the variable to avoid this. Reported by GuanQiang. Peter

HI Peter, It's ok now. Thanks. On 2013-09-17 20:03 , Peter Krempa wrote: On 09/17/13 13:43, Peter Krempa wrote:
On 09/17/13 13:31, hzguanqiang@corp.netease.com wrote:
Hi guys, I made a automated test for the libvirt code in git source repository right now, It reported a check error.
The operation steps and error info are as following:
ubuntu@ubuntu:~/github/libvirt.git$ ./autogen.sh ubuntu@ubuntu:~/github/libvirt.git$ ./configure --enable-werror ubuntu@ubuntu:~/github/libvirt.git$ make check
...
Your system is apparently polluting the global namespace with a symbol named remove. I'll post patches soon.
Should be now fixed: commit 6bf4c779841f858872003ffe6a97df395b2940e6 Author: Peter Krempa <pkrempa@redhat.com> Date: Tue Sep 17 13:40:08 2013 +0200 virsh: Don't shadow global variable "remove" in cmdMetadata Some systems apparently have a global variable/function called remove and thus break compilation of virsh-domain.c. Rename the variable to avoid this. Reported by GuanQiang. Peter ------------------ Best regards! GuanQiang 20:32:55
participants (3)
-
Eric Blake
-
hzguanqiang@corp.netease.com
-
Peter Krempa