From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7NZn-0001mG-1l for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:22:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7NZj-0003iI-OM for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:22:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54284) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7NZj-0003hm-IT for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:22:03 -0500 Date: Thu, 17 Nov 2016 22:22:00 +0800 From: Fam Zheng Message-ID: <20161117142200.GG2058@lemon> References: <147939115373.23044.3882265154149942210.stgit@bahia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <147939115373.23044.3882265154149942210.stgit@bahia> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] trace: fix generated code build break List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi On Thu, 11/17 14:59, Greg Kurz wrote: > If the QEMU source dir is >=20 > /var/tmp/aaa-qemu-clone >=20 > and the build dir is >=20 > /var/tmp/qemu-aio-poll-v2 >=20 > Then I get an error as: >=20 > trace/generated-tracers.c:15950:13: error: invalid suffix "_trace_event= s" > on integer constant > TraceEvent *2_trace_events[] =3D { > ^ > trace/generated-tracers.c:15950:13: error: expected identifier or =E2=80= =98(=E2=80=99 before > numeric constant > trace/generated-tracers.c: In function =E2=80=98trace_2_register_events= =E2=80=99: > trace/generated-tracers.c:17949:32: error: invalid suffix "_trace_event= s" on > integer constant > trace_event_register_group(2_trace_events); > ^ > make: *** [trace/generated-tracers.o] Error 1 >=20 > This patch fixes the issue. >=20 > Reported-by: Fam Zheng > Signed-off-by: Greg Kurz > --- > scripts/tracetool.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/scripts/tracetool.py b/scripts/tracetool.py > index fe9c9e904b03..c9e47371d3c6 100755 > --- a/scripts/tracetool.py > +++ b/scripts/tracetool.py > @@ -70,7 +70,7 @@ def make_group_name(filename): > =20 > if dirname =3D=3D "": > return "common" > - return re.sub(r"[^A-Za-z0-9]", "_", dirname) > + return "_" + re.sub(r"[^A-Za-z0-9]", "_", dirname) > =20 > def main(args): > global _SCRIPT >=20 >=20 What make_group_name does here (returning substring of build dir based on= source dir) doesn't make sense to me at all, maybe it's because the patchset Dan= is working on was only partly merged. But as a bandage for 2.8, it makes th= ings better on top of the previous attemp 630b210b9 'Fix build for less common= build directories names'. Thanks! Tested-by: Fam Zheng