All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
@ 2011-07-27 15:50 Kenneth Salerno
  2011-07-27 15:56 ` Daniel P. Berrange
  0 siblings, 1 reply; 7+ messages in thread
From: Kenneth Salerno @ 2011-07-27 15:50 UTC (permalink / raw)
  To: qemu-devel

Should check first if using a mingw compiler before forcing the addition of -lglib-2.0, -liconv, and -lintl to $LIBS of config-target.mak.


Signed-off-by: Kenneth Salerno <kennethsalerno@yahoo.com>
--- configure.ORIG      2011-07-27 11:28:16.859375000 -0400
+++ configure   2011-07-27 11:43:59.859375000 -0400
@@ -1824,9 +1824,11 @@
 # glib support probe
 if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
     glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
-    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
-    libs_softmmu="$glib_libs $libs_softmmu"
-    libs_tools="$glib_libs $libs_tools"
+    if test "$mingw32" != "yes" ; then
+        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
+        libs_softmmu="$glib_libs $libs_softmmu"
+        libs_tools="$glib_libs $libs_tools"
+    fi
 else
     echo "glib-2.0 required to compile QEMU"
     exit 1



Regards,
Ken

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
  2011-07-27 15:50 [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc Kenneth Salerno
@ 2011-07-27 15:56 ` Daniel P. Berrange
  2011-07-27 20:46   ` Kenneth Salerno
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel P. Berrange @ 2011-07-27 15:56 UTC (permalink / raw)
  To: Kenneth Salerno; +Cc: qemu-devel

On Wed, Jul 27, 2011 at 08:50:23AM -0700, Kenneth Salerno wrote:
> Should check first if using a mingw compiler before forcing the addition of -lglib-2.0, -liconv, and -lintl to $LIBS of config-target.mak.
> 
> 
> Signed-off-by: Kenneth Salerno <kennethsalerno@yahoo.com>
> --- configure.ORIG      2011-07-27 11:28:16.859375000 -0400
> +++ configure   2011-07-27 11:43:59.859375000 -0400
> @@ -1824,9 +1824,11 @@
>  # glib support probe
>  if $pkg_config --modversion glib-2.0 > /dev/null 2>&1 ; then
>      glib_cflags=`$pkg_config --cflags glib-2.0 2>/dev/null`
> -    glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> -    libs_softmmu="$glib_libs $libs_softmmu"
> -    libs_tools="$glib_libs $libs_tools"
> +    if test "$mingw32" != "yes" ; then
> +        glib_libs=`$pkg_config --libs glib-2.0 2>/dev/null`
> +        libs_softmmu="$glib_libs $libs_softmmu"
> +        libs_tools="$glib_libs $libs_tools"
> +    fi

This doesn't feel right to me. pkg-config works for mingw32 and should
be used just as it would be on native targets. What was the problem you
actually had without this change ?

If I had to guess I'd say your pkg-config program was not configured
to prefer mingw32 data files. You need to have an env var like this set
to make it pick up mingw32 rules instead of native ones:

 export PKG_CONFIG_LIBDIR="/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-pc-mingw32/sys-root/mingw/share/pkgconfig" pkg-config

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
  2011-07-27 15:56 ` Daniel P. Berrange
@ 2011-07-27 20:46   ` Kenneth Salerno
  2011-07-27 20:50     ` Anthony Liguori
                       ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Kenneth Salerno @ 2011-07-27 20:46 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: qemu-devel

--- On Wed, 7/27/11, Daniel P. Berrange <berrange@redhat.com> wrote:

