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

2019-08-21 Thread reza shahriari
Hi,

I have hit a new issue with `./configure` when specifying the `—with-hyper` 
parameter.

Configure runs successfully when no parameters are given but when trying to 
build with hyper-v I run into this issue. I was wondering if anyone knows how 
to install this dependency on msys2.

> checking for libxl_cpupool_cpuadd_cpumap in -lxenlight... no
> checking whether LIBXL_DOMAIN_TYPE_PVH is declared... no
> checking for PARALLELS_SDK... no
> checking for bhyve... no
> checking for bhyvectl... no
> checking for bhyveload... no
> configure: error: openwsman is required for the Hyper-V driver

Thanks,

Reza Shahriari


> On Aug 20, 2019, at 1:53 PM, reza shahriari  wrote:
> 
> Thanks so much. I got it to go past pthreads. Now I am working on other 
> dependencies
> 
> 
> 
>> On Aug 20, 2019, at 1:30 PM, Daniel P. Berrangé  wrote:
>> 
>> On Tue, Aug 20, 2019 at 01:03:40PM -0400, reza shahriari wrote:
>>> Hi,
>>> 
>>> I tried that out, I got a new error about pthreads in my config.log.
>> 
>> It finds the header file now which is good, but it still fails to
>> find the libpthread.dll file, which is what LDFLAGS should have
>> addressed
>> 
>> configure:15417: checking for pthread_kill in -lpthread
>> configure:15442: gcc -o conftest.exe 
>> -I/c/msys64/mingw64/x86_64-w64-mingw32/include/  
>> -L/c/msys64/mingw64/x86_64-w64-mingw32/lib/:/c/msys64/mingw64/bin/ 
>> conftest.c -lpthread   >&5
>> c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot 
>> find -lpthread
>> | char pthread_kill ();
>> 
>> 
>> 
>> 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 
>> :|
> 

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

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

2019-08-20 Thread reza shahriari
Thanks so much. I got it to go past pthreads. Now I am working on other 
dependencies



> On Aug 20, 2019, at 1:30 PM, Daniel P. Berrangé  wrote:
> 
> On Tue, Aug 20, 2019 at 01:03:40PM -0400, reza shahriari wrote:
>> Hi,
>> 
>> I tried that out, I got a new error about pthreads in my config.log.
> 
> It finds the header file now which is good, but it still fails to
> find the libpthread.dll file, which is what LDFLAGS should have
> addressed
> 
> configure:15417: checking for pthread_kill in -lpthread
> configure:15442: gcc -o conftest.exe 
> -I/c/msys64/mingw64/x86_64-w64-mingw32/include/  
> -L/c/msys64/mingw64/x86_64-w64-mingw32/lib/:/c/msys64/mingw64/bin/ conftest.c 
> -lpthread   >&5
> c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot 
> find -lpthread
> | char pthread_kill ();
> 
> 
> 
> 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 :|


___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

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

2019-08-20 Thread Daniel P . Berrangé
On Tue, Aug 20, 2019 at 01:03:40PM -0400, reza shahriari wrote:
> Hi,
> 
> I tried that out, I got a new error about pthreads in my config.log.

It finds the header file now which is good, but it still fails to
find the libpthread.dll file, which is what LDFLAGS should have
addressed

configure:15417: checking for pthread_kill in -lpthread
configure:15442: gcc -o conftest.exe 
-I/c/msys64/mingw64/x86_64-w64-mingw32/include/  
-L/c/msys64/mingw64/x86_64-w64-mingw32/lib/:/c/msys64/mingw64/bin/ conftest.c 
-lpthread   >&5
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: cannot 
find -lpthread
| char pthread_kill ();



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 :|

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


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

