On Thu, Jun 30, 2011 at 03:53:01PM +0100, Daniel P. Berrange thus
spake:
> On Thu, Jun 30, 2011 at 07:36:24AM -0700, Jason Helfman wrote:
>> Hi,
>>
>> I get this error when compiling 0.9.3-rc2 on FreeBSD. Is there a fix for
>> this?
>>
>> rpc/virnetsocket.c: In function 'virNetSocketFree':
>> rpc/virnetsocket.c:654: warning: implicit declaration of function 'kill'
>> rpc/virnetsocket.c:654: warning: nested extern declaration of 'kill'
>> [-Wnested-externs]
>> rpc/virnetsocket.c:654: error: 'SIGTERM' undeclared (first use in this
>> function)
>> rpc/virnetsocket.c:654: error: (Each undeclared identifier is
>> reported only
>> once
>> rpc/virnetsocket.c:654: error: for each function it appears in.)
>> gmake[3]: *** [libvirt_net_rpc_la-virnetsocket.lo] Error 1
>> gmake[3]: Leaving directory
>> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/src'
>> gmake[2]: *** [all] Error 2
>> gmake[2]: Leaving directory
>> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/src'
>> gmake[1]: *** [all-recursive] Error 1
>> gmake[1]: Leaving directory
>> `/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3'
>> gmake: *** [all] Error 2
>> *** Error code 1
>
> We're using 'kill' without explicitly including signal.h. I suspect
> we're lucky to get it indirectly on Linux. Try this patch
>
> diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c
> index 96d2dfd..7e63d78 100644
> --- a/src/rpc/virnetsocket.c
> +++ b/src/rpc/virnetsocket.c
> @@ -27,6 +27,7 @@
> #include <sys/socket.h>
> #include <unistd.h>
> #include <sys/wait.h>
> +#include <signal.h>
>
> #ifdef HAVE_NETINET_TCP_H
> # include <netinet/tcp.h>
>
>
> Regards,
> Daniel
> --
> |:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
> |:
http://libvirt.org -o-
http://virt-manager.org :|
> |:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
> |:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|
>
That fixed it, but now I am getting this:
libvirtd-libvirtd.o(.text+0x1537): In function `daemonSetupNetworking':
: undefined reference to `virNetSASLContextNewServer'
libvirtd-remote.o(.text+0xe51e): In function `remoteSASLFinish':
: undefined reference to `virNetSASLSessionGetKeySize'
libvirtd-remote.o(.text+0xe578): In function `remoteSASLFinish':
: undefined reference to `virNetSASLSessionGetIdentity'
libvirtd-remote.o(.text+0xe5a8): In function `remoteSASLFinish':
: undefined reference to `virNetSASLContextCheckIdentity'
libvirtd-remote.o(.text+0xe5cb): In function `remoteSASLFinish':
: undefined reference to `virNetServerClientSetSASLSession'
libvirtd-remote.o(.text+0xe61e): In function `remoteSASLFinish':
: undefined reference to `virNetSASLSessionGetIdentity'
libvirtd-remote.o(.text+0xe67f): In function `remoteSASLFinish':
: undefined reference to `virNetSASLSessionFree'
libvirtd-remote.o(.text+0xe83a): In function
`remoteDispatchAuthSaslStepHelper':
: undefined reference to `virNetSASLSessionServerStep'
libvirtd-remote.o(.text+0xe8a0): In function
`remoteDispatchAuthSaslStepHelper':
: undefined reference to `virNetSASLSessionFree'
libvirtd-remote.o(.text+0xeaac): In function
`remoteDispatchAuthSaslStepHelper':
: undefined reference to `virNetSASLSessionGetIdentity'
libvirtd-remote.o(.text+0xec78): In function
`remoteDispatchAuthSaslStartHelper':
: undefined reference to `virNetSASLSessionServerStart'
libvirtd-remote.o(.text+0xecde): In function
`remoteDispatchAuthSaslStartHelper':
: undefined reference to `virNetSASLSessionFree'
libvirtd-remote.o(.text+0xeeec): In function
`remoteDispatchAuthSaslStartHelper':
: undefined reference to `virNetSASLSessionGetIdentity'
libvirtd-remote.o(.text+0xf10f): In function
`remoteDispatchAuthSaslInitHelper':
: undefined reference to `virNetSASLSessionFree'
libvirtd-remote.o(.text+0xf157): In function
`remoteDispatchAuthSaslInitHelper':
: undefined reference to `virNetSASLSessionNewServer'
libvirtd-remote.o(.text+0xf1a2): In function
`remoteDispatchAuthSaslInitHelper':
: undefined reference to `virNetSASLSessionSecProps'
libvirtd-remote.o(.text+0xf1aa): In function
`remoteDispatchAuthSaslInitHelper':
: undefined reference to `virNetSASLSessionListMechanisms'
libvirtd-remote.o(.text+0xf26e): In function
`remoteDispatchAuthSaslInitHelper':
: undefined reference to `virNetSASLSessionExtKeySize'
libvirtd-remote.o(.text+0xf29b): In function
`remoteDispatchAuthSaslInitHelper':
: undefined reference to `virNetSASLSessionSecProps'
gmake[3]: *** [libvirtd] Error 1
gmake[3]: Leaving directory
`/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/daemon'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3/daemon'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/home/jhelfman/ports/devel/libvirt/work/libvirt-0.9.3'
gmake: *** [all] Error 2
*** Error code 1
Same behaviour here.
Talking in the IRC, we figured out --without-sasl tries to disable the
use of sasl headers but something breaks in the middle.
--
Eduardo Otubo
Software Engineer
Linux Technology Center
IBM Systems & Technology Group
Mobile: +55 19 8135 0885
eotubo(a)linux.vnet.ibm.com