[libvirt] building error

Wen Congyang wency at cn.fujitsu.com
Thu Jun 30 00:13:55 UTC 2011


At 06/29/2011 11:04 PM, Eric Blake Write:
> On 06/29/2011 05:18 AM, Wen Congyang wrote:
>> When I build libvirt, I meet the following error:
>> make[3]: Entering directory `/home/wency/rpmbuild/BUILD/libvirt-0.9.2/daemon'
>>   CC     libvirtd-libvirtd.o
>>   CC     libvirtd-remote.o
>> remote.c: In function 'remoteDispatchAuthPolkit':
>> remote.c:2043: error: invalid initializer
>> make[3]: *** [libvirtd-remote.o] Error 1
>>
>> This patch can fix the problem. But I do not know whether it is right.
> 
> This sounds highly related to Matthias' issue:
> https://www.redhat.com/archives/libvir-list/2011-June/msg01484.html
> 
> What version of systemtap headers and gcc are you using, that produce
> this error?

I use RHEL6RC, and the version of systemtap headers and gcc are:

# rpm -qa 'systemtap*'
systemtap-sdt-devel-1.2-9.el6.x86_64
systemtap-runtime-1.2-9.el6.x86_64
systemtap-1.2-9.el6.x86_64
# rpm -q gcc
gcc-4.4.4-13.el6.x86_64


> 
>> +++ b/daemon/remote.c
>> @@ -2041,7 +2041,7 @@ remoteDispatchAuthPolkit(virNetServerPtr server ATTRIBUTE_UNUSED,
>>          goto authdeny;
>>      }
>>      PROBE(CLIENT_AUTH_ALLOW, "fd=%d, auth=%d, username=%s",
>> -          virNetServerClientGetFD(client), REMOTE_AUTH_POLKIT, ident);
>> +          virNetServerClientGetFD(client), REMOTE_AUTH_POLKIT, (char *)ident);
> 
> If a cast really helps matters, I'd almost rather hide it within the
> #define PROBE() than make callers have to worry about it, but I'm
> reluctant to add a cast without knowing exactly why you are hitting
> compilation failure.
> 




More information about the libvir-list mailing list