[Top][All Lists]

[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: Howard Spoelstra
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 18:37:28 +0200

On Fri, May 8, 2020 at 6:10 PM Peter Maydell <address@hidden> wrote:
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.)

-- PMM


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.



reply via email to

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