On Thu, 11/17 10:10, Greg Kurz wrote: > On Thu, 17 Nov 2016 16:07:38 +0800 > Fam Zheng <f...@redhat.com> wrote: > > > On Thu, 10/20 15:25, Stefan Hajnoczi wrote: > > > > > > > > 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 > > > > > > > > But the one that filters unwanted characters is a less intrusive > > > > workaround. > > > > > > If Dan's patches will eliminate the issue then we can take a workaround. > > > > > > Any more comments about Greg's patch before I merge it? > > > > Should we include this in -rc1? I still see a build error today. > > > > Fam > > > > Hi Fam, > > My patch was partly superseded by this commit: > > commit 630b210b9abbf362905a2096c22c5eb1d6224e77 > Author: Stefan Weil <s...@weilnetz.de> > Date: Thu Oct 13 20:29:30 2016 +0200 > > Fix build for less common build directories names > > which does: > > - return re.sub(r"/|-", "_", dirname) > + return re.sub(r"[^A-Za-z0-9]", "_", dirname) > > What is the build error you're hitting ?
The substracted parts (basedir and dirname) are different paths for out-of-tree build, and the "dirname" after the nonsense substraction as fed into re.sub() 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[] = { ^ trace/generated-tracers.c:15950:13: error: expected identifier or ‘(’ before numeric constant trace/generated-tracers.c: In function ‘trace_2_register_events’: 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