> From: Daniel P. Berrange <berrange@redhat.com>
> Subject: Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
> To: "Kenneth Salerno" <kennethsalerno@yahoo.com>
> Cc: qemu-devel@nongnu.org
> Date: Wednesday, July 27, 2011, 11:56 AM
> On Wed, Jul 27, 2011 at 08:50:23AM
> -0700, Kenneth Salerno wrote:
> > Should check first if using a mingw compiler before
> forcing the addition of -lglib-2.0, -liconv, and -lintl to
> $LIBS of config-target.mak.
> > 
> > 
> > Signed-off-by: Kenneth Salerno <kennethsalerno@yahoo.com>
> > --- configure.ORIG      2011-07-27
> 11:28:16.859375000 -0400
> > +++ configure   2011-07-27
> 11:43:59.859375000 -0400
> > @@ -1824,9 +1824,11 @@
> >  # glib support probe
> >  if $pkg_config --modversion glib-2.0 >
> /dev/null 2>&1 ; then
> >      glib_cflags=`$pkg_config --cflags
> glib-2.0 2>/dev/null`
> > -    glib_libs=`$pkg_config --libs glib-2.0
> 2>/dev/null`
> > -    libs_softmmu="$glib_libs
> $libs_softmmu"
> > -    libs_tools="$glib_libs $libs_tools"
> > +    if test "$mingw32" != "yes" ; then
> > +        glib_libs=`$pkg_config
> --libs glib-2.0 2>/dev/null`
> > +        libs_softmmu="$glib_libs
> $libs_softmmu"
> > +        libs_tools="$glib_libs
> $libs_tools"
> > +    fi
> 
> This doesn't feel right to me. pkg-config works for mingw32
> and should
> be used just as it would be on native targets. What was the
> problem you
> actually had without this change ?
> 
> If I had to guess I'd say your pkg-config program was not
> configured
> to prefer mingw32 data files. You need to have an env var
> like this set
> to make it pick up mingw32 rules instead of native ones:
> 
>  export
> PKG_CONFIG_LIBDIR="/usr/i686-pc-mingw32/sys-root/mingw/lib/pkgconfig:/usr/i686-pc-mingw32/sys-root/mingw/share/pkgconfig"
> pkg-config
> 
> Regards,
> Daniel
> -- 
> |: http://berrange.com      -o- 
>   http://www.flickr.com/photos/dberrange/
> :|
> |: http://libvirt.org         
>     -o-         
>    http://virt-manager.org :|
> |: http://autobuild.org   
>    -o-     
>    http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org   
>    -o-       http://live.gnome.org/gtk-vnc :|
> 


I'll have to fall back to my old plan of compiling glib2 and gettext myself to install into prefix /usr/i686-pc-mingw32/sys-root/mingw (Cygwin doesn't distribute a MinGW version of glib2, and the one available on gtk.org gives me this error "cc1: warning: c:/devel/target/ea4ef54bcf881bcdd4139385601018a2/lib/glib-2.0/include: No such file or directory, but you are correct, I didn't need to modify qemu's 'configure').

Ken

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
  2011-07-27 20:46   ` Kenneth Salerno
@ 2011-07-27 20:50     ` Anthony Liguori
  2011-07-27 21:13     ` Stefan Weil
  2011-07-27 21:27     ` [Qemu-devel] " Jernej Simončič
  2 siblings, 0 replies; 7+ messages in thread
From: Anthony Liguori @ 2011-07-27 20:50 UTC (permalink / raw)
  To: Kenneth Salerno; +Cc: qemu-devel

On 07/27/2011 03:46 PM, Kenneth Salerno wrote:

>> --
>> |: http://berrange.com      -o-
>>    http://www.flickr.com/photos/dberrange/
>> :|
>> |: http://libvirt.org
>>      -o-
>>     http://virt-manager.org :|
>> |: http://autobuild.org
>>     -o-
>>     http://search.cpan.org/~danberr/ :|
>> |: http://entangle-photo.org
>>     -o-       http://live.gnome.org/gtk-vnc :|
>>
>
>
> I'll have to fall back to my old plan of compiling glib2 and gettext myself to install into prefix /usr/i686-pc-mingw32/sys-root/mingw (Cygwin doesn't distribute a MinGW version of glib2, and the one available on gtk.org gives me this error "cc1: warning: c:/devel/target/ea4ef54bcf881bcdd4139385601018a2/lib/glib-2.0/include: No such file or directory, but you are correct, I didn't need to modify qemu's 'configure').

Fedora packages mingw packages including glib:

http://fedoraproject.org/wiki/MinGW

Regards,

Anthony Liguori

> Ken
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
  2011-07-27 20:46   ` Kenneth Salerno
  2011-07-27 20:50     ` Anthony Liguori
