From: Kevin Wolf <kwolf@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Stefan Hajnoczi" <stefanha@gmail.com>,
qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v2] configure: add support for pseudo-"in source tree" builds
Date: Fri, 21 Aug 2020 12:04:26 +0200 [thread overview]
Message-ID: <20200821100426.GB5153@linux.fritz.box> (raw)
In-Reply-To: <814594a0-391c-01fb-a418-234e477793d3@redhat.com>
Am 20.08.2020 um 23:15 hat Eric Blake geschrieben:
> 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.
Sounds like it will be painful to switch between branches based on make
and branches based on meson. By extension, it will also be painful to
check out and build old versions for comparison, or doing that even more
than once during git bisect. :-(
Kevin
next prev parent reply other threads:[~2020-08-21 10:05 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
2020-08-21 8:31 ` Daniel P. Berrangé
2020-08-21 10:04 ` Kevin Wolf [this message]
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=20200821100426.GB5153@linux.fritz.box \
--to=kwolf@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@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).