[prev in list] [next in list] [prev in thread] [next in thread]
List: qemu-discuss
Subject: Re: Build qemu on Windows10 with MSYS2 - ERROR: "x86_64-w64-mingw32-gcc" either does not exist or do
From: Howard Spoelstra <hsp.cat7 () gmail ! com>
Date: 2020-05-08 16:37:28
Message-ID: CABLmASGHqFoq8UCadMfEbVxMtMbhrzmzOyUxHJ2vNLzhxxUB5Q () mail ! gmail ! com
[Download RAW message or body]
On Fri, May 8, 2020 at 6:10 PM Peter Maydell <peter.maydell@linaro.org>
wrote:
> On Fri, 8 May 2020 at 16:57, <Mi.Lan@eclipso.de> wrote:
> > I want to build QEMU on Windows 10. I followed this instruction:
> https://wiki.qemu.org/Hosts/W32 -> Building QEMU for W64 -> Native builds
> with MSYS2. It worked until I gave the terminal the ./configure command.
> Then it said:
> > $ ./configure --cross-prefix=x86_64-w64-mingw32- --enable-gtk
> --enable-sdl
> >
> > ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not work
>
> You asked configure to build with a set of cross tools whose
> names start with "x86_64-w64-mingw32-", and in particular
> that means that you asked to use a compiler under the filename
> "x86_64-w64-mingw32-gcc". That apparently doesn't exist and so
> configure reported the error.
>
> > But there is no gcc installed it seems.
> >
> > ML@WC MSYS ~/qemu
> > $ which gcc
> > which: no gcc in
> (/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/)
>
> >
> > Is this the reason why it is not working? What do I need to fix for a
> first compile?
>
> You need to make sure you have the right compiler installed
> and tell configure what it is, if it isn't just "gcc" or "cc".
>
> Looking at the names of all the packages that got installed,
> my guess is maybe your compiler is called "mingw-w64-x86_64-gcc",
> or perhaps "x86_64-mingw-w64-gcc" or something similar. You
> should find out what the name of the compiler is, then pass
> the --cross-prefix option the part of the filename with the
> "gcc" part taken off (so it will end with a '-' character).
>
> It sounds like the wiki instructions are out of date/wrong.
> (Building QEMU on Windows is a bit off the beaten path --
> almost everybody who builds QEMU does so for Linux.)
>
> thanks
> -- PMM
>
>
Hi,
I wrote part of that instruction. I just checked, it still works. Did you
by any chance omit this step?
"Close the MSYS2 console, and start mingw64.exe."
Then use:
./configure --cross-prefix=x86_64-w64-mingw32- --enable-gtk --enable-sdl
The snag is that compiler can't be found from the msys2 console, but can be
found from the mingw64 console.
Best,
Howard
[Attachment #3 (text/html)]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Fri, May 8, 2020 at 6:10 PM Peter Maydell <<a \
href="mailto:peter.maydell@linaro.org">peter.maydell@linaro.org</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 8 May 2020 at \
16:57, <<a href="mailto:Mi.Lan@eclipso.de" \
target="_blank">Mi.Lan@eclipso.de</a>> wrote:<br> > I want to build QEMU on \
Windows 10. I followed this instruction: <a href="https://wiki.qemu.org/Hosts/W32" \
rel="noreferrer" target="_blank">https://wiki.qemu.org/Hosts/W32</a> -> Building \
QEMU for W64 -> Native builds with MSYS2. It worked until I gave the terminal the \
./configure command. Then it said:<br> > $ ./configure \
--cross-prefix=x86_64-w64-mingw32- --enable-gtk --enable-sdl<br> ><br>
> ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not \
work<br> <br>
You asked configure to build with a set of cross tools whose<br>
names start with "x86_64-w64-mingw32-", and in particular<br>
that means that you asked to use a compiler under the filename<br>
"x86_64-w64-mingw32-gcc". That apparently doesn't exist and so<br>
configure reported the error.<br>
<br>
> But there is no gcc installed it seems.<br>
><br>
> ML@WC MSYS ~/qemu<br>
> $ which gcc<br>
> which: no gcc in \
(/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/)<br>
><br>
> Is this the reason why it is not working? What do I need to fix for a first \
compile?<br> <br>
You need to make sure you have the right compiler installed<br>
and tell configure what it is, if it isn't just "gcc" or \
"cc".<br> <br>
Looking at the names of all the packages that got installed,<br>
my guess is maybe your compiler is called "mingw-w64-x86_64-gcc",<br>
or perhaps "x86_64-mingw-w64-gcc" or something similar. You<br>
should find out what the name of the compiler is, then pass<br>
the --cross-prefix option the part of the filename with the<br>
"gcc" part taken off (so it will end with a '-' character).<br>
<br>
It sounds like the wiki instructions are out of date/wrong.<br>
(Building QEMU on Windows is a bit off the beaten path --<br>
almost everybody who builds QEMU does so for Linux.)<br>
<br>
thanks<br>
-- PMM<br>
<br></blockquote><div><br></div><div>
<div>Hi,</div><div><br></div><div>I wrote part of that instruction. I just checked, \
it still works. Did you by any chance omit this \
step?</div><div><br></div><div>"Close the MSYS2 console, and start \
mingw64.exe."</div><div><br></div><div> Then use:<br></div><div>./configure \
--cross-prefix=x86_64-w64-mingw32- --enable-gtk \
--enable-sdl</div><div><br></div><div>The snag is that compiler can't be found \
from the msys2 console, but can be found from the mingw64 \
console.</div><div><br></div><div>Best,</div><div>Howard</div>
</div><div><br></div><div><br></div><div> </div></div></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic