qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Stefan Hajnoczi" <stefanha@gmail.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Liviu Ionescu" <ilg@livius.net>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Michal Suchánek" <msuchanek@suse.de>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Aleksandar Markovic" <aleksandar.m.mail@gmail.com>
Subject: Re: [PATCH v4 for-5.0] configure: warn if not using a separate build directory
Date: Fri, 3 Apr 2020 09:42:24 -0500	[thread overview]
Message-ID: <813a6453-0cc1-2ee7-20fb-3ba624aad57a@redhat.com> (raw)
In-Reply-To: <93fbf486-d1c3-ec03-ea8d-163bb2374260@redhat.com>

On 4/3/20 9:02 AM, Eric Blake wrote:
> On 4/3/20 8:53 AM, Daniel P. Berrangé wrote:
>> Running configure directly from the source directory is a build
>> configuration that will go away in future. It is also not currently
>> covered by any automated testing. Display a deprecation warning if
>> the user attempts to use an in-srcdir build setup, so that they are
>> aware that they're building QEMU in an undesirable manner.
>>
>> Reviewed-by: Eric Blake <eblake@redhat.com>
>> Reviewed-by: Markus Armbruster <armbru@redhat.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
>> ---
>>
>> Changed in v4:
>>    - Adopted Eric's suggested wording
> 
>> +if test "$in_srcdir" = "yes"; then
>> +    echo
>> +    echo "WARNING: SUPPORT FOR BUILDING IN THE SOURCE DIR IS DEPRECATED"
>> +    echo
>> +    echo "Support for running the 'configure' script directly from the"
>> +    echo "source directory is deprecated. In-tree builds are not 
>> covered"
>> +    echo "by automated testing and thus may not correctly build QEMU."
>> +    echo "Users are recommended to use a separate build directory:"
>> +    echo
>> +    echo "  $ mkdir build"
>> +    echo "  $ cd build"
>> +    echo "  $ ../configure"
>> +    echo "  $ make"
> 
> Late question, but:
> 
> Since this is just a warning, we still manage to complete the 
> ./configure run, including whatever generated files it leaves in-tree. 
> Is there any additional step we need to recommend prior to 'mkdir build' 
> that will clean up the in-tree artifacts, so that the user then 
> attempting the VPATH build won't still have a broken build due to the 
> leftovers from the in-tree attempt?  'make distclean', perhaps?
> 
> /me starts testing; I'll reply back once it finishes...

tl;dr: 'make distclean' isn't perfect (it still leaves 2 directories 
behind), but does clean up a lot of directories and .mak files, and IS 
necessary before you can build in the subdirectory; but at least make 
warns you.  Still, I'd prefer adding that step in the warning, rather 
than getting an error several steps later.

On a fresh git checkout:

