qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
@ 2011-11-09  1:38 Alexander Graf
  2011-11-09  5:58 ` Stefan Weil
  0 siblings, 1 reply; 14+ messages in thread
From: Alexander Graf @ 2011-11-09  1:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Luiz Capitulino

Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
target. Instead of compiling, it just throws a lot of errors:

In file included from /dev/shm/qemu/hw/pci-stub.c:24:
./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
[...]

This is because we have two files called qmp-commands.h. One resides in
the root directory of the source tree. The other one resides in the target
build directory.

Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
qmp-commands.h file from the target build directory which contains only
definitions of qmp commands, not the function stubs.

This patch at least fixes this breakage for me, allowing me to compile
s390x-softmmu again.

CC: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
---
 hw/pci-stub.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/pci-stub.c b/hw/pci-stub.c
index 636171c..ab9789c 100644
--- a/hw/pci-stub.c
+++ b/hw/pci-stub.c
@@ -21,7 +21,7 @@
 #include "sysemu.h"
 #include "monitor.h"
 #include "pci.h"
-#include "qmp-commands.h"
+#include "../qmp-commands.h"
 
 PciInfoList *qmp_query_pci(Error **errp)
 {
-- 
1.6.0.2

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09  1:38 [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp Alexander Graf
@ 2011-11-09  5:58 ` Stefan Weil
  2011-11-09 10:27   ` Andreas Färber
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Weil @ 2011-11-09  5:58 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel, Luiz Capitulino

Am 09.11.2011 02:38, schrieb Alexander Graf:
> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
> target. Instead of compiling, it just throws a lot of errors:
>
> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
> [...]
>
> This is because we have two files called qmp-commands.h. One resides in
> the root directory of the source tree. The other one resides in the target
> build directory.
>
> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
> qmp-commands.h file from the target build directory which contains only
> definitions of qmp commands, not the function stubs.
>
> This patch at least fixes this breakage for me, allowing me to compile
> s390x-softmmu again.
>
> CC: Luiz Capitulino<lcapitulino@redhat.com>
> Signed-off-by: Alexander Graf<agraf@suse.de>
> ---
>   hw/pci-stub.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
> index 636171c..ab9789c 100644
> --- a/hw/pci-stub.c
> +++ b/hw/pci-stub.c
> @@ -21,7 +21,7 @@
>   #include "sysemu.h"
>   #include "monitor.h"
>   #include "pci.h"
> -#include "qmp-commands.h"
> +#include "../qmp-commands.h"
>
>   PciInfoList *qmp_query_pci(Error **errp)
>   {

No. Simply remove */qmp-commands.h. They are relicts from previous builds.

Cheers,
Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09  5:58 ` Stefan Weil
@ 2011-11-09 10:27   ` Andreas Färber
  2011-11-09 12:47     ` Luiz Capitulino
  2011-11-09 17:57     ` Anthony Liguori
  0 siblings, 2 replies; 14+ messages in thread
From: Andreas Färber @ 2011-11-09 10:27 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Stefan Weil, qemu-devel, Luiz Capitulino

Am 09.11.2011 06:58, schrieb Stefan Weil:
> Am 09.11.2011 02:38, schrieb Alexander Graf:
>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>> target. Instead of compiling, it just throws a lot of errors:
>>
>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>> [...]
>>
>> This is because we have two files called qmp-commands.h. One resides in
>> the root directory of the source tree. The other one resides in the
>> target
>> build directory.
>>
>> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
>> qmp-commands.h file from the target build directory which contains only
>> definitions of qmp commands, not the function stubs.
>>
>> This patch at least fixes this breakage for me, allowing me to compile
>> s390x-softmmu again.
>>
>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>> Signed-off-by: Alexander Graf<agraf@suse.de>
>> ---
>>   hw/pci-stub.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>> index 636171c..ab9789c 100644
>> --- a/hw/pci-stub.c
>> +++ b/hw/pci-stub.c
>> @@ -21,7 +21,7 @@
>>   #include "sysemu.h"
>>   #include "monitor.h"
>>   #include "pci.h"
>> -#include "qmp-commands.h"
>> +#include "../qmp-commands.h"
>>
>>   PciInfoList *qmp_query_pci(Error **errp)
>>   {
> 
> No. Simply remove */qmp-commands.h. They are relicts from previous builds.

If make clean didn't help, please patch that instead then.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 10:27   ` Andreas Färber
@ 2011-11-09 12:47     ` Luiz Capitulino
  2011-11-09 23:45       ` Alexander Graf
  2011-11-09 17:57     ` Anthony Liguori
  1 sibling, 1 reply; 14+ messages in thread
From: Luiz Capitulino @ 2011-11-09 12:47 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Stefan Weil, Alexander Graf, qemu-devel

On Wed, 09 Nov 2011 11:27:22 +0100
Andreas Färber <afaerber@suse.de> wrote:

> Am 09.11.2011 06:58, schrieb Stefan Weil:
> > Am 09.11.2011 02:38, schrieb Alexander Graf:
> >> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
> >> target. Instead of compiling, it just throws a lot of errors:
> >>
> >> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
> >> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
> >> [...]
> >>
> >> This is because we have two files called qmp-commands.h. One resides in
> >> the root directory of the source tree. The other one resides in the
> >> target
> >> build directory.
> >>
> >> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
> >> qmp-commands.h file from the target build directory which contains only
> >> definitions of qmp commands, not the function stubs.
> >>
> >> This patch at least fixes this breakage for me, allowing me to compile
> >> s390x-softmmu again.
> >>
> >> CC: Luiz Capitulino<lcapitulino@redhat.com>
> >> Signed-off-by: Alexander Graf<agraf@suse.de>
> >> ---
> >>   hw/pci-stub.c |    2 +-
> >>   1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
> >> index 636171c..ab9789c 100644
> >> --- a/hw/pci-stub.c
> >> +++ b/hw/pci-stub.c
> >> @@ -21,7 +21,7 @@
> >>   #include "sysemu.h"
> >>   #include "monitor.h"
> >>   #include "pci.h"
> >> -#include "qmp-commands.h"
> >> +#include "../qmp-commands.h"
> >>
> >>   PciInfoList *qmp_query_pci(Error **errp)
> >>   {
> > 
> > No. Simply remove */qmp-commands.h. They are relicts from previous builds.
> 
> If make clean didn't help, please patch that instead then.

So, did it fix the problem for you Alex?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 10:27   ` Andreas Färber
  2011-11-09 12:47     ` Luiz Capitulino
@ 2011-11-09 17:57     ` Anthony Liguori
  2011-11-09 18:01       ` Andreas Färber
  1 sibling, 1 reply; 14+ messages in thread
From: Anthony Liguori @ 2011-11-09 17:57 UTC (permalink / raw)
  To: Andreas Färber
  Cc: Stefan Weil, Luiz Capitulino, Alexander Graf, qemu-devel

On 11/09/2011 04:27 AM, Andreas Färber wrote:
> Am 09.11.2011 06:58, schrieb Stefan Weil:
>> Am 09.11.2011 02:38, schrieb Alexander Graf:
>>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>>> target. Instead of compiling, it just throws a lot of errors:
>>>
>>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>>> [...]
>>>
>>> This is because we have two files called qmp-commands.h. One resides in
>>> the root directory of the source tree. The other one resides in the
>>> target
>>> build directory.
>>>
>>> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
>>> qmp-commands.h file from the target build directory which contains only
>>> definitions of qmp commands, not the function stubs.
>>>
>>> This patch at least fixes this breakage for me, allowing me to compile
>>> s390x-softmmu again.
>>>
>>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>>> Signed-off-by: Alexander Graf<agraf@suse.de>
>>> ---
>>>    hw/pci-stub.c |    2 +-
>>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>>> index 636171c..ab9789c 100644
>>> --- a/hw/pci-stub.c
>>> +++ b/hw/pci-stub.c
>>> @@ -21,7 +21,7 @@
>>>    #include "sysemu.h"
>>>    #include "monitor.h"
>>>    #include "pci.h"
>>> -#include "qmp-commands.h"
>>> +#include "../qmp-commands.h"
>>>
>>>    PciInfoList *qmp_query_pci(Error **errp)
>>>    {
>>
>> No. Simply remove */qmp-commands.h. They are relicts from previous builds.
>
> If make clean didn't help, please patch that instead then.

make clean is not meant to remove old files from old builds.

Regards,

Anthony Liguori

>
> Andreas
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 17:57     ` Anthony Liguori
@ 2011-11-09 18:01       ` Andreas Färber
  2011-11-09 23:12         ` Alexander Graf
  0 siblings, 1 reply; 14+ messages in thread
