qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Howard Spoelstra <hsp.cat7@gmail.com>, Helge Konetzka <hk@zapateado.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [qemu-web PATCH] Fix link to Windows page in Wiki
Date: Sat, 11 Sep 2021 10:03:00 +0100	[thread overview]
Message-ID: <6ae0c8d0-4601-4c2c-c0cd-590f2a86a104@ilande.co.uk> (raw)
In-Reply-To: <CABLmASEuNT2WVocMwakuhhYDvVBB0YdFueP24ULRFQ1Z35eKPg@mail.gmail.com>

On 11/09/2021 09:43, Howard Spoelstra wrote:

> On Sat, Sep 11, 2021 at 8:29 AM Helge Konetzka <hk@zapateado.de 
> <mailto:hk@zapateado.de>> wrote:
> 
>     Am 10.09.21 um 17:44 schrieb Paolo Bonzini:
>      > On 25/08/21 18:43, Helge Konetzka wrote:
>      >> Furthermore I would like to propose to change the instructions for
>      >> Native builds with MSYS2 on Wiki Windows page.
>      >>
>      >> Please remove the section which copies system binaries to match the
>      >> expected file names!
>      >>
>      >> Instead define variables for configure (gcc-ar and gcc-ranlib are
>      >> existing copies of x86_64-w64-mingw32-gcc-ar and
>      >> x86_64-w64-mingw32-gcc-ranlib) and add strip to enable make install:
>      >>
>      >> AR=gcc-ar NM=nm OBJCOPY=objcopy RANLIB=gcc-ranlib WINDRES=windres
>      >> STRIP=strip \
>      >> ./configure --cross-prefix=x86_64-w64-mingw32- --enable-gtk --enable-sdl
>      >
>      > Do you even need anything but "./configure"? (possibly AR=gcc-ar NM=nm
>      > at the beginning)?
> 
>     Sorry for being indistinct!
> 
>     My intention was to put "AR=gcc-ar NM=nm OBJCOPY=objcopy
>     RANLIB=gcc-ranlib WINDRES=windres STRIP=strip" in front of "./configure"
>     (see the '\' after STRIP=strip) instead of copying binaries:
> 
>     diff -Naur qemu.org.orig/Hosts/W32 qemu.org/Hosts/W32 <http://qemu.org/Hosts/W32>
>     --- qemu.org.orig/Hosts/W32     2021-09-11 08:27:01.198715675 +0200
>     +++ qemu.org/Hosts/W32 <http://qemu.org/Hosts/W32>  2021-09-11 08:28:15.853605118
>     +0200
>     @@ -232,14 +232,6 @@
>            Close the MSYS2 console.
>            Start mingw64.exe.
> 
>     -cd /mingw64/bin
>     -cp x86_64-w64-mingw32-gcc-ar.exe x86_64-w64-mingw32-ar.exe
>     -cp x86_64-w64-mingw32-gcc-ranlib.exe x86_64-w64-mingw32-ranlib.exe
>     -cp windres.exe x86_64-w64-mingw32-windres.exe
>     -cp nm.exe x86_64-w64-mingw32-nm.exe
>     -cp objcopy.exe x86_64-w64-mingw32-objcopy.exe
>     -cd ~
>     -
>            Download the QEMU source code:
> 
>        git clone https://www.github.com/qemu/qemu <https://www.github.com/qemu/qemu>
>     @@ -247,6 +239,7 @@
>            Finally build QEMU with:
> 
>        cd qemu
>     +AR=gcc-ar NM=nm OBJCOPY=objcopy RANLIB=gcc-ranlib WINDRES=windres
>     STRIP=strip \
>        ./configure --cross-prefix=x86_64-w64-mingw32- --enable-gtk --enable-sdl
>        make
> 
> Hi,
> 
> I wrote those instructions as I obviously could not find a better way to get Qemu to 
> cross-compile using MSYS2 in Windows.
> When you look at configure, you see that only adding the cross-prefix will not find 
> the MSYS equivalents of some tools:
> 
> ar="${AR-${cross_prefix}ar}"
> looks for x86_64-w64-mingw32-ar.exe and not (as it is named in MSYS2) 
> x86_64-w64-mingw32-gcc-ar.exe
> 
> Perhaps it would be better to fix configure for the MSYS2 case so the flags or the 
> renaming are not required?

FWIW it was me that added the MSYS2 section to the wiki since I had a requirement to 
do some bespoke Windows builds (see 
https://wiki.qemu.org/index.php?title=Hosts/W32&diff=6803&oldid=5723).

As you can see at that point in time there was no need to copy binaries with 
different names, or pass --cross-prefix into configure.

So the question is: what has changed? I find it hard to believe that MSYS2/MingW64 is 
configured out-of-the-box to break a standard "./configure && make" build incantation.


ATB,

Mark.


  reply	other threads:[~2021-09-11  9:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 16:43 [qemu-web PATCH] Fix link to Windows page in Wiki Helge Konetzka
2021-09-01 15:30 ` Stefano Garzarella
2021-09-10 15:44 ` Paolo Bonzini
2021-09-11  6:28   ` Helge Konetzka
2021-09-11  8:43     ` Howard Spoelstra
2021-09-11  9:03       ` Mark Cave-Ayland [this message]
2021-09-11  9:17         ` Mark Cave-Ayland
2021-09-11  9:17         ` Helge Konetzka
2021-09-11  9:30           ` Mark Cave-Ayland
2021-09-12  8:15             ` Helge Konetzka
2021-09-11  9:09       ` Paolo Bonzini
2021-09-11  9:29       ` Helge Konetzka

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=6ae0c8d0-4601-4c2c-c0cd-590f2a86a104@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=hk@zapateado.de \
    --cc=hsp.cat7@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).