Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom-built libvirt, libguestfs and supermin #631

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

ivan4th
Copy link
Contributor

@ivan4th ivan4th commented Mar 16, 2018

  • Initial implementation of libvirt build
  • Fix libvirtd.conf (listen addr)
  • Try to use newer libvirt than 3.7.0 (failed, postponing this part, see the comment below)
  • Fix loop device problem (e2e failure)

This change is Reviewable

@ivan4th ivan4th force-pushed the ivan4th/custom-built-libvirt branch from 0362177 to 0637d08 Compare March 16, 2018 12:16
@ivan4th ivan4th changed the title Use custom-built libvirt, libguestfs and supermin [WiP] Use custom-built libvirt, libguestfs and supermin Mar 16, 2018
@ivan4th ivan4th force-pushed the ivan4th/custom-built-libvirt branch 5 times, most recently from a5e6419 to 6918f9a Compare March 20, 2018 11:14
@ivan4th
Copy link
Contributor Author

ivan4th commented Mar 20, 2018

Tried switching to libvirt-4.1.0 but got a build error, so postponing it till we need newer libvirt version. Excerpt from the build log (--without-nwfilter doesn't change anything, first tried without it):

libtool: warning: relinking 'libvirt_driver_nwfilter.la'
libtool: install: (cd /libvirt/src; /bin/bash "/libvirt/libtool"  --silent --tag CC --mode=relink gcc -I/usr/include/libxml2 -fno-common -W -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wchkp -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdate-time -Wdeprecated-declarations -Wdesignated-init -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -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 -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-transposed-args -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -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 -Wshift-count-negative -Wshift-count-overflow -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -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 -Warray-bounds=2 -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 -DLIBXL_API_VERSION=0x040400 -module -avoid-version -export-dynamic -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--no-copy-dt-needed-entries -Wl,-z -Wl,defs -o libvirt_driver_nwfilter.la -rpath /usr/local/lib/libvirt/connection-driver libvirt_driver_nwfilter_impl.la -ldl )
libtool: install: /usr/bin/install -c .libs/libvirt_storage_backend_zfs.soT /usr/local/lib/libvirt/storage-backend/libvirt_storage_backend_zfs.so
libtool: install: /usr/bin/install -c .libs/libvirt_storage_backend_zfs.lai /usr/local/lib/libvirt/storage-backend/libvirt_storage_backend_zfs.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/lib/libvirt/storage-backend
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/libvirt/storage-backend

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the 'LD_RUN_PATH' environment variable
     during linking
   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to '/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterStateInitialize':
/libvirt/src/nwfilter/nwfilter_driver.c:192: undefined reference to `virNWFilterObjListNew'
/libvirt/src/nwfilter/nwfilter_driver.c:249: undefined reference to `virNWFilterObjListLoadAllConfigs'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterDefineXML':
/libvirt/src/nwfilter/nwfilter_driver.c:579: undefined reference to `virNWFilterObjListAssignDef'
/libvirt/src/nwfilter/nwfilter_driver.c:582: undefined reference to `virNWFilterObjGetDef'
/libvirt/src/nwfilter/nwfilter_driver.c:584: undefined reference to `virNWFilterSaveConfig'
/libvirt/src/nwfilter/nwfilter_driver.c:585: undefined reference to `virNWFilterObjListRemove'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterConnectListAllNWFilters':
/libvirt/src/nwfilter/nwfilter_driver.c:547: undefined reference to `virNWFilterObjListExport'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterConnectListNWFilters':
/libvirt/src/nwfilter/nwfilter_driver.c:526: undefined reference to `virNWFilterObjListGetNames'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterStateReload':
/libvirt/src/nwfilter/nwfilter_driver.c:302: undefined reference to `virNWFilterObjListLoadAllConfigs'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterObjFromNWFilter':
/libvirt/src/nwfilter/nwfilter_driver.c:438: undefined reference to `virNWFilterObjListFindByUUID'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterGetXMLDesc':
/libvirt/src/nwfilter/nwfilter_driver.c:662: undefined reference to `virNWFilterObjGetDef'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterUndefine':
/libvirt/src/nwfilter/nwfilter_driver.c:616: undefined reference to `virNWFilterObjGetDef'
/libvirt/src/nwfilter/nwfilter_driver.c:621: undefined reference to `virNWFilterObjTestUnassignDef'
/libvirt/src/nwfilter/nwfilter_driver.c:628: undefined reference to `virNWFilterDeleteDef'
/libvirt/src/nwfilter/nwfilter_driver.c:631: undefined reference to `virNWFilterObjListRemove'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterLookupByUUID':
/libvirt/src/nwfilter/nwfilter_driver.c:461: undefined reference to `virNWFilterObjGetDef'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterLookupByName':
/libvirt/src/nwfilter/nwfilter_driver.c:483: undefined reference to `virNWFilterObjListFindByName'
/libvirt/src/nwfilter/nwfilter_driver.c:491: undefined reference to `virNWFilterObjGetDef'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_driver.o): In function `nwfilterConnectNumOfNWFilters':
/libvirt/src/nwfilter/nwfilter_driver.c:510: undefined reference to `virNWFilterObjListNumOfNWFilters'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_gentech_driver.o): In function `virNWFilterDetermineMissingVarsRec':
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:538: undefined reference to `virNWFilterObjListFindInstantiateFilter'
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:548: undefined reference to `virNWFilterObjGetDef'
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:552: undefined reference to `virNWFilterObjGetNewDef'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_gentech_driver.o): In function `virNWFilterIncludeDefToRuleInst':
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:387: undefined reference to `virNWFilterObjListFindInstantiateFilter'
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:396: undefined reference to `virNWFilterObjGetDef'
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:400: undefined reference to `virNWFilterObjGetNewDef'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_gentech_driver.o): In function `virNWFilterInstantiateFilterUpdate':
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:787: undefined reference to `virNWFilterObjListFindInstantiateFilter'
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:815: undefined reference to `virNWFilterObjGetDef'
/libvirt/src/nwfilter/nwfilter_gentech_driver.c:819: undefined reference to `virNWFilterObjGetNewDef'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_dhcpsnoop.o): In function `virNWFilterSnoopDHCPDecode':
/libvirt/src/nwfilter/nwfilter_dhcpsnoop.c:1030: undefined reference to `virSocketAddrSetIPv4AddrNetOrder'
/libvirt/src/nwfilter/nwfilter_dhcpsnoop.c:1033: undefined reference to `virSocketAddrSetIPv4AddrNetOrder'
/libvirt/src/nwfilter/nwfilter_dhcpsnoop.c:1030: undefined reference to `virSocketAddrSetIPv4AddrNetOrder'
/libvirt/src/nwfilter/nwfilter_dhcpsnoop.c:1033: undefined reference to `virSocketAddrSetIPv4AddrNetOrder'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_dhcpsnoop.o): In function `virNWFilterDHCPSnoopThread':
/libvirt/src/nwfilter/nwfilter_dhcpsnoop.c:1410: undefined reference to `virErrorPreserveLast'
./.libs/libvirt_driver_nwfilter_impl.a(libvirt_driver_nwfilter_impl_la-nwfilter_dhcpsnoop.o): In function `virNWFilterDHCPSnoopReq':
/libvirt/src/nwfilter/nwfilter_dhcpsnoop.c:1727: undefined reference to `virErrorRestore'
collect2: error: ld returned 1 exit status
libtool:   error: error: relink 'libvirt_driver_nwfilter.la' with the above command before installing it
make[3]: *** [install-modLTLIBRARIES] Error 1
Makefile:6290: recipe for target 'install-modLTLIBRARIES' failed
make[3]: Leaving directory '/libvirt/src'
make[2]: *** [install-am] Error 2
Makefile:12095: recipe for target 'install-am' failed
make[2]: Leaving directory '/libvirt/src'
Makefile:12089: recipe for target 'install' failed
make[1]: *** [install] Error 2
make[1]: Leaving directory '/libvirt/src'
Makefile:2125: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
The command '/bin/sh -c git clone https://github.com/libvirt/libvirt.git /libvirt &&     cd /libvirt &&     git checkout v4.1.0 &&     ./autogen.sh --prefix=/usr/local                  --localstatedir=/var                  --sysconfdir=/etc                  --without-polkit                  --without-esx                  --without-vbox                  --without-xen                  --without-libxl                  --with-qemu                  --with-qemu-user=libvirt-qemu                  --with-qemu-group=kvm                  --without-lxc                  --without-nwfilter &&     make -j$(grep -c ^processor /proc/cpuinfo) &&     make -j$(grep -c ^processor /proc/cpuinfo) install' returned a non-zero code: 2

@ivan4th ivan4th changed the title [WiP] Use custom-built libvirt, libguestfs and supermin Use custom-built libvirt, libguestfs and supermin Mar 20, 2018
@jellonek
Copy link
Contributor

Reviewed 7 of 7 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


images/image_skel/etc/libvirt/libvirtd.conf, line 8 at r1 (raw file):

log_outputs = "1:stderr"
listen_addr = "127.0.0.1"
listen_tls=0

It's already in second line.


Comments from Reviewable

@ivan4th ivan4th force-pushed the ivan4th/custom-built-libvirt branch from 6918f9a to d305bf5 Compare March 20, 2018 19:55
@ivan4th
Copy link
Contributor Author

ivan4th commented Mar 20, 2018

Review status: all files reviewed at latest revision, 1 unresolved discussion.


images/image_skel/etc/libvirt/libvirtd.conf, line 8 at r1 (raw file):

Previously, jellonek (Piotr Skamruk) wrote…

It's already in second line.

Done.


Comments from Reviewable

@lukaszo
Copy link
Contributor

lukaszo commented Mar 21, 2018

:lgtm:


Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@jellonek
Copy link
Contributor

:lgtm:


Reviewed 1 of 1 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@jellonek jellonek merged commit 423274e into master Mar 21, 2018
@jellonek jellonek deleted the ivan4th/custom-built-libvirt branch March 21, 2018 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants