[libvirt] Compile libvirt on Solaris
Yang Zhou (yangzho)
yangzho at cisco.com
Thu Sep 6 08:46:33 UTC 2012
Thanks for your answer! I realized actually I don't need to compile QEMU driver because the libvirt client is using Remote driver to talk with libvirtd and then libvirtd will call QUME driver in KVM hypervisor. So I removed the "--with-qume" and trying compiling again only with "--with-esx". This time the error happens on la symbols as followings:
--------------------------------------------------------------------------------------------------------------------------------------------
../src/conf/nwfilter_conf.h:600: warning: parameter has incomplete type
CCLD libvirt_driver_security.la
CCLD libvirt.la
ld: fatal: libvirt.syms: 1616: symbol `virEventAddHandle' is already defined in file: libvirt.syms
collect2: ld returned 1 exit status
*** Error code 1
The following command caused the error:
echo " CCLD " libvirt.la;/bin/bash ../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -DIN_LIBVIRT -I/export/home/yangzhou/hypervisor/libxml2/include/libxml2 -Wall -W -Wformat-y2k -Wformat-security -Winit-self -Wunused -Wunknown-pragmas -Wstrict-aliasing -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Winline -Winvalid-pch -Wdisabled-optimization -Wpacked-bitfield-compat -Wmultichar -Wdeprecated-declarations -Wdiv-by-zero -Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-zero-length -Wformat=2 -Wmultichar -Wno-sign-compare -Wno-format-nonliteral -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -funit-at-a-time -g -O2 -Wl,-M -Wl,libvirt.syms -version-info 9:9:9 -Wl,-z -Wl,nodelete -o libvirt.la -rpath /export/home/yangzhou/hypervisor/libvirt/lib libvirt_util.la libvirt_conf.la libvirt_cpu.la libvirt_vmx.la libvirt_driver.la libvirt_driver_test.la libvirt_driver_remote.la libvirt_driver_vmware.la libvirt_driver_vbox.la libvirt_driver_esx.la libvirt_driver_security.la ../gnulib/lib/libgnu.la -L/export/home/yangzhou/hypervisor/libxml2/lib -lxml2 -lpthread -lz -liconv -lm -lsocket -lnsl -lnsl -lintl
make: Fatal error: Command failed for target `libvirt.la'
Current working directory /export/home/tools/libvirt/src
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/home/tools/libvirt/src
*** Error code 1
The following command caused the error:
fail= failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='gnulib/lib include src daemon tools docs gnulib/tests python tests po examples/domain-events/events-c examples/hellolibvirt examples/dominfo examples/domsuspend examples/python examples/apparmor examples/xml/nwfilter examples/openauth examples/systemtap'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/tools/libvirt
*** Error code 1
make: Fatal error: Command failed for target `all'
bash-3.00#
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
It looks like the symbols are duplicated in ./src/libvirt.la. So I tried to remove duplicated symbols manually and tried the make again. Then new errors happened as followings.
----------------------------------------------------------------------------
bash-3.00# make
make all-recursive
Making all in gnulib/lib
make all-recursive
Making all in include
Making all in libvirt
Making all in src
GEN libvirt.def
make all-am
CCLD libvirt.la
Undefined first referenced
symbol in file
networkNotifyActualDevice libvirt.syms
networkAllocateActualDevice libvirt.syms
networkGetNetworkAddress libvirt.syms
networkBuildDhcpDaemonCommandLine libvirt.syms
networkReleaseActualDevice libvirt.syms
ld: warning: Symbol referencing errors
CC libvirt_qemu_la-libvirt-qemu.lo
CCLD libvirt-qemu.la
Undefined first referenced
symbol in file
_fini /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crti.o (symbol has no version assigned)
_init /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crti.o (symbol has no version assigned)
__dso_handle /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/crtbegin.o (symbol has no version assigned)
_lib_version /usr/ccs/lib/values-Xa.o (symbol has no version assigned)
ld: fatal: Symbol referencing errors. No output written to .libs/libvirt-qemu.so.0.9.9
collect2: ld returned 1 exit status
*** Error code 1
The following command caused the error:
echo " CCLD " libvirt-qemu.la;/bin/bash ../libtool --silent --tag=CC --mode=link gcc -std=gnu99 -I/export/home/yangzhou/hypervisor/libxml2/include/libxml2 -Wall -W -Wformat-y2k -Wformat-security -Winit-self -Wunused -Wunknown-pragmas -Wstrict-aliasing -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls -Wnested-externs -Winline -Winvalid-pch -Wdisabled-optimization -Wpacked-bitfield-compat -Wmultichar -Wdeprecated-declarations -Wdiv-by-zero -Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-zero-length -Wformat=2 -Wmultichar -Wno-sign-compare -Wno-format-nonliteral -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -funit-at-a-time -g -O2 -Wl,-M -Wl,./libvirt_qemu.syms -version-info 9:9:9 -o libvirt-qemu.la -rpath /export/home/yangzhou/hypervisor/libvirt/lib libvirt_qemu_la-libvirt-qemu.lo libvirt.la -lnsl -lintl
make: Fatal error: Command failed for target `libvirt-qemu.la'
Current working directory /export/home/tools/libvirt/src
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /export/home/tools/libvirt/src
*** Error code 1
The following command caused the error:
fail= failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='gnulib/lib include src daemon tools docs gnulib/tests python tests po examples/domain-events/events-c examples/hellolibvirt examples/dominfo examples/domsuspend examples/python examples/apparmor examples/xml/nwfilter examples/openauth examples/systemtap'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(CDPATH="${ZSH_VERSION+.}:" && cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /export/home/tools/libvirt
*** Error code 1
make: Fatal error: Command failed for target `all'
bash-3.00#
-----------------------------------------------------------------------------
Can you help on how to solve it?
Regards,
Yang
-----Original Message-----
From: Daniel P. Berrange [mailto:berrange at redhat.com]
Sent: 2012年9月6日 16:34
To: Daniel Veillard
Cc: Yang Zhou (yangzho); libvir-list at redhat.com
Subject: Re: [libvirt] Compile libvirt on Solaris
On Thu, Sep 06, 2012 at 03:22:12PM +0800, Daniel Veillard wrote:
> On Tue, Sep 04, 2012 at 04:26:55AM +0000, Yang Zhou (yangzho) wrote:
> > Hi Experts,
> >
> > I am compiling libvirt 0.9.9 on Solaris 9. But got following errors when run "./configure --with-esx --with-qemu"
> > --------------------------------------------------------------------
> > -----------------------------------
> > checking for library containing dlopen... -ldl checking for
> > xen_vm_start in -lxenserver... no checking for
> > libxl_domain_create_new in -lxenlight... no checking for xs_read in
> > -lxenstore... no checking linux/kvm.h usability... no checking
> > linux/kvm.h presence... no checking for linux/kvm.h... no checking
> > for shell that supports <> redirection... /bin/sh checking
> > linux/param.h usability... no checking linux/param.h presence... no
> > checking for linux/param.h... no
> > configure: error: You must install kernel-headers in order to
> > compile libvirt with QEMU or LXC support bash-2.05$
> > --------------------------------------------------------------------
> > --------------------------------
> >
> > After look at configure, it's found the headers of linux/param.h,
> > linux/sockios.h. linux/if_bridge.h and linux/if_tun.h are required.
> > Obviously these files are missing on Solaris platform. Anybody can
> > help how to solve this issue?
>
> I'm not sure we still have an active maintainer on Solaris, John
> Levon didn't posted here for ages ...
Even then, he only attempted to have the legacy Xen driver work on Solaris, never the QEMU driver.
So basically if someone wants the QEMU driver to work on Solaris, they'll need to go through and figure out all the non-portable bits and send us patches to fix them.
IIRC, this particular kernel-headers message is because we need to be able to create & pass TAP devices, and configure bridge devices. This will need to be ported to Solaris' interfaces since this stuff is non-portable
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 :|
More information about the libvir-list
mailing list