From: Andreas Färber @ 2011-11-09 18:01 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Stefan Weil, Luiz Capitulino, Alexander Graf, qemu-devel

Am 09.11.2011 18:57, schrieb Anthony Liguori:
> On 11/09/2011 04:27 AM, Andreas Färber wrote:
>> Am 09.11.2011 06:58, schrieb Stefan Weil:
>>> Am 09.11.2011 02:38, schrieb Alexander Graf:
>>>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>>>> target. Instead of compiling, it just throws a lot of errors:
>>>>
>>>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>>>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>>>> [...]
>>>>
>>>> This is because we have two files called qmp-commands.h. One resides in
>>>> the root directory of the source tree. The other one resides in the
>>>> target
>>>> build directory.
>>>>
>>>> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
>>>> qmp-commands.h file from the target build directory which contains only
>>>> definitions of qmp commands, not the function stubs.
>>>>
>>>> This patch at least fixes this breakage for me, allowing me to compile
>>>> s390x-softmmu again.
>>>>
>>>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>>>> Signed-off-by: Alexander Graf<agraf@suse.de>
>>>> ---
>>>>    hw/pci-stub.c |    2 +-
>>>>    1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>>>> index 636171c..ab9789c 100644
>>>> --- a/hw/pci-stub.c
>>>> +++ b/hw/pci-stub.c
>>>> @@ -21,7 +21,7 @@
>>>>    #include "sysemu.h"
>>>>    #include "monitor.h"
>>>>    #include "pci.h"
>>>> -#include "qmp-commands.h"
>>>> +#include "../qmp-commands.h"
>>>>
>>>>    PciInfoList *qmp_query_pci(Error **errp)
>>>>    {
>>>
>>> No. Simply remove */qmp-commands.h. They are relicts from previous
>>> builds.
>>
>> If make clean didn't help, please patch that instead then.
> 
> make clean is not meant to remove old files from old builds.

We have been using it that way in the past and I am not aware of a patch
that removed ancient cleanups, so it's good practice to keep it working
that way.

When I do a git pull I don't know whether or what it may bring. Always
doing make clean just-in-case is simply unproductive.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 18:01       ` Andreas Färber
@ 2011-11-09 23:12         ` Alexander Graf
  2011-11-09 23:38           ` Anthony Liguori
  0 siblings, 1 reply; 14+ messages in thread
From: Alexander Graf @ 2011-11-09 23:12 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Stefan Weil, qemu-devel@nongnu.org, Luiz Capitulino


Am 09.11.2011 um 19:01 schrieb Andreas Färber <afaerber@suse.de>:

> Am 09.11.2011 18:57, schrieb Anthony Liguori:
>> On 11/09/2011 04:27 AM, Andreas Färber wrote:
>>> Am 09.11.2011 06:58, schrieb Stefan Weil:
>>>> Am 09.11.2011 02:38, schrieb Alexander Graf:
>>>>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>>>>> target. Instead of compiling, it just throws a lot of errors:
>>>>> 
>>>>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>>>>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>>>>> [...]
>>>>> 
>>>>> This is because we have two files called qmp-commands.h. One resides in
>>>>> the root directory of the source tree. The other one resides in the
>>>>> target
>>>>> build directory.
>>>>> 
>>>>> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
>>>>> qmp-commands.h file from the target build directory which contains only
>>>>> definitions of qmp commands, not the function stubs.
>>>>> 
>>>>> This patch at least fixes this breakage for me, allowing me to compile
>>>>> s390x-softmmu again.
>>>>> 
>>>>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>>>>> Signed-off-by: Alexander Graf<agraf@suse.de>
>>>>> ---
>>>>>   hw/pci-stub.c |    2 +-
>>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>> 
>>>>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>>>>> index 636171c..ab9789c 100644
>>>>> --- a/hw/pci-stub.c
>>>>> +++ b/hw/pci-stub.c
>>>>> @@ -21,7 +21,7 @@
>>>>>   #include "sysemu.h"
>>>>>   #include "monitor.h"
>>>>>   #include "pci.h"
>>>>> -#include "qmp-commands.h"
>>>>> +#include "../qmp-commands.h"
>>>>> 
>>>>>   PciInfoList *qmp_query_pci(Error **errp)
>>>>>   {
>>>> 
>>>> No. Simply remove */qmp-commands.h. They are relicts from previous
>>>> builds.
>>> 
>>> If make clean didn't help, please patch that instead then.
>> 
>> make clean is not meant to remove old files from old builds.
> 
> We have been using it that way in the past and I am not aware of a patch
> that removed ancient cleanups, so it's good practice to keep it working
> that way.
> 
> When I do a git pull I don't know whether or what it may bring. Always
> doing make clean just-in-case is simply unproductive.

I agree. After a git pull the worst case I want to see is that I need to do make defconfig clean. Anything that doesn't clean up this way leaves my build in a broken state, meaning it's a bug to me.

Alex

> 
> Regards,
> Andreas
> 
> -- 
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 23:12         ` Alexander Graf
@ 2011-11-09 23:38           ` Anthony Liguori
  2011-11-09 23:44             ` Alexander Graf
  0 siblings, 1 reply; 14+ messages in thread
From: Anthony Liguori @ 2011-11-09 23:38 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Stefan Weil, Luiz Capitulino, Andreas Färber,
	qemu-devel@nongnu.org

On 11/09/2011 05:12 PM, Alexander Graf wrote:
>
>> We have been using it that way in the past and I am not aware of a patch
>> that removed ancient cleanups, so it's good practice to keep it working
>> that way.
>>
>> When I do a git pull I don't know whether or what it may bring. Always
>> doing make clean just-in-case is simply unproductive.
>
> I agree. After a git pull the worst case I want to see is that I need to do make defconfig clean. Anything that doesn't clean up this way leaves my build in a broken state, meaning it's a bug to me.

Sorry, but there's no way around this.  This doesn't happen often and emails are 
almost always sent ahead of time.

It's impossible to test something like this because by definition, the code no 
longer lives in the tree.

Regards,

Anthony Liguori

>
> Alex
>
>>
>> Regards,
>> Andreas
>>
>> --
>> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
>> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 23:38           ` Anthony Liguori
@ 2011-11-09 23:44             ` Alexander Graf
  2011-11-10  0:47               ` Anthony Liguori
  0 siblings, 1 reply; 14+ messages in thread
From: Alexander Graf @ 2011-11-09 23:44 UTC (permalink / raw)
  To: Anthony Liguori
  Cc: Stefan Weil, Luiz Capitulino, Andreas Färber,
	qemu-devel@nongnu.org


On 10.11.2011, at 00:38, Anthony Liguori wrote:

> On 11/09/2011 05:12 PM, Alexander Graf wrote:
>> 
>>> We have been using it that way in the past and I am not aware of a patch
>>> that removed ancient cleanups, so it's good practice to keep it working
>>> that way.
>>> 
>>> When I do a git pull I don't know whether or what it may bring. Always
>>> doing make clean just-in-case is simply unproductive.
>> 
>> I agree. After a git pull the worst case I want to see is that I need to do make defconfig clean. Anything that doesn't clean up this way leaves my build in a broken state, meaning it's a bug to me.
> 
> Sorry, but there's no way around this.  This doesn't happen often and emails are almost always sent ahead of time.
> 
> It's impossible to test something like this because by definition, the code no longer lives in the tree.

If we don't want to fix it, then we should remove the object directories for the build targets on git updates.


Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 12:47     ` Luiz Capitulino
@ 2011-11-09 23:45       ` Alexander Graf
  2011-11-10  0:51         ` Anthony Liguori
  2011-11-10  6:33         ` Stefan Weil
  0 siblings, 2 replies; 14+ messages in thread
From: Alexander Graf @ 2011-11-09 23:45 UTC (permalink / raw)
  To: Luiz Capitulino; +Cc: Stefan Weil, Andreas Färber, qemu-devel


On 09.11.2011, at 13:47, Luiz Capitulino wrote:

> On Wed, 09 Nov 2011 11:27:22 +0100
> Andreas Färber <afaerber@suse.de> wrote:
> 
>> Am 09.11.2011 06:58, schrieb Stefan Weil:
>>> Am 09.11.2011 02:38, schrieb Alexander Graf:
>>>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>>>> target. Instead of compiling, it just throws a lot of errors:
>>>> 
>>>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>>>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>>>> [...]
>>>> 
>>>> This is because we have two files called qmp-commands.h. One resides in
>>>> the root directory of the source tree. The other one resides in the
>>>> target
>>>> build directory.
>>>> 
>>>> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
>>>> qmp-commands.h file from the target build directory which contains only
>>>> definitions of qmp commands, not the function stubs.
>>>> 
>>>> This patch at least fixes this breakage for me, allowing me to compile
>>>> s390x-softmmu again.
>>>> 
>>>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>>>> Signed-off-by: Alexander Graf<agraf@suse.de>
>>>> ---
>>>>  hw/pci-stub.c |    2 +-
>>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>> 
>>>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>>>> index 636171c..ab9789c 100644
>>>> --- a/hw/pci-stub.c
>>>> +++ b/hw/pci-stub.c
>>>> @@ -21,7 +21,7 @@
>>>>  #include "sysemu.h"
>>>>  #include "monitor.h"
>>>>  #include "pci.h"
>>>> -#include "qmp-commands.h"
>>>> +#include "../qmp-commands.h"
>>>> 
>>>>  PciInfoList *qmp_query_pci(Error **errp)
>>>>  {
>>> 
>>> No. Simply remove */qmp-commands.h. They are relicts from previous builds.
>> 
>> If make clean didn't help, please patch that instead then.
> 
> So, did it fix the problem for you Alex?

Yup :). However, if I run into this other users / developers will too.


Alex

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 23:44             ` Alexander Graf
@ 2011-11-10  0:47               ` Anthony Liguori
  0 siblings, 0 replies; 14+ messages in thread
From: Anthony Liguori @ 2011-11-10  0:47 UTC (permalink / raw)
  To: Alexander Graf
  Cc: qemu-devel@nongnu.org, Stefan Weil, Andreas Färber,
	Luiz Capitulino

On 11/09/2011 05:44 PM, Alexander Graf wrote:
>
> On 10.11.2011, at 00:38, Anthony Liguori wrote:
>
>> On 11/09/2011 05:12 PM, Alexander Graf wrote:
>>>
>>>> We have been using it that way in the past and I am not aware of a patch
>>>> that removed ancient cleanups, so it's good practice to keep it working
>>>> that way.
>>>>
>>>> When I do a git pull I don't know whether or what it may bring. Always
>>>> doing make clean just-in-case is simply unproductive.
>>>
>>> I agree. After a git pull the worst case I want to see is that I need to do make defconfig clean. Anything that doesn't clean up this way leaves my build in a broken state, meaning it's a bug to me.
>>
>> Sorry, but there's no way around this.  This doesn't happen often and emails are almost always sent ahead of time.
>>
>> It's impossible to test something like this because by definition, the code no longer lives in the tree.
>
> If we don't want to fix it, then we should remove the object directories for the build targets on git updates.

I suspect the real problem you're having is that you are building within the src 
directory instead of a separate object directory.

But at any rate, if you do a 'make clean' before a git fetch/merge, you'll also 
be fine.

Regards,

Anthony Liguori

>
>
> Alex
>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 23:45       ` Alexander Graf
@ 2011-11-10  0:51         ` Anthony Liguori
  2011-11-10  6:33         ` Stefan Weil
  1 sibling, 0 replies; 14+ messages in thread
From: Anthony Liguori @ 2011-11-10  0:51 UTC (permalink / raw)
  To: Alexander Graf
  Cc: qemu-devel, Stefan Weil, Andreas Färber, Luiz Capitulino

On 11/09/2011 05:45 PM, Alexander Graf wrote:
>
> On 09.11.2011, at 13:47, Luiz Capitulino wrote:
>
>> On Wed, 09 Nov 2011 11:27:22 +0100
>> Andreas Färber<afaerber@suse.de>  wrote:
>>
>>> Am 09.11.2011 06:58, schrieb Stefan Weil:
>>>> Am 09.11.2011 02:38, schrieb Alexander Graf:
>>>>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>>>>> target. Instead of compiling, it just throws a lot of errors:
>>>>>
>>>>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>>>>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>>>>> [...]
>>>>>
>>>>> This is because we have two files called qmp-commands.h. One resides in
>>>>> the root directory of the source tree. The other one resides in the
>>>>> target
>>>>> build directory.
>>>>>
>>>>> Because pci-stub is not built in libhw, pci-stub.c seems to pick up the
>>>>> qmp-commands.h file from the target build directory which contains only
>>>>> definitions of qmp commands, not the function stubs.
>>>>>
>>>>> This patch at least fixes this breakage for me, allowing me to compile
>>>>> s390x-softmmu again.
>>>>>
>>>>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>>>>> Signed-off-by: Alexander Graf<agraf@suse.de>
>>>>> ---
>>>>>   hw/pci-stub.c |    2 +-
>>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>>
>>>>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>>>>> index 636171c..ab9789c 100644
>>>>> --- a/hw/pci-stub.c
>>>>> +++ b/hw/pci-stub.c
>>>>> @@ -21,7 +21,7 @@
>>>>>   #include "sysemu.h"
>>>>>   #include "monitor.h"
>>>>>   #include "pci.h"
>>>>> -#include "qmp-commands.h"
>>>>> +#include "../qmp-commands.h"
>>>>>
>>>>>   PciInfoList *qmp_query_pci(Error **errp)
>>>>>   {
>>>>
>>>> No. Simply remove */qmp-commands.h. They are relicts from previous builds.
>>>
>>> If make clean didn't help, please patch that instead then.
>>
>> So, did it fix the problem for you Alex?
>
> Yup :). However, if I run into this other users / developers will too.

That's why I sent this note:

http://mid.gmane.org/4E930612.2090104@codemonkey.ws

So that everyone was aware of this.  If you didn't read the note because you 
don't read every message on qemu-devel religiously (but I mean, doesn't 
everyone), then you should at least filter FYI or ANNOUNCES to a special folders.

