[libvirt-users] Compiling Libvirt on Windows for Hyper V support

Hi, I am trying to compile Libvirt from the source code on windows using msys2 but keep hitting issues while running `./configure`. ….
checking whether C compiler handles -Wno-suggest-attribute=pure… yes checking whether C compiler handles -Wno-suggest-attribute=const... yes checking for how to force completely read-only GOT table… checking for how to avoid indirect lib deps... -Wl,--no-copy-dt-needed-entries checking for how to stop undefined symbols at link time… checking sys/acl.h usability... no checking sys/acl.h presence… no checking for sys/acl.h… no checking for aa_change_profile in -lapparmor… no checking for pthread_mutexattr_init… no checking for pthread.h... (cached) no configure: error: A pthreads impl is required for building libvirt ...
Does anyone have any experience compiling Libvirt on a windows machine ? Specifically I am trying to enable hyper-v domain on Libvirt. Thanks, Reza Shahriari

I am passing in: ./configure \ --without-sasl \ --without-polkit \ --without-python \ --without-libxl \ --without-qemu \ --without-lxc \ --without-openvz \ --without-libvirtd (The ones on the website: https://libvirt.org/windows.html <https://libvirt.org/windows.html>)
On Aug 20, 2019, at 3:26 AM, Erik Skultety <eskultet@redhat.com> wrote:
On Mon, Aug 19, 2019 at 03:52:51PM -0400, reza shahriari wrote:
Hi,
I am trying to compile Libvirt from the source code on windows using msys2 but keep hitting issues while running `./configure`.
So what arguments does msys2 pass to the configure script?
Erik

On Tue, Aug 20, 2019 at 11:17:06AM -0400, reza shahriari wrote:
I am passing in:
./configure \ --without-sasl \ --without-polkit \ --without-python \ --without-libxl \ --without-qemu \ --without-lxc \ --without-openvz \ --without-libvirtd (The ones on the website: https://libvirt.org/windows.html <https://libvirt.org/windows.html>)
Unfortunately that page is somewhat stale. These days you should not need to pass any args to configure - we should automagicaly disable everything that doesn't work on Windows. That said, officially the *only* way we support Windows right now is via the mingw64 cross-compiler toolchain running on a Linux host, as that is what our CI systems test for each release. msys may or may not work - we dont have any CI systems or developers actively testing that anymore.
On Aug 20, 2019, at 3:26 AM, Erik Skultety <eskultet@redhat.com> wrote:
On Mon, Aug 19, 2019 at 03:52:51PM -0400, reza shahriari wrote:
Hi,
I am trying to compile Libvirt from the source code on windows using msys2 but keep hitting issues while running `./configure`.
So what arguments does msys2 pass to the configure script?
Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On Mon, Aug 19, 2019 at 03:52:51PM -0400, reza shahriari wrote:
Hi,
I am trying to compile Libvirt from the source code on windows using msys2 but keep hitting issues while running `./configure`.
….
checking whether C compiler handles -Wno-suggest-attribute=pure… yes checking whether C compiler handles -Wno-suggest-attribute=const... yes checking for how to force completely read-only GOT table… checking for how to avoid indirect lib deps... -Wl,--no-copy-dt-needed-entries checking for how to stop undefined symbols at link time… checking sys/acl.h usability... no checking sys/acl.h presence… no checking for sys/acl.h… no checking for aa_change_profile in -lapparmor… no checking for pthread_mutexattr_init… no checking for pthread.h... (cached) no configure: error: A pthreads impl is required for building libvirt ...
As the error message says, you need to have a pthreads impl to build libvirt. This is not a standard part of Windows, but is provided by the mingw64 cross compiler toolchain. I'm unclear if its possible to get this into msys or not/ Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (3)
-
Daniel P. Berrangé
-
Erik Skultety
-
reza shahriari