From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7JJF-0000JA-LR for qemu-devel@nongnu.org; Thu, 17 Nov 2016 04:48:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7JJA-0003UV-Ok for qemu-devel@nongnu.org; Thu, 17 Nov 2016 04:48:45 -0500 Received: from 3.mo53.mail-out.ovh.net ([178.33.44.239]:44647) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7JJA-0003UC-Im for qemu-devel@nongnu.org; Thu, 17 Nov 2016 04:48:40 -0500 Received: from player158.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo53.mail-out.ovh.net (Postfix) with ESMTP id 3253842E05 for ; Thu, 17 Nov 2016 10:48:39 +0100 (CET) Date: Thu, 17 Nov 2016 10:48:34 +0100 From: Greg Kurz Message-ID: <20161117104834.314dc73d@bahia> In-Reply-To: <20161117093444.GC2058@lemon> References: <147648037766.14770.15179642645810274907.stgit@bahia> <20161018151646.GI12728@redhat.com> <20161018153124.GB15199@redhat.com> <20161018175200.48a2d3cc@bahia> <20161020142520.GB2733@stefanha-x1.localdomain> <20161117080738.GB2058@lemon> <20161117101026.77534496@bahia> <20161117093444.GC2058@lemon> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] trace: fix group name generation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Peter Maydell On Thu, 17 Nov 2016 17:34:44 +0800 Fam Zheng wrote: > On Thu, 11/17 10:10, Greg Kurz wrote: > > On Thu, 17 Nov 2016 16:07:38 +0800 > > Fam Zheng wrote: > > =20 > > > On Thu, 10/20 15:25, Stefan Hajnoczi wrote: =20 > > > > >=20 > > > > > I have two other patches ready to fix the current situation: > > > > > - one using os.getcwd() to guess the build directory > > > > > - one implementing --group as mentioned in my other mail > > > > >=20 > > > > > But the one that filters unwanted characters is a less intrusive > > > > > workaround. =20 > > > >=20 > > > > If Dan's patches will eliminate the issue then we can take a workar= ound. > > > >=20 > > > > Any more comments about Greg's patch before I merge it? =20 > > >=20 > > > Should we include this in -rc1? I still see a build error today. > > >=20 > > > Fam > > > =20 > >=20 > > Hi Fam, > >=20 > > My patch was partly superseded by this commit: > >=20 > > commit 630b210b9abbf362905a2096c22c5eb1d6224e77 > > Author: Stefan Weil > > Date: Thu Oct 13 20:29:30 2016 +0200 > >=20 > > Fix build for less common build directories names > >=20 > > which does: > >=20 > > - return re.sub(r"/|-", "_", dirname) > > + return re.sub(r"[^A-Za-z0-9]", "_", dirname) > >=20 > > What is the build error you're hitting ? =20 >=20 > The substracted parts (basedir and dirname) are different paths for out-o= f-tree > build, and the "dirname" after the nonsense substraction as fed into re.s= ub() > could still start with a number. In my case the source is at >=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_events"= 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_events"= on integer constant > trace_event_register_group(2_trace_events); > ^ > make: *** [trace/generated-tracers.o] Error 1 My patch was addressing this as well... it is unfortunate it got dumped. :-\ I guess the following should be enough to fix your issue... but I'm no trac= etool expert and I cannot assure it doesn't break anything elsewhere... - return re.sub(r"[^A-Za-z0-9]", "_", dirname) + return "_" + re.sub(r"[^A-Za-z0-9]", "_", dirname) Cheers. -- Greg