From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROODc-0001IF-Se for qemu-devel@nongnu.org; Thu, 10 Nov 2011 01:34:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROODb-0007up-JP for qemu-devel@nongnu.org; Thu, 10 Nov 2011 01:34:36 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:47739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROODb-0007uX-Bu for qemu-devel@nongnu.org; Thu, 10 Nov 2011 01:34:35 -0500 Message-ID: <4EBB7046.1070308@weilnetz.de> Date: Thu, 10 Nov 2011 07:33:42 +0100 From: Stefan Weil MIME-Version: 1.0 References: <1320802728-21841-1-git-send-email-agraf@suse.de> <4EBA16A1.9090703@weilnetz.de> <4EBA558A.20707@suse.de> <20111109104751.3b5a028d@doriath> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org, =?windows-1252?Q?Andreas_?= =?windows-1252?Q?F=E4rber?= , 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=E4rber 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-softm= mu >>>>> 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 =91(=92 before =91= {=92 token >>>>> [...] >>>>> >>>>> This is because we have two files called qmp-commands.h. One=20 >>>>> 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=20 >>>>> up the >>>>> qmp-commands.h file from the target build directory which contains=20 >>>>> only >>>>> definitions of qmp commands, not the function stubs. >>>>> >>>>> This patch at least fixes this breakage for me, allowing me to comp= ile >>>>> s390x-softmmu again. >>>>> >>>>> CC: Luiz Capitulino >>>>> Signed-off-by: Alexander Graf >>>>> --- >>>>> 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=20 >>>> 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=3D-g is also very useful for build bots! bin/debug # directory configured with --enable-debug and CFLAGS=3D-g bin/ndebug # directory with default settings and compiler optimization Cheers, Stefan