|
From: | Eric Blake |
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 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 |
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 <address@hidden> Reviewed-by: Markus Armbruster <address@hidden> Reviewed-by: Philippe Mathieu-Daudé <address@hidden> Tested-by: Philippe Mathieu-Daudé <address@hidden> Signed-off-by: Daniel P. Berrangé <address@hidden> --- 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 $ makeMakefile: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
[Prev in Thread] | Current Thread | [Next in Thread] |