Hi all:
Does anyone have a similar problem? Any Suggestions?
THX!
2019-07-18 11:49:14,"netsurfed" <zhuohaofan(a)126.com> :
Hi all:
Unable to install libvirt v5.5.0 correctly through the source code which clone from
git. The error message is shown below.
libtool: install: (cd /home/libvirt/src; /bin/sh /home/libvirt/libtool --silent --tag CC
--mode=relink gcc -std=gnu99 -I/usr/include/libxml2 -fno-common -W -Waddress
-Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast
-Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcomments
-Wcoverage-mismatch -Wcpp -Wdeprecated-declarations -Wdiv-by-zero -Wdouble-promotion
-Wempty-body -Wendif-labels -Wextra -Wformat-contains-nul -Wformat-extra-args
-Wformat-security -Wformat-y2k -Wformat-zero-length -Wfree-nonheap-object
-Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self
-Winline -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wlogical-op -Wmain
-Wmaybe-uninitialized -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers
-Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar
-Wnarrowing -Wnested-externs -Wnonnull -Wold-style-declaration -Wold-style-definition
-Woverflow -Woverride-init -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith
-Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wreturn-local-addr -Wreturn-type
-Wsequence-point -Wshadow -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes
-Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn
-Wsuggest-attribute=pure -Wswitch -Wsync-nand -Wtrampolines -Wtrigraphs -Wtype-limits
-Wuninitialized -Wunknown-pragmas -Wunused -Wunused-but-set-parameter
-Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs
-Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs
-Wvariadic-macros -Wvector-operation-performance -Wvolatile-register-var -Wwrite-strings
-Wnormalized=nfc -Wno-sign-compare -Wjump-misses-init -Wswitch-enum -Wno-format-nonliteral
-fstack-protector-strong -fexceptions -fasynchronous-unwind-tables -fipa-pure-const
-Wno-suggest-attribute=pure -Wno-suggest-attribute=const -Werror -Wframe-larger-than=4096
-g -O2 -module -avoid-version -Wl,-z -Wl,nodelete -export-dynamic -Wl,-z -Wl,relro -Wl,-z
-Wl,now -Wl,--no-copy-dt-needed-entries -Wl,-z -Wl,defs -o libvirt_driver_vbox.la -rpath
/usr/lib/libvirt/connection-driver libvirt_driver_vbox_impl.la libvirt.la
../gnulib/lib/libgnu.la -ldl )
./.libs/libvirt_driver_vbox_impl.a(libvirt_driver_vbox_impl_la-vbox_common.o): In function
`vboxAttachDrives':
/home/libvirt/src/vbox/vbox_common.c:1124: undefined reference to
`virDomainDeviceFindSCSIController'
./.libs/libvirt_driver_vbox_impl.a(libvirt_driver_vbox_impl_la-vbox_common.o): In function
`vboxDomainSnapshotCreateXML':
vbox_common.c:(.text+0x698f): undefined reference to `virObjectAutoUnref'
vbox_common.c:(.text+0x80fa): undefined reference to `virObjectAutoUnref'
./.libs/libvirt_driver_vbox_impl.a(libvirt_driver_vbox_impl_la-vbox_common.o): In function
`vboxDomainSnapshotGetXMLDesc':
vbox_common.c:(.text+0xc430): undefined reference to `virDomainSnapshotDefNew'
vbox_common.c:(.text+0xc7bc): undefined reference to `virObjectAutoUnref'
vbox_common.c:(.text+0xe100): undefined reference to `virObjectAutoUnref'
./.libs/libvirt_driver_vbox_impl.a(libvirt_driver_vbox_impl_la-vbox_common.o): In function
`vboxAttachNetwork.isra.17':
vbox_common.c:(.text+0x10656): undefined reference to `virDomainNetModelTypeToString'
./.libs/libvirt_driver_vbox_impl.a(libvirt_driver_vbox_impl_la-vbox_common.o): In function
`vboxDomainGetXMLDesc':
vbox_common.c:(.text+0x1574d): undefined reference to `virDomainHostdevDefNew'
collect2: error: ld returned 1 exit status
libtool: install: error: relink `libvirt_driver_vbox.la' with the above command before
installing it
make[3]: *** [install-modLTLIBRARIES] Error 1
make[3]: Leaving directory `/home/libvirt/src'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory `/home/libvirt/src'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/libvirt/src'
make: *** [install-recursive] Error 1
Here's how I do it.
[root@localhost libvirt]# uname -a
Linux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017
x86_64 x86_64 x86_64 GNU/Linux
[root@localhost libvirt]# git clone
https://libvirt.org/git/libvirt.git
[root@localhost libvirt]# cd libvirt
[root@localhost libvirt]# git checkout v5.5.0
[root@localhost libvirt]# ./autogen.sh
[root@localhost libvirt]# ./configure --prefix=/usr --sysconfdir=/etc
--localstatedir=/var
[root@localhost libvirt]# make -j32
[root@localhost libvirt]# make install