[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds
From: |
Eric Blake |
Subject: |
Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds |
Date: |
Thu, 20 Aug 2020 16:15:59 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 8/20/20 12:31 PM, Daniel P. Berrangé wrote:
Meson requires the build dir to be separate from the source tree. Many
people are used to just running "./configure && make" though and the
meson conversion breaks that.
This introduces some backcompat support to make it appear as if an
"in source tree" build is being done, but with the the results in the
"build/" directory. This allows "./configure && make" to work as it
did historically, albeit with the output binaries staying under build/.
An observation:
If you already had out-of-tree builds, this does not change anything.
You can do an incremental build, where a tree that builds pre-merge
should continue to build incrementally with 'make -C dir' post-merge.
If you are used to in-tree builds, and do a fresh checkout, this lets
you maintain the illusion of an in-tree build although binaries may be
located differently than you are used to.
But if you do an incremental update to an in-tree build, this will cause
some odd behaviors, starting with the git update:
$ git merge $paolos_tag
error: The following untracked working tree files would be overwritten
by merge:
accel/kvm/trace.h
...
util/trace.h
Please move or remove them before you merge.
Aborting
$ find -name trace.h -delete
$ git merge $paolos_tag
$ git am $this_patch
$ make
config-host.mak is out-of-date, running configure
Using './build' as the directory for build output
Submodule 'meson' (https://github.com/mesonbuild/meson/) registered for
path 'meson'
Cloning into '/home/eblake/qemu-tmp2/meson'...
...
Command line for building ['libcommon.fa'] is long, using a response file
./ninjatool -t ninja2make --omit clean dist uninstall < build.ninja >
Makefile.ninja
/bin/sh: build.ninja: No such file or directory
GEN tests/test-qapi-gen
make: Nothing to be done for 'all'.
$ echo $?
0
$ make
changing dir to build for make ""...
make[1]: Entering directory '/home/eblake/qemu-tmp2/build'
Makefile:84: *** This is an out of tree build but your source tree
(/home/eblake/qemu-tmp2) 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.
make[1]: Leaving directory '/home/eblake/qemu-tmp2/build'
make: *** [GNUmakefile:11: all] Error 2
$ echo $?
2
So I'm not sure why the first build gets as far as it does, but does NOT
complete things and yet does not fail make, but my advice is that you
should NOT try to an incremental build on in-tree build when crossing
the meson epoch. If you are a fan of in-tree convenience, you need a
ONE-TIME distclean when pulling in these changes (the fact that you HAVE
to clean up trace.h files to merge in the meson stuff should be a hint
for that). After that has been done, you can go back to pretending
meson supports in-tree.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds, Paolo Bonzini, 2020/08/21
Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds, Kevin Wolf, 2020/08/21