2019-08-20 Thread Daniel P . Berrangé
On Tue, Aug 20, 2019 at 12:29:15PM -0400, reza shahriari wrote:
> Hi,
> 
> I have attached my compressed config file.
> 
> Thanks,
> 
> Reza
> 
> 
> 
> > On Aug 20, 2019, at 12:03 PM, Daniel P. Berrangé  
> > wrote:
> > 
> > Re-adding the mailing list CC - please don't drop it.
> > 
> > On Tue, Aug 20, 2019 at 11:54:34AM -0400, reza shahriari wrote:
> >> Hi, 
> >> 
> >> I am using msys2. When I run `./configure` without any parameters and I 
> >> still see missing pthreads impl.
> >> 
> >> I have installed mingw64 cross compiler toolchain. Here is the output of 
> >> pacman I see when searching for pthreads (they are all installed).
> >> 
> >> mingw64/mingw-w64-x86_64-libwinpthread-git 7.0.0.5480.e14d23be-1 
> >> (mingw-w64-x86_64-toolchain) [installed]
> >>MinGW-w64 winpthreads library
> >> mingw64/mingw-w64-x86_64-winpthreads-git 7.0.0.5480.e14d23be-1 
> >> (mingw-w64-x86_64-toolchain) [installed]
> >>MinGW-w64 winpthreads library
> >> msys/mingw-w64-cross-winpthreads-git 7.0.0.5480.b627284b-1 
> >> (mingw-w64-cross-toolchain mingw-w64-cross) [installed]
> >>MinGW-w64 winpthreads library for cross-compiler
> >> 
> >> 
> >> Also, is there any another way to enable hyper-v domains on Libvirt ?
> > 
> > The pthreads library is a mandatory part of libvirt, so we can't
> > skip that.
> > 
> > Can you provide your "config.log" file - if it is larger than
> > 200 KB, please compress it, or upload it somewhere

The log shows

configure:8796: checking for pthread.h
configure:8796: gcc -c -g -O2  conftest.c >&5
conftest.c:82:10: fatal error: pthread.h: No such file or directory
 #include 
  ^~~
compilation terminated.


so it is not finding the winpthreads package you installed.

You might be ablke to set the  "CFLAGS" env variable to
"-I/path/to/winpthreads/include" to get it to work. Might
need LDFLAGS="-L/path/to/winpthreads/lib" too.

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 :|

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

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

2019-08-20 Thread Daniel P . Berrangé
Re-adding the mailing list CC - please don't drop it.

On Tue, Aug 20, 2019 at 11:54:34AM -0400, reza shahriari wrote:
> Hi, 
> 
> I am using msys2. When I run `./configure` without any parameters and I still 
> see missing pthreads impl.
> 
> I have installed mingw64 cross compiler toolchain. Here is the output of 
> pacman I see when searching for pthreads (they are all installed).
> 
> mingw64/mingw-w64-x86_64-libwinpthread-git 7.0.0.5480.e14d23be-1 
> (mingw-w64-x86_64-toolchain) [installed]
> MinGW-w64 winpthreads library
> mingw64/mingw-w64-x86_64-winpthreads-git 7.0.0.5480.e14d23be-1 
> (mingw-w64-x86_64-toolchain) [installed]
> MinGW-w64 winpthreads library
> msys/mingw-w64-cross-winpthreads-git 7.0.0.5480.b627284b-1 
> (mingw-w64-cross-toolchain mingw-w64-cross) [installed]
> MinGW-w64 winpthreads library for cross-compiler
> 
> 
> Also, is there any another way to enable hyper-v domains on Libvirt ?

The pthreads library is a mandatory part of libvirt, so we can't
skip that.

Can you provide your "config.log" file - if it is larger than
200 KB, please compress it, or upload it somewhere


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 :|

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


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

2019-08-20 Thread Daniel P . Berrangé
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 :|

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

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

2019-08-20 Thread Daniel P . Berrangé
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 
> )

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  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 :|

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


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

2019-08-20 Thread 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 
)

> On Aug 20, 2019, at 3:26 AM, Erik Skultety  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

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users

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

2019-08-20 Thread Erik Skultety
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

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users


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

2019-08-19 Thread reza shahriari
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

___
libvirt-users mailing list
libvirt-users@redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users