From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeB0n-00040h-HO for qemu-devel@nongnu.org; Mon, 21 Sep 2015 20:00:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeB0l-0008NS-9n for qemu-devel@nongnu.org; Mon, 21 Sep 2015 20:00:45 -0400 Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:33736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeB0l-0008N4-1x for qemu-devel@nongnu.org; Mon, 21 Sep 2015 20:00:43 -0400 Received: by oixx17 with SMTP id x17so67810740oix.0 for ; Mon, 21 Sep 2015 17:00:42 -0700 (PDT) MIME-Version: 1.0 Sender: mgladouceur@gmail.com In-Reply-To: References: <55F87B36.6040907@weilnetz.de> <55F88314.8030604@redhat.com> Date: Mon, 21 Sep 2015 20:00:42 -0400 Message-ID: From: Mike Ladouceur Content-Type: multipart/alternative; boundary=001a1134e2ec63f5b305204ab014 Subject: Re: [Qemu-devel] Compiling Qemu from Cygwin List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Stefan Weil , qemu-devel@nongnu.org --001a1134e2ec63f5b305204ab014 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sorry, at this point, I've moved to compiling from Ubuntu as you suggested earlier. On Sun, Sep 20, 2015 at 9:19 PM, Mike Ladouceur wrote: > Okay, i followed the steps from the reply to my email I noticed on the > website, but never made its way to my inbox. Now, I'm stuck with the > following errors: > > /home/mike/qemu/include/glib-compat.h: At top level: > /home/mike/qemu/include/glib-compat.h:145:21: error: conflicting types fo= r > =E2=80=98g_cond_signal=E2=80=99 > static inline void (g_cond_signal)(CompatGCond *cond) > ^ > In file included from > /usr/x86_64-w64-mingw32/include/glib-2.0/glib/gasyncqueue.h:34:0, > from /usr/x86_64-w64-mingw32/include/glib-2.0/glib.h:34, > from qga/commands.c:13: > /usr/x86_64-w64-mingw32/include/glib-2.0/glib/gthread.h:201:17: note: > previous declaration of =E2=80=98g_cond_signal=E2=80=99 was here > void g_cond_signal (GCond *cond); > ^ > In file included from /home/mike/qemu/include/qemu-common.h:25:0, > from ./qga/guest-agent-core.h:14, > from qga/commands.c:14: > /home/mike/qemu/include/glib-compat.h: In function =E2=80=98g_cond_signal= =E2=80=99: > /home/mike/qemu/include/glib-compat.h:148:5: warning: passing argument 1 > of =E2=80=98g_cond_signal=E2=80=99 from incompatible pointer type [enable= d by default] > g_cond_signal((GCond *) cond->once.retval); > ^ > /home/mike/qemu/include/glib-compat.h:145:21: note: expected =E2=80=98str= uct > CompatGCond *=E2=80=99 but argument is of type =E2=80=98struct GCond *=E2= =80=99 > static inline void (g_cond_signal)(CompatGCond *cond) > ^ > /home/mike/qemu/include/glib-compat.h: At top level: > /home/mike/qemu/include/glib-compat.h:154:24: error: static declaration o= f > =E2=80=98g_thread_new=E2=80=99 follows non-static declaration > static inline GThread *g_thread_new(const char *name, > ^ > In file included from > /usr/x86_64-w64-mingw32/include/glib-2.0/glib/gasyncqueue.h:34:0, > from /usr/x86_64-w64-mingw32/include/glib-2.0/glib.h:34, > from qga/commands.c:13: > /usr/x86_64-w64-mingw32/include/glib-2.0/glib/gthread.h:145:17: note: > previous declaration of =E2=80=98g_thread_new=E2=80=99 was here > GThread * g_thread_new (const gchar *name, > ^ > make: *** [qga/commands.o] Error 1 > > > On Fri, Sep 18, 2015 at 10:49 PM, Mike Ladouceur > wrote: > >> I tried from Ubuntu in Virtualbox and this is the error I now get and it >> appears to be similar to the error from Cygwin. Configure seems to run >> fine. Make fails. I'm officially lost. >> >> ./configure --cross-prefix=3Dx86_64-w64-mingw32 >> (...) >> CC qga/commands-win32.o >> qga/commands-win32.c: In function =E2=80=98qmp_guest_set_user_password= =E2=80=99: >> qga/commands-win32.c:1254:5: warning: passing argument 2 of >> =E2=80=98g_base64_decode=E2=80=99 from incompatible pointer type [enable= d by default] >> rawpasswddata =3D (char *)g_base64_decode(password, &rawpasswdlen); >> ^ >> In file included from /usr/include/glib-2.0/glib.h:35:0, >> from qga/commands-win32.c:14: >> /usr/include/glib-2.0/glib/gbase64.h:52:9: note: expected =E2=80=98gsize= *=E2=80=99 but >> argument is of type =E2=80=98size_t *=E2=80=99 >> guchar *g_base64_decode (const gchar *text, >> ^ >> CC qga/channel-win32.o >> qga/channel-win32.c: In function =E2=80=98ga_channel_create_watch=E2=80= =99: >> qga/channel-win32.c:199:24: warning: cast from pointer to integer of >> different size [-Wpointer-to-int-cast] >> watch->pollfd.fd =3D (gintptr) c->rstate.ov.hEvent; >> ^ >> qga/channel-win32.c: At top level: >> qga/channel-win32.c:205:11: error: conflicting types for =E2=80=98ga_cha= nnel_read=E2=80=99 >> GIOStatus ga_channel_read(GAChannel *c, char *buf, size_t size, gsize >> *count) >> ^ >> In file included from qga/channel-win32.c:9:0: >> ./qga/channel.h:30:11: note: previous declaration of =E2=80=98ga_channel= _read=E2=80=99 >> was here >> GIOStatus ga_channel_read(GAChannel *c, gchar *buf, gsize size, gsize >> *count); >> ^ >> qga/channel-win32.c:269:11: error: conflicting types for >> =E2=80=98ga_channel_write_all=E2=80=99 >> GIOStatus ga_channel_write_all(GAChannel *c, const char *buf, size_t >> size) >> ^ >> In file included from qga/channel-win32.c:9:0: >> ./qga/channel.h:31:11: note: previous declaration of >> =E2=80=98ga_channel_write_all=E2=80=99 was here >> GIOStatus ga_channel_write_all(GAChannel *c, const gchar *buf, gsize >> size); >> ^ >> qga/channel-win32.c: In function =E2=80=98ga_channel_open=E2=80=99: >> qga/channel-win32.c:291:19: error: =E2=80=98MAXPATHLEN=E2=80=99 undeclar= ed (first use in >> this function) >> gchar newpath[MAXPATHLEN] =3D {0}; >> ^ >> qga/channel-win32.c:291:19: note: each undeclared identifier is reported >> only once for each function it appears in >> qga/channel-win32.c:291:11: warning: unused variable =E2=80=98newpath=E2= =80=99 >> [-Wunused-variable] >> gchar newpath[MAXPATHLEN] =3D {0}; >> ^ >> make: *** [qga/channel-win32.o] Error 1 >> >> >> On Wed, Sep 16, 2015 at 1:51 PM, Mike Ladouceur >> wrote: >> >>> Thanks for the reply. I will try to cross-compile via cygwin seeing as >>> I've had no luck installing and configuring mingw64. >>> >>> On Tue, Sep 15, 2015 at 4:44 PM, Eric Blake wrote: >>> >>>> On 09/15/2015 02:10 PM, Stefan Weil wrote: >>>> >> >>>> >> CC qga/commands-win32.o >>>> >>> qga/commands-win32.c: In function =E2=80=98qmp_guest_set_user_pass= word=E2=80=99: >>>> >>> qga/commands-win32.c:1254:55: warning: passing argument 2 of >>>> >>> =E2=80=98g_base64_decode=E2=80=99 from incompatible pointer type >>>> >>> rawpasswddata =3D (char *)g_base64_decode(password, >>>> &rawpasswdlen); >>>> >>> ^ >>>> >>>> Ugh. Compiling for cygwin should favor POSIX interfaces, not >>>> commands-win32. The build is failing because it isn't even correctly >>>> deciding which files it should be compiling. >>>> >>>> >>>> > compiling with cygwin is unsupported. I suggest using MinGW-w64 >>>> > (which also works for cross compilations under Linux). >>>> >>>> Remember, cygwin is itself an emulation layer - you are emulating POSI= X >>>> interfaces on top of Windows; which, while making the environment easi= er >>>> to port to, also makes the environment slower. qemu targets mingw and >>>> not cygwin because qemu is an emulator and already slow enough, withou= t >>>> needing another layer of emulation thrown in the mix. >>>> >>>> That said, if you want to port qemu to cygwin and supply patches, I'm >>>> more than willing to help review them. It's just that right now, it's >>>> not my personal itch to write such patches, and that the qemu communit= y >>>> currently favors mingw rather than cygwin. >>>> >>>> Also, cygwin comes with cross-compilers, so you can still use your >>>> cygwin setup to compile qemu for mingw (although doing the cross-compi= le >>>> on a true Linux box will be faster). >>>> >>>> -- >>>> Eric Blake eblake redhat com +1-919-301-3266 >>>> Libvirt virtualization library http://libvirt.org >>>> >>>> >>> >> > --001a1134e2ec63f5b305204ab014 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Sorry, at this point, I've moved to compiling from Ubu= ntu as you suggested earlier.

On Sun, Sep 20, 2015 at 9:19 PM, Mike Ladouceur <m= ike.ladouceur@live.com> wrote:
Okay, i followed the steps from the reply to my email = I noticed on the website, but never made its way to my inbox. Now, I'm = stuck with the following errors:

/home/mike/qemu/in= clude/glib-compat.h: At top level:
/home/mike/qemu/include/glib-c= ompat.h:145:21: error: conflicting types for =E2=80=98g_cond_signal=E2=80= =99
=C2=A0static inline void (g_cond_signal)(CompatGCond *cond)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0^
In file included from /usr/x86_64-w64-mingw32/include= /glib-2.0/glib/gasyncqueue.h:34:0,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from /usr/x86_64-w64-mingw32/include/glib= -2.0/glib.h:34,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0from qga/commands.c:13:
/usr/x86_64-w64-mingw32/incl= ude/glib-2.0/glib/gthread.h:201:17: note: previous declaration of =E2=80=98= g_cond_signal=E2=80=99 was here
=C2=A0void =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0g_cond_signal =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 (GCond =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0*cond);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
=
In file included from /home/mike/qemu/include/qemu-common.h:25:0,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from ./= qga/guest-agent-core.h:14,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0from qga/commands.c:14:
/home/mike/qemu/i= nclude/glib-compat.h: In function =E2=80=98g_cond_signal=E2=80=99:
/home/mike/qemu/include/glib-compat.h:148:5: warning: passing argument 1 = of =E2=80=98g_cond_signal=E2=80=99 from incompatible pointer type [enabled = by default]
=C2=A0 =C2=A0 =C2=A0g_cond_signal((GCond *) cond->= once.retval);
=C2=A0 =C2=A0 =C2=A0^
/home/mike/qemu/inc= lude/glib-compat.h:145:21: note: expected =E2=80=98struct CompatGCond *=E2= =80=99 but argument is of type =E2=80=98struct GCond *=E2=80=99
= =C2=A0static inline void (g_cond_signal)(CompatGCond *cond)
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^<= /div>
/home/mike/qemu/include/glib-compat.h: At top level:
/h= ome/mike/qemu/include/glib-compat.h:154:24: error: static declaration of = =E2=80=98g_thread_new=E2=80=99 follows non-static declaration
=C2= =A0static inline GThread *g_thread_new(const char *name,
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ^
In file included from /usr/x86_64-w64-mingw32/include/glib-= 2.0/glib/gasyncqueue.h:34:0,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0from /usr/x86_64-w64-mingw32/include/glib-2.0/gl= ib.h:34,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0from qga/commands.c:13:
/usr/x86_64-w64-mingw32/include/gli= b-2.0/glib/gthread.h:145:17: note: previous declaration of =E2=80=98g_threa= d_new=E2=80=99 was here
=C2=A0GThread * =C2=A0 =C2=A0 =C2=A0 g_th= read_new =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(const gchar =C2=A0 =C2=A0*name,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
make: *** [qga/commands.o] Er= ror 1


On Fri, Sep 18= , 2015 at 10:49 PM, Mike Ladouceur <mike.ladouceur@live.com><= /span> wrote:
I tried fr= om Ubuntu in Virtualbox and this is the error I now get and it appears to b= e similar to the error from Cygwin. Configure seems to run fine. Make fails= . I'm officially lost.

./configure --cross-prefix=3D= x86_64-w64-mingw32
(...)
=C2=A0 CC =C2=A0 = =C2=A0qga/commands-win32.o
qga/commands-win32.c: In function =E2= =80=98qmp_guest_set_user_password=E2=80=99:
qga/commands-w= in32.c:1254:5: warning: passing argument 2 of =E2=80=98g_base64_decode=E2= =80=99 from incompatible pointer type [enabled by default]
= =C2=A0 =C2=A0 =C2=A0rawpasswddata =3D (char *)g_base64_decode(password, &am= p;rawpasswdlen);
=C2=A0 =C2=A0 =C2=A0^
In file included from /usr/include/glib-2.0/glib.h:35:0,
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0from qga/commands-wi= n32.c:14:
/usr/include/glib-2.0/glib/gbase64.h:52:9: note: expect= ed =E2=80=98gsize *=E2=80=99 but argument is of type =E2=80=98size_t *=E2= =80=99
=C2=A0guchar *g_base64_decode =C2=A0 =C2=A0 =C2=A0 =C2=A0 = (const gchar =C2=A0*text,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
=C2=A0 CC =C2=A0 =C2=A0qga/channel-win32.o
qga/channel-win= 32.c: In function =E2=80=98ga_channel_create_watch=E2=80=99:
qga/= channel-win32.c:199:24: warning: cast from pointer to integer of different = size [-Wpointer-to-int-cast]
=C2=A0 =C2=A0 =C2=A0watch->pollfd= .fd =3D (gintptr) c->rstate.ov.hEvent;
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^
= qga/channel-win32.c: At top level:
qga/channel-win32.c:205:11: er= ror: conflicting types for =E2=80=98ga_channel_read=E2=80=99
=C2= =A0GIOStatus ga_channel_read(GAChannel *c, char *buf, size_t size, gsize *c= ount)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
In fil= e included from qga/channel-win32.c:9:0:
./qga/channel.h:30:11: n= ote: previous declaration of =E2=80=98ga_channel_read=E2=80=99 was here
=C2=A0GIOStatus ga_channel_read(GAChannel *c, gchar *buf, gsize size= , gsize *count);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
=
qga/channel-win32.c:269:11: error: conflicting types for =E2=80=98ga_c= hannel_write_all=E2=80=99
=C2=A0GIOStatus ga_channel_write_all(GA= Channel *c, const char *buf, size_t size)
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0^
In file included from qga/channel-win32.c:9= :0:
./qga/channel.h:31:11: note: previous declaration of =E2=80= =98ga_channel_write_all=E2=80=99 was here
=C2=A0GIOStatus ga_chan= nel_write_all(GAChannel *c, const gchar *buf, gsize size);
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
qga/channel-win3= 2.c: In function =E2=80=98ga_channel_open=E2=80=99:
qga/channel-w= in32.c:291:19: error: =E2=80=98MAXPATHLEN=E2=80=99 undeclared (first use in= this function)
=C2=A0 =C2=A0 =C2=A0gchar newpath[MAXPATHLEN] =3D= {0};
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0^
qga/channel-win32.c:291:19: note: each undeclared ide= ntifier is reported only once for each function it appears in
qga= /channel-win32.c:291:11: warning: unused variable =E2=80=98newpath=E2=80=99= [-Wunused-variable]
=C2=A0 =C2=A0 =C2=A0gchar newpath[MAXPATHLEN= ] =3D {0};
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^
=
make: *** [qga/channel-win32.o] Error 1


On Wed, Sep 16, 2015 at 1:51 PM, Mike Ladouceur <mike.ladouceur@li= ve.com> wrote:
Thanks for the reply. I will try to cross-compile via cygwin seeing as= I've had no luck installing and configuring mingw64.

On Tue, Sep 15,= 2015 at 4:44 PM, Eric Blake <eblake@redhat.com> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">On 09/15/2015 02:10 PM, Stefan Weil wro= te:
>>
>>=C2=A0 =C2=A0CC=C2=A0 =C2=A0 qga/commands-win32.o
>>> qga/commands-win32.c: In function =E2=80=98qmp_guest_set_user_= password=E2=80=99:
>>> qga/commands-win32.c:1254:55: warning: passing argument 2 of >>> =E2=80=98g_base64_decode=E2=80=99 from incompatible pointer ty= pe
>>>=C2=A0 =C2=A0 =C2=A0 rawpasswddata =3D (char *)g_base64_decode(= password, &rawpasswdlen);
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ^

Ugh. Compiling for cygwin should favor POSIX interfaces, not
commands-win32.=C2=A0 The build is failing because it isn't even correc= tly
deciding=C2=A0 which files it should be compiling.


> compiling with cygwin is unsupported. I suggest using MinGW-w64
> (which also works for cross compilations under Linux).

Remember, cygwin is itself an emulation layer - you are emulating POSIX
interfaces on top of Windows; which, while making the environment easier to port to, also makes the environment slower.=C2=A0 qemu targets mingw and=
not cygwin because qemu is an emulator and already slow enough, without
needing another layer of emulation thrown in the mix.

That said, if you want to port qemu to cygwin and supply patches, I'm more than willing to help review them. It's just that right now, it'= ;s
not my personal itch to write such patches, and that the qemu community
currently favors mingw rather than cygwin.

Also, cygwin comes with cross-compilers, so you can still use your
cygwin setup to compile qemu for mingw (although doing the cross-compile on a true Linux box will be faster).

--
Eric Blake=C2=A0 =C2=A0eblake redhat com=C2=A0 =C2=A0 +1-919-301-3266 Libvirt virtualization library http://libvirt.org





--001a1134e2ec63f5b305204ab014--