From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50009) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7J5n-0006KS-WA for qemu-devel@nongnu.org; Thu, 17 Nov 2016 04:34:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7J5k-0007oC-6W for qemu-devel@nongnu.org; Thu, 17 Nov 2016 04:34:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37892) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7J5k-0007ne-0z for qemu-devel@nongnu.org; Thu, 17 Nov 2016 04:34:48 -0500 Date: Thu, 17 Nov 2016 17:34:44 +0800 From: Fam Zheng Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20161117101026.77534496@bahia> 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: Greg Kurz Cc: Stefan Hajnoczi , qemu-devel@nongnu.org, Peter Maydell 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 > > > > 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 ? 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 /var/tmp/aaa-qemu-clone and the build dir is /var/tmp/qemu-aio-poll-v2 Then I get an error as: 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