$ ./configure
...
$ git clean -dfxn
Would remove aarch64-linux-user/
Would remove aarch64-softmmu/
Would remove aarch64_be-linux-user/
Would remove alpha-linux-user/
Would remove alpha-softmmu/
Would remove arm-linux-user/
Would remove arm-softmmu/
Would remove armeb-linux-user/
Would remove config-all-disas.mak
Would remove config-host.mak
Would remove config.log
Would remove config.status
Would remove cris-linux-user/
Would remove cris-softmmu/
Would remove docs/sphinx/__pycache__/
Would remove hppa-linux-user/
Would remove hppa-softmmu/
Would remove i386-linux-user/
Would remove i386-softmmu/
Would remove linux-headers/asm
Would remove lm32-softmmu/
Would remove m68k-linux-user/
Would remove m68k-softmmu/
Would remove microblaze-linux-user/
Would remove microblaze-softmmu/
Would remove microblazeel-linux-user/
Would remove microblazeel-softmmu/
Would remove mips-linux-user/
Would remove mips-softmmu/
Would remove mips64-linux-user/
Would remove mips64-softmmu/
Would remove mips64el-linux-user/
Would remove mips64el-softmmu/
Would remove mipsel-linux-user/
Would remove mipsel-softmmu/
Would remove mipsn32-linux-user/
Would remove mipsn32el-linux-user/
Would remove moxie-softmmu/
Would remove nios2-linux-user/
Would remove nios2-softmmu/
Would remove or1k-linux-user/
Would remove or1k-softmmu/
Would remove ppc-linux-user/
Would remove ppc-softmmu/
Would remove ppc64-linux-user/
Would remove ppc64-softmmu/
Would remove ppc64abi32-linux-user/
Would remove ppc64le-linux-user/
Would remove riscv32-linux-user/
Would remove riscv32-softmmu/
Would remove riscv64-linux-user/
Would remove riscv64-softmmu/
Would remove rx-softmmu/
Would remove s390x-linux-user/
Would remove s390x-softmmu/
Would remove sh4-linux-user/
Would remove sh4-softmmu/
Would remove sh4eb-linux-user/
Would remove sh4eb-softmmu/
Would remove sparc-linux-user/
Would remove sparc-softmmu/
Would remove sparc32plus-linux-user/
Would remove sparc64-linux-user/
Would remove sparc64-softmmu/
Would remove tests/qemu-iotests/common.env
Would remove tests/qgraph/
Would remove tests/tcg/config-aarch64-linux-user.mak
Would remove tests/tcg/config-aarch64-softmmu.mak
Would remove tests/tcg/config-aarch64_be-linux-user.mak
Would remove tests/tcg/config-alpha-linux-user.mak
Would remove tests/tcg/config-alpha-softmmu.mak
Would remove tests/tcg/config-arm-linux-user.mak
Would remove tests/tcg/config-arm-softmmu.mak
Would remove tests/tcg/config-armeb-linux-user.mak
Would remove tests/tcg/config-cris-linux-user.mak
Would remove tests/tcg/config-cris-softmmu.mak
Would remove tests/tcg/config-hppa-linux-user.mak
Would remove tests/tcg/config-hppa-softmmu.mak
Would remove tests/tcg/config-i386-linux-user.mak
Would remove tests/tcg/config-i386-softmmu.mak
Would remove tests/tcg/config-lm32-softmmu.mak
Would remove tests/tcg/config-m68k-linux-user.mak
Would remove tests/tcg/config-m68k-softmmu.mak
Would remove tests/tcg/config-mips-linux-user.mak
Would remove tests/tcg/config-mips-softmmu.mak
Would remove tests/tcg/config-mips64-linux-user.mak
Would remove tests/tcg/config-mips64-softmmu.mak
Would remove tests/tcg/config-mips64el-linux-user.mak
Would remove tests/tcg/config-mips64el-softmmu.mak
Would remove tests/tcg/config-mipsel-linux-user.mak
Would remove tests/tcg/config-mipsel-softmmu.mak
Would remove tests/tcg/config-mipsn32-linux-user.mak
Would remove tests/tcg/config-mipsn32el-linux-user.mak
Would remove tests/tcg/config-ppc-linux-user.mak
Would remove tests/tcg/config-ppc-softmmu.mak
Would remove tests/tcg/config-ppc64-linux-user.mak
Would remove tests/tcg/config-ppc64-softmmu.mak
Would remove tests/tcg/config-ppc64abi32-linux-user.mak
Would remove tests/tcg/config-ppc64le-linux-user.mak
Would remove tests/tcg/config-riscv64-linux-user.mak
Would remove tests/tcg/config-riscv64-softmmu.mak
Would remove tests/tcg/config-s390x-linux-user.mak
Would remove tests/tcg/config-s390x-softmmu.mak
Would remove tests/tcg/config-sh4-linux-user.mak
Would remove tests/tcg/config-sh4-softmmu.mak
Would remove tests/tcg/config-sh4eb-linux-user.mak
Would remove tests/tcg/config-sh4eb-softmmu.mak
Would remove tests/tcg/config-sparc64-linux-user.mak
Would remove tests/tcg/config-sparc64-softmmu.mak
Would remove tests/tcg/config-x86_64-linux-user.mak
Would remove tests/tcg/config-x86_64-softmmu.mak
Would remove tests/tcg/config-xtensa-linux-user.mak
Would remove tests/tcg/config-xtensa-softmmu.mak
Would remove tests/tcg/config-xtensaeb-linux-user.mak
Would remove tests/tcg/config-xtensaeb-softmmu.mak
Would remove tilegx-linux-user/
Would remove tricore-softmmu/
Would remove unicore32-softmmu/
Would remove x86_64-linux-user/
Would remove x86_64-softmmu/
Would remove xtensa-linux-user/
Would remove xtensa-softmmu/
Would remove xtensaeb-linux-user/
Would remove xtensaeb-softmmu/
$ make distclean
...
$ git clean -dfxn
Would remove docs/sphinx/__pycache__/
Would remove tests/qgraph/
$ ./configure
...
$ mkdir build
$ cd build
$ ../configure
$ make
Makefile:58: *** This is an out of tree build but your source tree 
(/home/eblake/qemu-tmp) seems to have been used for an in-tree build. 
You can fix this by running "make distclean && rm -rf *-linux-user 
*-softmmu" in your source tree.  Stop.
$ cd ..
$ make distclean && rm -rf *-linux-user *-softmmu
$ cd build
$ make
...


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-04-03 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 13:53 [PATCH v4 for-5.0] configure: warn if not using a separate build directory Daniel P. Berrangé
2020-04-03 14:02 ` Eric Blake
2020-04-03 14:42   ` Eric Blake [this message]
2020-04-03 22:35     ` Aleksandar Markovic
2020-04-04  9:14       ` Peter Maydell
2020-04-05 17:10         ` Aleksandar Markovic
2020-04-03 15:02   ` BALATON Zoltan
2020-04-05 14:38 ` Peter Maydell
2020-04-05 16:41   ` Aleksandar Markovic
2020-04-06  9:16   ` Daniel P. Berrangé

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=813a6453-0cc1-2ee7-20fb-3ba624aad57a@redhat.com \
    --to=eblake@redhat.com \
    --cc=aleksandar.m.mail@gmail.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=ilg@livius.net \
    --cc=kwolf@redhat.com \
    --cc=msuchanek@suse.de \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@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 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).