All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Dan <tpb8675309@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Win32 QEMU binaries built from MinGW fail (access violation)
Date: Sat, 25 May 2013 08:27:19 +0200	[thread overview]
Message-ID: <51A059C7.305@weilnetz.de> (raw)
In-Reply-To: <CAKqkh8oZ=18wj6Ad4PxhCGjVCyOqtz=HuAaMGFCHX3_vUyXF_w@mail.gmail.com>

Am 25.05.2013 03:56, schrieb Dan:
> I've been trying to build QEMU source directly with MinGW.  The
> compile/link works but there are tons of warnings (mostly Wformat).
> Once I try to run the binaries in Windows though, I quickly hit access
> violations once the HD image is mounted.  I've tested on the
> linux-0.2.img.bz2 so that I can be consistent with others.  The
> violations bounce around based on the image and emulation.  I've tried
> with -nographic to try to rule out SDL.dll.  I'm at a loss, and
> beginning to wonder if 100's of Wformat errors need to be patched one
> by one to have a run-able windows binary.
>
> What I'm confused by is that both qemu.org (ref1) and wikibooks.org
> (ref2) seem to imply that there are no special MinGW patches.  I've
> also found many sites hosting valid QEMU win32 binaries like
> omledom.com (ref3).  I've even ensured that my ./configure settings
> match theirs (omledom), but of course I have no way to know if they
> are compiliing FROM windows FOR windows, or FROM linux FOR windows.
>
> Here's is an abridged list of my process.
>
> install cygwin to for wget and unzip, though nothing is in the PATH varable.
> wget mingw-get-inst-20120426.exe
> wget python-2.6.6.msi
> wget gtk+-bundle_2.24.10-20120208_win32.zip
> wget SDL-devel-1.2.15-mingw32.tar.gz
> wget qemu-1.4.1.tar.bz2
> wget linux-0.2.img.bz2
>
> install mingw-get-inst-20120426.exe
> install python-2.6.6.msi
> unzip gtk+-bundle_2.24.10-20120208_win32.zip to c:\MinGW
> unzip SDL-devel-1.2.15-mingw32.tar.gz to c:\MinGW\msys\1.0\src
> unzip qemu-1.4.1.tar.bz2 to c:\MinGW\msys\1.0\src
> decompress linux-0.2.img.bz2 to c:\MinGW\msys\1.0\bld
>
> launch msys prompt && cd /usr/src/SDL && make native
> launch msys prompt && cd /usr/src/qemu
> ./configure --python=c:/Python26/python.exe --prefix=/usr/bld
> make && make install && cd /usr/bld
> ./qemu-system-i386.exe linux-0.2.img
>
> Observe an access violation in qemu-system-i386.exe within 5 seconds.
>
> Am I the only one compiling qemu FROM windows FOR windows?
>
> Also, just for grins, I replace my copy of qemu-system-i386.exe with
> the one from omledom and things work without any issues.  I've also
> tried the qemu 1.5 repositories and this weeks .git snapshot.  All
> fail with similar errors.
>
> I've also done this on two machines, an x86 Windows Vista system and
> an x64 Windows 8 system.  Same results on both.
>
> ref1: http://wiki.qemu.org/Hosts/W32
> ref2: http://en.wikibooks.org/wiki/QEMU/MinGW
> ref3: http://www.omledom.com/
>
> Long explanation at:
> http://screamingmonkeys.blogspot.com/2013/05/return-to-linux-compiling-qemu-with.html
>
> -Dan

Hi Dan,

native builds for Windows should work and result in working executables.
Can you run qemu-system-i386 with gdb and provide a stack trace of the
crash?

The Wformat warnings are "normal" with unpatched versions of MinGW32
because MinGW32 does not correctly set the ANSI format macros
(PRIu32, ...).

I recommend using MinGW-w64. It is installed on top of MinGW and includes
newer and better system include files as well as compilers for 32 and 64 bit
executables, so you can compile for w32 and for w64.

Cheers
Stefan


qemu-system-i386

  reply	other threads:[~2013-05-25  6:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25  1:56 [Qemu-devel] Win32 QEMU binaries built from MinGW fail (access violation) Dan
2013-05-25  6:27 ` Stefan Weil [this message]
2013-05-25  8:52   ` Dan
2013-05-26 19:54     ` Dan
2013-05-28 16:45       ` Dan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51A059C7.305@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=qemu-devel@nongnu.org \
    --cc=tpb8675309@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.