Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759662Ab3ICJNz (ORCPT ); Tue, 3 Sep 2013 05:13:55 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:55474 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753862Ab3ICJNy (ORCPT ); Tue, 3 Sep 2013 05:13:54 -0400 MIME-Version: 1.0 Reply-To: sedat.dilek@gmail.com In-Reply-To: References: <1377875916-5208-1-git-send-email-sedat.dilek@gmail.com> <20130830164905.GA31061@rric.localhost> <874na2uw7t.fsf@sejong.aot.lge.com> Date: Tue, 3 Sep 2013 11:13:52 +0200 Message-ID: Subject: Re: [PATCH] tools: perf: Fix liblk not built when using perf_install target From: Sedat Dilek To: Namhyung Kim Cc: Robert Richter , LKML , Ingo Molnar , Peter Zijlstra , Arnaldo Carvalho de Melo , Linus Torvalds Content-Type: multipart/mixed; boundary=f46d043c7c5689353104e5771b92 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8421 Lines: 171 --f46d043c7c5689353104e5771b92 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 3, 2013 at 10:56 AM, Sedat Dilek wrote: > On Tue, Sep 3, 2013 at 10:48 AM, Namhyung Kim wrote: >> Hi, >> >> On Fri, 30 Aug 2013 18:49:05 +0200, Robert Richter wrote: >>> On 30.08.13 17:18:36, Sedat Dilek wrote: >>>> So, I tried to build perf the "official" way: >>>> >>>> $ make -C tools/ perf_install >>>> >>>> Unfortunately, my build breaks like this: >>>> ... >>>> make[2]: Entering directory >>>> `~/src/linux-kernel/linux/tools/lib/traceevent' >>>> make[2]: Leaving directory >>>> `~/src/linux-kernel/linux/tools/lib/traceevent' >>>> LINK perf >>>> gcc: error: ~/src/linux-kernel/linux/tools/lib/lk/liblk.a: No such file or directory >>>> make[1]: *** [perf] Error 1 >>>> make[1]: Leaving directory `~/src/linux-kernel/linux/tools/perf' >>>> make: *** [perf_install] Error 2 >>>> >>>> After some discussion on IRC with peterz and acme and a closer look at >>>> the targets in "tools/Makefile", I have noticed that the perf_install >>>> target misses liblk to be built beforehand. >>> >>> There are no build prerequisites on purpose for install targets. >>> Install targets are intended to be run with root permissions. We don't >>> want to create/overwrite files in the build directory as root while >>> running install rules. Thus, you always need to run: >>> >>> $ make -C tools/ perf >>> >>> or similar first. >> >> But AFAIK install target usually depends on build targets on many >> projects. And perf too already does the same: >> >> [ tools/perf/Makefile ] >> install-bin: all >> ... >> >> install: install-bin >> >> >> So if you really concern the permission problem, install target should >> not build perf itself, right? But in this case, it tried to build perf >> but failed to do it on liblk. >> >>> >>>> On the contrary the perf_clean target invokes to clean liblk when perf >>>> is cleaned. >>>> >>>> [ tools/Makefile ] >>>> ... >>>> perf_clean: liblk_clean >>>> $(call descend,$(@:_clean=),clean) >>>> ... >>>> >>>> Fix this by adding liblk target to perf_install target. >>> >>> So no, this is not the proper fix. >>> >>> Before installing you *need* to build. You might want to fix the >>> documenation... >> >> Hmm.. I don't know. What I'm curious about is why it didn't build liblk >> during building perf. >> > > The day I fell over that perf stuff, I created a pile of patches > fixing that unbeloved tools stuff. > Some tools listed in tools/Makefile are not buildable via... > > $ make -C tools/ > $ make -C tools/ _install > > ...because some have no "install" target. > > I attach the patchset here. It has no "proper" changelogs. > The series is "incomplete"... needs some more love... eat it carefully. > Attached 0008 v2. * move cpupower to tools where sources are below power-dir. * selftests is always last target - Sedat - --f46d043c7c5689353104e5771b92 Content-Type: application/octet-stream; name="0008-tools-Reorder-tool-_install-install-and-clean-target.patch" Content-Disposition: attachment; filename="0008-tools-Reorder-tool-_install-install-and-clean-target.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hl4wh29v8 RnJvbSBkZmVmMjg4N2YwODRkMmNjZjdlMzdmNmIzMTkyNTRjM2I3M2NiZTY1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTZWRhdCBEaWxlay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bGljeV9jbGVhbgorc2VsZnRlc3RzX2NsZWFuOgorICAgICAgICAkKGNhbGwg ZGVzY2VuZCx0ZXN0aW5nLyQoQDpfY2xlYW49KSxjbGVhbikKKworY2xlYW46IGNncm91cF9jbGVh biBmaXJld2lyZV9jbGVhbiBsZ3Vlc3RfY2xlYW4gbmV0X2NsZWFuIHVzYl9jbGVhbiB2aXJ0aW9f Y2xlYW4gXAorICAgICAgICAgICAgICAgcGVyZl9jbGVhbiB2bV9jbGVhbiBcCisgICAgICAgICAg ICAgICBjcHVwb3dlcl9jbGVhbiB0dXJib3N0YXRfY2xlYW4geDg2X2VuZXJneV9wZXJmX3BvbGlj eV9jbGVhbiBcCisgICAgICAgICAgICAgICBzZWxmdGVzdHNfY2xlYW4KIAogLlBIT05ZOiBGT1JD RQotLSAKMS44LjQKCg== --f46d043c7c5689353104e5771b92-- -- 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/