All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefan Weil <sw@weilnetz.de>
Cc: "qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 2/2] Makefile: use full path for qapi-generated directory
Date: Thu, 01 Dec 2011 12:28:58 -0600	[thread overview]
Message-ID: <4ED7C76A.6060407@codemonkey.ws> (raw)
In-Reply-To: <4ED7C342.3060302@weilnetz.de>

On 12/01/2011 12:11 PM, Stefan Weil wrote:
> Am 01.12.2011 16:19, schrieb Stefano Stabellini:
>> On Wed, 30 Nov 2011, Stefan Weil wrote:
>>> It's common to use either out-of-tree builds or in-tree builds,
>>> but not to mix both variants with a common root directory.
>>> I think QEMU should explicitly forbid that mixed scenario (like
>>> other projects do).
>>>
>>> Even with your fix there can remain problems with generated
>>> header files.
>>
>> Really? Can you provide more specific details?
>
> Yes. Suppose different generated header files with the same name
> exist in the source directory tree and in the build directory tree.
>
> Then compiler options (the order of -I options) will determine
> which of two header files with same name will be used in out-of-tree
> builds. If the wrong one (that from the source directory tree) is used,
> the compiler might fail or produce wrong code (for example when
> macro values changed).
>>> The mixed scenario creates unnecessary complexity.
>>> Without the mixed scenario, your patch is not needed.
>>
>> I agree that supporting the mixed scenario shouldn't be a priority.
>> However without this last patch a "make clean" on the main tree is not
>> enough to allow out of tree builds.
>>
>> Try the following scenario:
>>
>> - cd qemu; ./configure; make
>>
>> - make clean
>>
>> - cd ../temp; ./configure --source-path=../qemu; make
>
> Which ./configure do you run in an empty temp directory?
> This example (like similar ones in your previous mail) won't work.

Yes, you must do external builds only from a clean source directory.  This is a 
perfectly normal requirement.  In fact, I can't think of a project that doesn't 
require this.

Regards,

Anthony Liguori

>
>>
>> this has to work, right? It does not without the patch to fix the
>> generation of config-devices.mak.
>
> No. You'll need a 'make distclean'. If that does what it should do,
> a following out-of-tree build will work.
>
> Regards,
> Stefan Weil
>
>



WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: Stefan Weil <sw@weilnetz.de>
Cc: "qemu-trivial@nongnu.org" <qemu-trivial@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] Makefile: use full path for qapi-generated directory
Date: Thu, 01 Dec 2011 12:28:58 -0600	[thread overview]
Message-ID: <4ED7C76A.6060407@codemonkey.ws> (raw)
In-Reply-To: <4ED7C342.3060302@weilnetz.de>

On 12/01/2011 12:11 PM, Stefan Weil wrote:
> Am 01.12.2011 16:19, schrieb Stefano Stabellini:
>> On Wed, 30 Nov 2011, Stefan Weil wrote:
>>> It's common to use either out-of-tree builds or in-tree builds,
>>> but not to mix both variants with a common root directory.
>>> I think QEMU should explicitly forbid that mixed scenario (like
>>> other projects do).
>>>
>>> Even with your fix there can remain problems with generated
>>> header files.
>>
>> Really? Can you provide more specific details?
>
> Yes. Suppose different generated header files with the same name
> exist in the source directory tree and in the build directory tree.
>
> Then compiler options (the order of -I options) will determine
> which of two header files with same name will be used in out-of-tree
> builds. If the wrong one (that from the source directory tree) is used,
> the compiler might fail or produce wrong code (for example when
> macro values changed).
>>> The mixed scenario creates unnecessary complexity.
>>> Without the mixed scenario, your patch is not needed.
>>
>> I agree that supporting the mixed scenario shouldn't be a priority.
>> However without this last patch a "make clean" on the main tree is not
>> enough to allow out of tree builds.
>>
>> Try the following scenario:
>>
>> - cd qemu; ./configure; make
>>
>> - make clean
>>
>> - cd ../temp; ./configure --source-path=../qemu; make
>
> Which ./configure do you run in an empty temp directory?
> This example (like similar ones in your previous mail) won't work.

