qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build qemu on Windows10 with MSYS2 - ERROR: "x86_64-w64-mingw32-gcc"


From: Peter Maydell
Subject: Re: Build qemu on Windows10 with MSYS2 - ERROR: "x86_64-w64-mingw32-gcc" either does not exist or does not work
Date: Fri, 8 May 2020 17:09:51 +0100

On Fri, 8 May 2020 at 16:57, <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]