[Libvir] Building libvirt-0.3.3 on CentOS4

Carl Jones carl at rimuhosting.com
Wed Nov 28 19:09:14 UTC 2007

Richard W.M. Jones wrote:
> Daniel P. Berrange wrote:
>> On Wed, Nov 28, 2007 at 01:25:41PM +1300, Carl Jones wrote:
>>> Hi,
>>> I'm trying to build libvirt-0.3.3 on a CentOS4 machine. But I'm 
>>> hitting this error while running 'make':
>>> ./configure --with-init-script=redhat --without-qemu --without-remote 
>>> --without-test --with-xen --without-openvz --without-avahi
>>> [...]
>>> make[2]: Entering directory `/usr/src/redhat/SOURCES/libvirt-0.3.3/src'
>>> gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -I../qemud 
>>> -I/usr/include/libxml2    -DBINDIR=\""/usr/local/libexec"\" 
>>> -DSBINDIR=\""/usr/local/sbin"\" -DSYSCONF_DIR="\"/usr/local/etc\"" 
>>> -DLOCALEBASEDIR=\""/usr/local/share/locale"\" 
>>> -DLOCAL_STATE_DIR=\""/usr/local/var"\" -DGETTEXT_PACKAGE=\"libvirt\" 
>>> -Wall -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra 
>>> -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return 
>>> -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare 
>>> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables 
>>> -DWITH_XEN    -g -O2 -MT virsh-virsh.o -MD -MP -MF 
>>> .deps/virsh-virsh.Tpo -c -o virsh-virsh.o `test -f 'virsh.c' || echo 
>>> './'`virsh.c
>>> virsh.c: In function `vshOutputLogFile':
>>> virsh.c:4577: warning: implicit declaration of function `localtime'
>>> virsh.c:4577: warning: nested extern declaration of `localtime'
>>> virsh.c:4577: warning: assignment makes pointer from integer without 
>>> a cast
>> Looks like its missing an  '#include <time.h>'  statement from virsh.c 
> Carl, can you let us know if adding that include line fixes it for you? 
>  If so I'll make the change in CVS.
> Rich.

After adding that include, it compiles and works nicely. Thanks.


More information about the libvir-list mailing list