Yes, you must do external builds only from a clean source directory.  This is a 
perfectly normal requirement.  In fact, I can't think of a project that doesn't 
require this.

Regards,

Anthony Liguori

>
>>
>> this has to work, right? It does not without the patch to fix the
>> generation of config-devices.mak.
>
> No. You'll need a 'make distclean'. If that does what it should do,
> a following out-of-tree build will work.
>
> Regards,
> Stefan Weil
>
>

  reply	other threads:[~2011-12-01 18:29 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 17:27 [Qemu-trivial] [PATCH] fix out of tree build Stefano Stabellini
2011-11-22 17:27 ` [Qemu-devel] " Stefano Stabellini
2011-11-23  9:48 ` [Qemu-trivial] " Stefan Hajnoczi
2011-11-23  9:48   ` [Qemu-devel] " Stefan Hajnoczi
2011-11-28 18:34 ` [Qemu-trivial] [Qemu-devel] " Stefan Weil
2011-11-28 18:34   ` Stefan Weil
2011-11-28 18:45   ` [Qemu-trivial] " Anthony Liguori
2011-11-28 18:45     ` Anthony Liguori
2011-11-28 20:40   ` [Qemu-trivial] " Stefan Weil
2011-11-28 20:40     ` Stefan Weil
2011-11-29 16:23     ` [Qemu-trivial] " Stefano Stabellini
2011-11-29 16:23       ` Stefano Stabellini
2011-11-29 22:47     ` [Qemu-trivial] [PATCH 1/2] qapi: fix guardname generation Michael Roth
2011-11-29 22:47       ` [Qemu-devel] " Michael Roth
2011-11-29 22:47       ` [Qemu-trivial] [PATCH 2/2] Makefile: use full path for qapi-generated directory Michael Roth
2011-11-29 22:47         ` [Qemu-devel] " Michael Roth
2011-11-30  9:10         ` [Qemu-trivial] " Stefan Hajnoczi
2011-11-30  9:10           ` [Qemu-devel] " Stefan Hajnoczi
2011-11-30 13:03           ` Stefano Stabellini
2011-11-30 13:03             ` [Qemu-devel] " Stefano Stabellini
2011-11-30 19:59             ` [Qemu-trivial] [Qemu-devel] " Stefan Weil
2011-11-30 19:59               ` [Qemu-devel] [Qemu-trivial] " Stefan Weil
2011-12-01 15:19               ` [Qemu-trivial] [Qemu-devel] " Stefano Stabellini
2011-12-01 15:19                 ` [Qemu-devel] [Qemu-trivial] " Stefano Stabellini
2011-12-01 16:05                 ` [Qemu-trivial] [Qemu-devel] " Michael Roth
2011-12-01 16:05                   ` [Qemu-devel] [Qemu-trivial] " Michael Roth
2011-12-01 18:11                 ` [Qemu-trivial] [Qemu-devel] " Stefan Weil
2011-12-01 18:11                   ` [Qemu-devel] [Qemu-trivial] " Stefan Weil
2011-12-01 18:28                   ` Anthony Liguori [this message]
2011-12-01 18:28                     ` Anthony Liguori
2011-12-01 18:42                     ` [Qemu-trivial] [Qemu-devel] " Stefano Stabellini
2011-12-01 18:42                       ` [Qemu-devel] [Qemu-trivial] " Stefano Stabellini
2011-12-01 19:12                       ` [Qemu-trivial] [Qemu-devel] " Michael Roth
2011-12-01 19:12                         ` [Qemu-devel] [Qemu-trivial] " Michael Roth
2011-12-01 18:38                   ` [Qemu-trivial] [Qemu-devel] " Stefano Stabellini
2011-12-01 18:38                     ` [Qemu-devel] [Qemu-trivial] " Stefano Stabellini
2011-11-30  9:08       ` [Qemu-trivial] [PATCH 1/2] qapi: fix guardname generation Stefan Hajnoczi
2011-11-30  9:08         ` [Qemu-devel] " Stefan Hajnoczi

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=4ED7C76A.6060407@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=sw@weilnetz.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.