@ 2011-07-27 21:13     ` Stefan Weil
  2011-07-27 21:29       ` Kenneth Salerno
  2011-07-27 21:27     ` [Qemu-devel] " Jernej Simončič
  2 siblings, 1 reply; 7+ messages in thread
From: Stefan Weil @ 2011-07-27 21:13 UTC (permalink / raw)
  To: Kenneth Salerno; +Cc: qemu-devel

Am 27.07.2011 22:46, schrieb Kenneth Salerno:
> I'll have to fall back to my old plan of compiling glib2 and gettext myself to install into prefix /usr/i686-pc-mingw32/sys-root/mingw (Cygwin doesn't distribute a MinGW version of glib2, and the one available on gtk.org gives me this error "cc1: warning: c:/devel/target/ea4ef54bcf881bcdd4139385601018a2/lib/glib-2.0/include: No such file or directory, but you are correct, I didn't need to modify qemu's 'configure').
>
> Ken
>    

You can fix the *.pc files (pkgconfig configuration) using your
installation path instead of c:/devel/..., then the gtk.org
distribution works (at least for me).

Cheers,
Stefan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] MinGW compilation shouldn't include -lglib-2.0 etc.
  2011-07-27 20:46   ` Kenneth Salerno
  2011-07-27 20:50     ` Anthony Liguori
  2011-07-27 21:13     ` Stefan Weil
@ 2011-07-27 21:27     ` Jernej Simončič
  2 siblings, 0 replies; 7+ messages in thread
From: Jernej Simončič @ 2011-07-27 21:27 UTC (permalink / raw)
  To: Kenneth Salerno on [qemu-devel]

On Wednesday, July 27, 2011, 22:46:41, Kenneth Salerno wrote:

> c:/devel/target/ea4ef54bcf881bcdd4139385601018a2/lib/glib-2.0/include: No such file or directory

This happens if you're not using mingw's pkg-config (which
automatically adjusts prefix) - you'll have to edit your .pc files.

-- 
< Jernej Simončič ><><><><>< http://eternallybored.org/ >

It's always the wrong time of the month.
       -- Astrology Law

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
  2011-07-27 21:13     ` Stefan Weil
@ 2011-07-27 21:29       ` Kenneth Salerno
  0 siblings, 0 replies; 7+ messages in thread
From: Kenneth Salerno @ 2011-07-27 21:29 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-devel

--- On Wed, 7/27/11, Stefan Weil <weil@mail.berlios.de> wrote:

> From: Stefan Weil <weil@mail.berlios.de>
> Subject: Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc.
> To: "Kenneth Salerno" <kennethsalerno@yahoo.com>
> Cc: qemu-devel@nongnu.org
> Date: Wednesday, July 27, 2011, 5:13 PM
> Am 27.07.2011 22:46, schrieb Kenneth
> Salerno:
> > I'll have to fall back to my old plan of compiling
> glib2 and gettext myself to install into prefix
> /usr/i686-pc-mingw32/sys-root/mingw (Cygwin doesn't
> distribute a MinGW version of glib2, and the one available
> on gtk.org gives me this error "cc1: warning:
> c:/devel/target/ea4ef54bcf881bcdd4139385601018a2/lib/glib-2.0/include:
> No such file or directory, but you are correct, I didn't
> need to modify qemu's 'configure').
> >
> > Ken
> >    
> 
> You can fix the *.pc files (pkgconfig configuration) using
> your
> installation path instead of c:/devel/..., then the
> gtk.org
> distribution works (at least for me).
> 
> Cheers,
> Stefan
> 
> 


Yes, thank you! I had this exact same thought right after I sent my last message.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-27 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 15:50 [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc Kenneth Salerno
2011-07-27 15:56 ` Daniel P. Berrange
2011-07-27 20:46   ` Kenneth Salerno
2011-07-27 20:50     ` Anthony Liguori
2011-07-27 21:13     ` Stefan Weil
2011-07-27 21:29       ` Kenneth Salerno
2011-07-27 21:27     ` [Qemu-devel] " Jernej Simončič

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.