Received: from eggs.gnu.org ([140.186.70.92]:52356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RV813-0005aR-N8 for qemu-devel@nongnu.org; Mon, 28 Nov 2011 15:41:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RV811-0003tL-Hk for qemu-devel@nongnu.org; Mon, 28 Nov 2011 15:41:29 -0500 Message-ID: <4ED3F1C3.4060601@weilnetz.de> Date: Mon, 28 Nov 2011 21:40:35 +0100 From: Stefan Weil MIME-Version: 1.0 References: <4ED3D428.7030704@weilnetz.de> In-Reply-To: <4ED3D428.7030704@weilnetz.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] fix out of tree build List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: qemu-trivial@nongnu.org, Anthony Liguori , qemu-devel@nongnu.org Am 28.11.2011 19:34, schrieb Stefan Weil: > Am 22.11.2011 18:27, schrieb Stefano Stabellini: >> >> Signed-off-by: Stefano Stabellini >> >> diff --git a/Makefile b/Makefile >> index 168093c..885065f 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -167,7 +167,7 @@ check-qjson: check-qjson.o $(qobject-obj-y)=20 >> $(tools-obj-y) >> test-coroutine: test-coroutine.o qemu-timer-common.o async.o=20 >> $(coroutine-obj-y) $(tools-obj-y) >> >> $(qapi-obj-y): $(GENERATED_HEADERS) >> -qapi-dir :=3D qapi-generated >> +qapi-dir :=3D $(SRC_PATH)/qapi-generated >> test-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS +=3D=20 >> -I $(qapi-dir) >> qemu-ga$(EXESUF): LIBS =3D $(LIBS_QGA) > > This patch was committed to latest QEMU and breaks in-tree and=20 > out-of-tree builds. > Without it, both kinds of builds work in my standard Debian=20 > configuration. > > Regards, > Stefan Weil > > > gcc output (extract): > > CC /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types= .o > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= In=20 > function =91qapi_free_GuestAgentInfoList=92: > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= 39:=20 > warning: implicit declaration of function =91visit_type_GuestAgentInfoL= ist=92 > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= 39:=20 > warning: nested extern declaration of =91visit_type_GuestAgentInfoList=92 > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= In=20 > function =91qapi_free_GuestAgentInfo=92: > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= 54:=20 > warning: implicit declaration of function =91visit_type_GuestAgentInfo=92 > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= 54:=20 > warning: nested extern declaration of =91visit_type_GuestAgentInfo=92 > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= In=20 > function =91qapi_free_GuestFileReadList=92: > /home/stefan/src/qemu/qemu.org/patches/qapi-generated/qga-qapi-types.c:= 69:=20 > warning: implicit declaration of function =91visit_type_GuestFileReadLi= st=92 The broken build can be reproduced with a source path containing at=20 least one dot. Source paths without any dot will show no problems. My source path was=20 ~/src/qemu/qemu.org/qemu. File scripts/qapi.py fails to create unique guard names when given a=20 filename with 2 or more dots: def guardname(filename): if filename.startswith('./'): filename =3D filename[2:] return filename.replace("/", "_").replace("-",=20 "_").split(".")[0].upper() + '_H' The function always returns the same guard name (in my case=20 _HOME_STEFAN_SRC_QEMU_QEMU_H) which won't work when used for more than one header file. I expect that blanks in the source path will also give unexpected results= . Even when this function were fixed, I think that qapi-dir :=3D $(BUILD_DIR)/qapi-generated would be better. Regards, Stefan Weil