Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759763Ab3ICJUG (ORCPT ); Tue, 3 Sep 2013 05:20:06 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:59156 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753222Ab3ICJUE (ORCPT ); Tue, 3 Sep 2013 05:20:04 -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:20:02 +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=089e01419fbe9c55a204e5773145 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8591 Lines: 176 --089e01419fbe9c55a204e5773145 Content-Type: text/plain; charset=UTF-8 On Tue, Sep 3, 2013 at 11:13 AM, Sedat Dilek wrote: > 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 > Grrr, space/tabs :-(. 0008 v3 attached. - Sedat - --089e01419fbe9c55a204e5773145 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-Trans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xl YW4gXAotCQlzZWxmdGVzdHNfY2xlYW4gdHVyYm9zdGF0X2NsZWFuIHVzYl9jbGVhbiB2aXJ0aW9f Y2xlYW4gXAotCQl2bV9jbGVhbiBuZXRfY2xlYW4geDg2X2VuZXJneV9wZXJmX3BvbGljeV9jbGVh bgorc2VsZnRlc3RzX2NsZWFuOgorCSQoY2FsbCBkZXNjZW5kLHRlc3RpbmcvJChAOl9jbGVhbj0p LGNsZWFuKQorCitjbGVhbjogY2dyb3VwX2NsZWFuIGZpcmV3aXJlX2NsZWFuIGxndWVzdF9jbGVh biBuZXRfY2xlYW4gdXNiX2NsZWFuIHZpcnRpb19jbGVhbiBcCisgICAgICAgICAgICAgICBwZXJm X2NsZWFuIHZtX2NsZWFuIFwKKyAgICAgICAgICAgICAgIGNwdXBvd2VyX2NsZWFuIHR1cmJvc3Rh dF9jbGVhbiB4ODZfZW5lcmd5X3BlcmZfcG9saWN5X2NsZWFuIFwKKyAgICAgICAgICAgICAgIHNl bGZ0ZXN0c19jbGVhbgogCiAuUEhPTlk6IEZPUkNFCi0tIAoxLjguNAoK --089e01419fbe9c55a204e5773145-- -- 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/