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>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>
Subject: Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds
Date: Thu, 20 Aug 2020 16:15:59 -0500 [thread overview]
Message-ID: <814594a0-391c-01fb-a418-234e477793d3@redhat.com> (raw)
In-Reply-To: <20200820173124.243984-1-berrange@redhat.com>
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
next prev parent reply other threads:[~2020-08-20 21:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 17:31 [PATCH v2] configure: add support for pseudo-"in source tree" builds Daniel P. Berrangé
2020-08-20 17:51 ` Philippe Mathieu-Daudé
2020-08-20 17:52 ` Eric Blake
2020-08-20 21:15 ` Eric Blake [this message]
2020-08-21 8:31 ` Daniel P. Berrangé
2020-08-21 10:04 ` Kevin Wolf
2020-08-21 10:15 ` Paolo Bonzini
2020-08-21 10:54 ` Kevin Wolf
2020-08-21 12:58 ` Paolo Bonzini
2020-08-21 10:17 ` Daniel P. Berrangé
2020-08-21 10:16 ` Paolo Bonzini
2020-08-21 10:17 ` Kevin Wolf
2020-08-21 10:31 ` 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=814594a0-391c-01fb-a418-234e477793d3@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=kwolf@redhat.com \
--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).