[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0
From: |
Kenneth Salerno |
Subject: |
Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include -lglib-2.0 etc. |
Date: |
Wed, 27 Jul 2011 13:46:41 -0700 (PDT) |
--- On Wed, 7/27/11, Daniel P. Berrange <address@hidden> wrote:
> From: Daniel P. Berrange <address@hidden>
> Subject: Re: [Qemu-devel] [PATCH] MinGW compilation shouldn't include
> -lglib-2.0 etc.
> To: "Kenneth Salerno" <address@hidden>
> Cc: address@hidden
> 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 <address@hidden>
> > --- 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