I usually try to use an appropriate prefix when it's something that people need 
to look at.  You could also just filter any mail from me because every email I 
send is certainly worth reading ;-)

Regards,

Anthony Liguori

>
>
> Alex
>
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-09 23:45       ` Alexander Graf
  2011-11-10  0:51         ` Anthony Liguori
@ 2011-11-10  6:33         ` Stefan Weil
  2011-11-10  9:46           ` Andreas Färber
  1 sibling, 1 reply; 14+ messages in thread
From: Stefan Weil @ 2011-11-10  6:33 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel, Andreas Färber, Luiz Capitulino

Am 10.11.2011 00:45, schrieb Alexander Graf:
>
> On 09.11.2011, at 13:47, Luiz Capitulino wrote:
>
>> On Wed, 09 Nov 2011 11:27:22 +0100
>> Andreas Färber <afaerber@suse.de> wrote:
>>
>>> Am 09.11.2011 06:58, schrieb Stefan Weil:
>>>> Am 09.11.2011 02:38, schrieb Alexander Graf:
>>>>> Commit 79627472db3 introduced breakage in compiling the s390x-softmmu
>>>>> target. Instead of compiling, it just throws a lot of errors:
>>>>>
>>>>> In file included from /dev/shm/qemu/hw/pci-stub.c:24:
>>>>> ./qmp-commands.h:3: error: expected identifier or ‘(’ before ‘{’ token
>>>>> [...]
>>>>>
>>>>> This is because we have two files called qmp-commands.h. One 
>>>>> resides in
>>>>> the root directory of the source tree. The other one resides in the
>>>>> target
>>>>> build directory.
>>>>>
>>>>> Because pci-stub is not built in libhw, pci-stub.c seems to pick 
>>>>> up the
>>>>> qmp-commands.h file from the target build directory which contains 
>>>>> only
>>>>> definitions of qmp commands, not the function stubs.
>>>>>
>>>>> This patch at least fixes this breakage for me, allowing me to compile
>>>>> s390x-softmmu again.
>>>>>
>>>>> CC: Luiz Capitulino<lcapitulino@redhat.com>
>>>>> Signed-off-by: Alexander Graf<agraf@suse.de>
>>>>> ---
>>>>> hw/pci-stub.c | 2 +-
>>>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>>>
>>>>> diff --git a/hw/pci-stub.c b/hw/pci-stub.c
>>>>> index 636171c..ab9789c 100644
>>>>> --- a/hw/pci-stub.c
>>>>> +++ b/hw/pci-stub.c
>>>>> @@ -21,7 +21,7 @@
>>>>> #include "sysemu.h"
>>>>> #include "monitor.h"
>>>>> #include "pci.h"
>>>>> -#include "qmp-commands.h"
>>>>> +#include "../qmp-commands.h"
>>>>>
>>>>> PciInfoList *qmp_query_pci(Error **errp)
>>>>> {
>>>>
>>>> No. Simply remove */qmp-commands.h. They are relicts from previous 
>>>> builds.
>>>
>>> If make clean didn't help, please patch that instead then.
>>
>> So, did it fix the problem for you Alex?
>
> Yup :). However, if I run into this other users / developers will too.
>
>
> Alex

Hi Alex,

there is a rather simple solution for this kind of problems:
don't run make in your source tree.

QEMU supports out-of-tree builds since several years now.
So this helps:

# Run the following commands from QEMU's source root directory.
rm -rf bin && mkdir bin && cd bin && ../configure && make

This also allows several build directories with different configurations.
I use for example different trees for fast builds without compiler
optimization and full debugging and for production builds.
By the way: CFLAGS=-g is also very useful for build bots!

bin/debug  # directory configured with --enable-debug and CFLAGS=-g
bin/ndebug # directory with default settings and compiler optimization

Cheers,
Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp
  2011-11-10  6:33         ` Stefan Weil
@ 2011-11-10  9:46           ` Andreas Färber
  0 siblings, 0 replies; 14+ messages in thread
From: Andreas Färber @ 2011-11-10  9:46 UTC (permalink / raw)
  To: Stefan Weil, Anthony Liguori; +Cc: qemu-devel, Alexander Graf, Luiz Capitulino

Am 10.11.2011 07:33, schrieb Stefan Weil:
> Am 10.11.2011 00:45, schrieb Alexander Graf:
>>
>> On 09.11.2011, at 13:47, Luiz Capitulino wrote:
>>
>>> On Wed, 09 Nov 2011 11:27:22 +0100
>>> Andreas Färber <afaerber@suse.de> wrote:
>>>
>>>> Am 09.11.2011 06:58, schrieb Stefan Weil:
>>>>> No. Simply remove */qmp-commands.h. They are relicts from previous
>>>>> builds.
>>>>
>>>> If make clean didn't help, please patch that instead then.
>>>
>>> So, did it fix the problem for you Alex?
>>
>> Yup :). However, if I run into this other users / developers will too.
>>
>>
>> Alex
> 
> Hi Alex,
> 
> there is a rather simple solution for this kind of problems:
> don't run make in your source tree.
> 
> QEMU supports out-of-tree builds since several years now.
> So this helps:
> 
> # Run the following commands from QEMU's source root directory.
> rm -rf bin && mkdir bin && cd bin && ../configure && make
> 
> This also allows several build directories with different configurations.
> I use for example different trees for fast builds without compiler
> optimization and full debugging and for production builds.
> By the way: CFLAGS=-g is also very useful for build bots!
> 
> bin/debug  # directory configured with --enable-debug and CFLAGS=-g
> bin/ndebug # directory with default settings and compiler optimization

Stefan and Anthony, I usually do build out-of-tree but that suggestion
still ignores the issue that cleaning the build, whether in-tree or
out-of-tree, before a pull defeats the whole purpose of dependency-based
conditional compilation and wastes a lot of time.

Removing these stale generated files should've been something Luis'
patch should've been doing IMO, then it's easily reviewable and
testable; now we can still verify by doing a checkout and build of the
predecessor commit and HEAD, and pulling that in through qemu-trivial
doesn't cost you, Anthony, a lot of time if you don't see our point. :)

Hell, we still clean up dyngen files in Makefile so let's not be too
lazy to clean up things that actually do break the build for core
contributors!

If Alex doesn't beat me I'll look into it next time I have a
long-running test case.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-11-10  9:46 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-09  1:38 [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp Alexander Graf
2011-11-09  5:58 ` Stefan Weil
2011-11-09 10:27   ` Andreas Färber
2011-11-09 12:47     ` Luiz Capitulino
2011-11-09 23:45       ` Alexander Graf
2011-11-10  0:51         ` Anthony Liguori
2011-11-10  6:33         ` Stefan Weil
2011-11-10  9:46           ` Andreas Färber
2011-11-09 17:57     ` Anthony Liguori
2011-11-09 18:01       ` Andreas Färber
2011-11-09 23:12         ` Alexander Graf
2011-11-09 23:38           ` Anthony Liguori
2011-11-09 23:44             ` Alexander Graf
2011-11-10  0:47               ` Anthony Liguori

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).