Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758406AbbKSLux (ORCPT ); Thu, 19 Nov 2015 06:50:53 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:30972 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758278AbbKSLuu (ORCPT ); Thu, 19 Nov 2015 06:50:50 -0500 Message-ID: <564DB78D.1050603@huawei.com> Date: Thu, 19 Nov 2015 19:50:37 +0800 From: "Wangnan (F)" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Arnaldo Carvalho de Melo , Jiri Olsa CC: Linux Kernel Mailing List Subject: Re: perf BPF/elfdep intermitent build problems References: <20151118224458.GD22729@kernel.org> In-Reply-To: <20151118224458.GD22729@kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.564DB791.012C,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d22fa7bb63af4ccf2c7fc3c1c539a960 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3383 Lines: 106 On 2015/11/19 6:44, Arnaldo Carvalho de Melo wrote: > Have you guys ever saw this? > > [acme@zoo linux]$ alias m > alias m='perf stat -e cycles make O=/tmp/build/perf -C tools/perf > install-bin' > [acme @zoo linux]$ m > make: Entering directory '/home/git/linux/tools/perf' > BUILD: Doing 'make -j4' parallel build > make[2]: Nothing to be done for 'fixdep'. > CC /tmp/build/perf/util/machine.o > LD /tmp/build/perf/util/libperf-in.o At the head of 'make' output I don't see Auto-detecting system features: ... So I guess your /tmp/build/perf is not an empty directory? Therefore there might be some garbage in that directory. At least a FEATURE-DUMP should be there, and that file should match perf's second pass feature check, and in perf's checks libelf and libpf are both passed, or libbpf won't be built. > No libelf found > BPF API too old But when building libbpf, these two feature checks failed. Also, the result is same to the garbage left in /tmp/build/perf/FEATURE-DUMP.libbpf, or feature check result matrix should be output. So there are something blocks lib/bpf's feature checks but not affect perf itselves feature checks. > Makefile:191: recipe for target 'elfdep' failed > make[2]: *** [elfdep] Error 255 > make[2]: *** Waiting for unfinished jobs.... > Makefile:194: recipe for target 'bpfdep' failed > make[2]: *** [bpfdep] Error 255 > Makefile.perf:434: recipe for target '/tmp/build/perf/libbpf.a' failed > make[1]: *** [/tmp/build/perf/libbpf.a] Error 2 > make[1]: *** Waiting for unfinished jobs.... > LD /tmp/build/perf/libperf-in.o > Makefile:87: recipe for target 'install-bin' failed > make: *** [install-bin] Error 2 > make: Leaving directory '/home/git/linux/tools/perf' > > Performance counter stats for 'make O=/tmp/build/perf -C tools/perf > install-bin': > > 10,265,920,369 cycles > > 3.002799545 seconds time elapsed > > [acme@zoo linux]$ > > > If I go and try doing a clean on the libbpf dir I see another problem: > > [acme@zoo linux]$ cd tools/lib/bpf > [acme@zoo bpf]$ make clean > > Auto-detecting system features: > ... libelf: [ OFF ] > ... bpf: [ OFF ] > > CLEAN libbpf > CLEAN core-gen > [acme@zoo bpf]$ Could you please provid the content of following files: /tmp/build/perf/feature/test-libelf*make.output /tmp/build/perf/feature/test-bpf.make.output and those outputs in your perf source tree after you do this 'perf clean'? If feature check fail these files should tell us the reason. > No need for feature detection when doing a plain 'make clean', right? Please have a look at my patch "tools lib bpf: Don't feature check when cleaning". > But then, after cleaning it again, and entering tools/perf to do a 'make > clean' as well, it does the feature detection at a second 'make clean' > and this time it shoes [ on ] for both libelf and bpf, and this time > I manage to build perf. So the one blocks libbpf's feature checking is removed. It inside perf source directory, but affects build dir... Still no clue. Jiri, can you find something? Thank you. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/