Re: [libvirt] Question about compilation on MinGW(StorageAPI)
Hi, Dan Additional Info I change libtool version from 1.5.18 to 1.5.26. Then make install process is passed. I will post whole compilation process on MinGW after I completed. At this moment, current patch seems to be enough for MinGW. Thanks Atsushi SAKAI Atsushi SAKAI [EMAIL PROTECTED] wrote: Hi, Dan How about this? With this patch, make, make check, make syntax-check on libvirt is running (some test are skipped.). At this moment make install is failed on virsh install like this. The output is like thisat src directory # ../libtool --mode=install /usr/bin/install -c 'virsh.exe' '/usr/local/bin/virsh.exe' ../libtool: ./virsh.: No such file or directory I am investigating this issue at this moment. qemud/Makefile.am |2 ++ src/driver.h |4 src/internal.h|2 ++ src/libvirt.c |4 src/qemu_driver.c |8 src/remote_internal.c |6 ++ tests/Makefile.am |9 ++--- tests/testutils.c |5 - tests/testutilsqemu.c |3 ++- tests/virshtest.c |7 ++- 10 files changed, 44 insertions(+), 6 deletions(-) Thanks Atsushi SAKAI Daniel P. Berrange [EMAIL PROTECTED] wrote: On Mon, Jun 09, 2008 at 12:05:09PM +0900, Atsushi SAKAI wrote: Hi, Dan If remove uncompiled code on MinGW, the patch seems like this. 0)siginfo_t does not have. 1)MinGW does not have waitpid, fork etc. 2)add testutilsqemu.c to check WITH_QEMU I need to investigate more? (Please wait a week, if need to investigate this.) src/driver.h |4 src/internal.h|4 src/libvirt.c |3 ++- I don't like this change - we should disable all the virStateXXX funtions, based on #ifdef WITH_LIBVIRTD, since they're only used when in daemon mode, and thus avoid a #ifndef WIN32 tests/testutils.c |9 - This change will cause the virshtest test file to fail every time on win32. The better way to approach this is to wrap the *entire* of virtTestCaptureProgramOutput in #ifndef WIN32, and then in the virshtest.c file disable the entire test suite, #ifndef WIN32 normal test code... #else int main (void) { return (77); /* means 'test skipped' for automake */ } #endif See qemuxml2argvtest.c for an example of this. tests/testutilsqemu.c |2 ++ This is fine. Regards, Daniel. -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] libvirt on mingw: undefined reference to htonl/ntohl
Hi, Some time passed by and I thought I'd have another go at compiling libvirt for win32 using MinGW/MSYS again. I tried to compile libvirt-0.4.3 and I got around most obstacles. Now it just seems I am stuck when it is trying to link. My search on google showed me that I am not the first one to see this issue. Usually i means -lws2_32 is in the wrong place. However I tried moving it around without luck. Also it doesn't make sense to me that only htonl and ntohl are missing. It appears anything else used from the winsock library is found during linking. I feel we're very close to getting libvirt compiled on win32. Or do you know if anyone already succeeded? Regards Brecht Sanders gcc -shared .libs/libvirt_la-libvirt.o .libs/libvirt_la-memory.o .libs/libvirt_la-hash.o .libs/libvirt_la-test.o .libs/libvirt_la-buf.o .libs/libvirt_la-qparams.o .libs/libvirt_la-capabilities.o .libs/libvirt_la-xml.o .libs/libvirt_la-event.o .libs/libvirt_la-xen_unified.o .libs/libvirt_la-xen_internal.o .libs/libvirt_la-xs_internal.o .libs/libvirt_la-xend_internal.o .libs/libvirt_la-stats_linux.o .libs/libvirt_la-sexpr.o .libs/libvirt_la-virterror.o .libs/libvirt_la-proxy_internal.o .libs/libvirt_la-conf.o .libs/libvirt_la-xm_internal.o .libs/libvirt_la-remote_internal.o .libs/libvirt_la-bridge.o .libs/libvirt_la-iptables.o .libs/libvirt_la-uuid.o .libs/libvirt_la-qemu_driver.o .libs/libvirt_la-qemu_conf.o .libs/libvirt_la-openvz_conf.o .libs/libvirt_la-openvz_driver.o .libs/libvirt_la-lxc_driver.o .libs/libvirt_la-lxc_conf.o .libs/libvirt_la-lxc_container.o .libs/libvirt_la-nodeinfo.o .libs/libvirt_la-util.o .libs/libvirt_la-remote_protocol.o -Wl,--whole-archive ../gnulib/lib/.libs/libgnu.a -Wl,--no-whole-archive -L/mingw/lib /mingw/lib/libxml2.dll.a /mingw/lib/libgnutls.dll.a -L/home/bsanders/inst_libgcrypt-1.4.1/lib -lintl -lpthread /mingw/lib/libportablexdr.dll.a -lws2_32 -Wl,--version-script=./libvirt_sym.version -o .libs/libvirt-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libvirt.dll.a Creating library file: .libs/libvirt.dll.a .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa46): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa5f): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa78): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa91): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xaaa): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xac3): more undefined references to `htonl' follow .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc5d): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc74): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc8b): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xca2): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xcb9): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xccc): more undefined references to `ntohl' follow collect2: ld returned 1 exit status make[2]: *** [libvirt.la] Error 1 make[2]: Leaving directory `/home/bsanders/libvirt-0.4.3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/bsanders/libvirt-0.4.3' make: *** [all] Error 2 -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] Re: libvirt on mingw: undefined reference to htonl/ntohl
Hello again, I may have been a bit to fast quick with my mail. Now I was able to compile and link libvirt-0.4.3 (except for the tests which depend on fork e.a.). The htonl/ntohl prbem mentioned earliers was fixed by inserting #include winsock2.h into qemud/remote_protocol.c. I also had errors about fprintf in proxy/libvirt_proxy.c which were fixed by inserting #include stdio.h. Previously I had already discovered src/internal.h needs #include pthread.h. As for make install, I had to comment out the chmod u+s line in proxy/Makefile, because win32 doesn't support this. Finally I had an error because config.stat could not be found. I resolved this with ln -s config.status config.stat. Now it's built I guess the next logical step would be testing. It's a shame though the tests won't compile. Any chance they could be rewritten using pthreads instead of fork? Regards Brecht Sanders Brecht Sanders wrote: Hi, Some time passed by and I thought I'd have another go at compiling libvirt for win32 using MinGW/MSYS again. I tried to compile libvirt-0.4.3 and I got around most obstacles. Now it just seems I am stuck when it is trying to link. My search on google showed me that I am not the first one to see this issue. Usually i means -lws2_32 is in the wrong place. However I tried moving it around without luck. Also it doesn't make sense to me that only htonl and ntohl are missing. It appears anything else used from the winsock library is found during linking. I feel we're very close to getting libvirt compiled on win32. Or do you know if anyone already succeeded? Regards Brecht Sanders gcc -shared .libs/libvirt_la-libvirt.o .libs/libvirt_la-memory.o .libs/libvirt_la-hash.o .libs/libvirt_la-test.o .libs/libvirt_la-buf.o .libs/libvirt_la-qparams.o .libs/libvirt_la-capabilities.o .libs/libvirt_la-xml.o .libs/libvirt_la-event.o .libs/libvirt_la-xen_unified.o .libs/libvirt_la-xen_internal.o .libs/libvirt_la-xs_internal.o .libs/libvirt_la-xend_internal.o .libs/libvirt_la-stats_linux.o .libs/libvirt_la-sexpr.o .libs/libvirt_la-virterror.o .libs/libvirt_la-proxy_internal.o .libs/libvirt_la-conf.o .libs/libvirt_la-xm_internal.o .libs/libvirt_la-remote_internal.o .libs/libvirt_la-bridge.o .libs/libvirt_la-iptables.o .libs/libvirt_la-uuid.o .libs/libvirt_la-qemu_driver.o .libs/libvirt_la-qemu_conf.o .libs/libvirt_la-openvz_conf.o .libs/libvirt_la-openvz_driver.o .libs/libvirt_la-lxc_driver.o .libs/libvirt_la-lxc_conf.o .libs/libvirt_la-lxc_container.o .libs/libvirt_la-nodeinfo.o .libs/libvirt_la-util.o .libs/libvirt_la-remote_protocol.o -Wl,--whole-archive ../gnulib/lib/.libs/libgnu.a -Wl,--no-whole-archive -L/mingw/lib /mingw/lib/libxml2.dll.a /mingw/lib/libgnutls.dll.a -L/home/bsanders/inst_libgcrypt-1.4.1/lib -lintl -lpthread /mingw/lib/libportablexdr.dll.a -lws2_32 -Wl,--version-script=./libvirt_sym.version -o .libs/libvirt-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libvirt.dll.a Creating library file: .libs/libvirt.dll.a .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa46): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa5f): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa78): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xa91): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xaaa): undefined reference to `htonl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xac3): more undefined references to `htonl' follow .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc5d): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc74): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xc8b): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xca2): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xcb9): undefined reference to `ntohl' .libs/libvirt_la-remote_protocol.o:remote_protocol.c:(.text+0xccc): more undefined references to `ntohl' follow collect2: ld returned 1 exit status make[2]: *** [libvirt.la] Error 1 make[2]: Leaving directory `/home/bsanders/libvirt-0.4.3/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/bsanders/libvirt-0.4.3' make: *** [all] Error 2 -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] MinGW environment for libvirt (at this moment))
Here is the update for instruction to make install on MinGW. (Since I goes to from make only to pass to make install) 1.Install MinGW-5.1.4.exe 2.Install MSYS-1.0.11-2004.04.30-1.exe 3.Install msysDTK-1.0.1.exe Above files are taken from following http://sourceforge.net/project/showfiles.php?group_id=2435 4.Install gtk-dev-2.12.9-win32-2.exe (This is for using pkg-config/gettext/libxml2) Expand this to C:\MinGW\lib\GTK Taken from http://gladewin32.sourceforge.net/ 5.update some MSYS packages m4-1.4.7-MSYS.tar.bz2 from root directory (we need 1.4.5 or later but msysDTK installs 1.4) gawk-3.1.5-MSYS-1.0.11-1.tar.bz2 (gawk match with 3 args are needed on ChangeLog.awk but not in gawk 3.0.4) Taken from http://sourceforge.net/project/showfiles.php?group_id=2435 6.Install autoconf-2.62.tar.gz ./configure --prefix=/usr make make install Taken from http://www.gnu.org/software/autoconf/ 7.Install automake-1.10.1.tar.gz ./configure --prefix=/usr make make install (create /usr/share/aclocal-1.10) Taken from http://www.gnu.org/software/automake/ 8.Install libtool-1.5.26.tar.gz ./configure --prefix=/usr make make install Taken from http://www.gnu.org/software/libtool/ 9.Add m4 script for aclocal cp /mingw/lib/GTK/share/aclocal/* /usr/share/aclocal (This is for running autogen.sh) 10..Install GNUTLS expand gnutls-2.3.13.exe to c:\msys\1.0 (it goes to /usr)(This is for /usr/share/aclocal) cp -r /usr/include/gnutls /mingw/include cp /usr/lib/libgnutls* /mingw/lib cp /usr/lib/libgpg-error* /mingw/lib cp /usr/lib/libgcrypt* /mingw/lib cp /usr/lib/libtasn1.* /mingw/lib rewrite dependency_libs on /mingw/lib/libgnutls.la and /mingw/lib/libgcrypt.la from /home/jas/gnutls4win/inst to /mingw Taken from http://josefsson.org/gnutls4win/ 11.expand xdr Install Rich's package xdr-4.0-mingw5.tar.gz rpc = /mingw/include lib*.a = /mingw/lib Taken from http://www.annexia.org/tmp/xdr-4.0-mingw5.tar.gz 12.get libvirt code get Hourly development snapshot(this package includes autogen.sh) Taken from ftp://libvirt.org/libvirt/ apply patch. patch should be taken from https://www.redhat.com/archives/libvir-list/2008-June/msg00196.html 13.create virsh ./autogen.sh ./configure --without-xen --without-qemu --without-sasl --without-libvirtd make make syntax-check make check make install 14.execute /usr/local/bin/virsh.exe Hope virsh.exe works on MinGW. Thanks Atsushi SAKAI -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] How does libvirt access kvm infomation?
Hi, AFAIK kvm has only an interface of qemu console when we use device hotplug, migration and so on. How does libvirt access the interface of qemu console? Best Regards, Akio Takebe -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list