From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7NdR-0003UJ-Br for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:25:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7NdO-0006eO-5m for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:25:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57074) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7NdO-0006dK-01 for qemu-devel@nongnu.org; Thu, 17 Nov 2016 09:25:50 -0500 Date: Thu, 17 Nov 2016 14:25:43 +0000 From: "Daniel P. Berrange" Message-ID: <20161117142543.GF28482@redhat.com> Reply-To: "Daniel P. Berrange" References: <147939115373.23044.3882265154149942210.stgit@bahia> <20161117142200.GG2058@lemon> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161117142200.GG2058@lemon> 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: Fam Zheng Cc: Greg Kurz , qemu-devel@nongnu.org, Stefan Hajnoczi On Thu, Nov 17, 2016 at 10:22:00PM +0800, Fam Zheng wrote: > 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_eve= nts" > > 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_even= ts=E2=80=99: > > trace/generated-tracers.c:17949:32: error: invalid suffix "_trace_eve= nts" 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 >=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 D= an is > working on was only partly merged. But as a bandage for 2.8, it makes = things > better on top of the previous attemp 630b210b9 'Fix build for less comm= on build > directories names'. Thanks! As a quick hack for 2.8 this is fine by me. We can trivially revert it after merging the rest of the patches in 2.9 if needed. Regards, Daniel --=20 |: http://berrange.com -o- http://www.flickr.com/photos/dberrange= / :| |: http://libvirt.org -o- http://virt-manager.or= g :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr= / :|