lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Sep 2013 10:56:26 +0200
From:	Sedat Dilek <sedat.dilek@...il.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Robert Richter <rric@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] tools: perf: Fix liblk not built when using perf_install target

On Tue, Sep 3, 2013 at 10:48 AM, Namhyung Kim <namhyung@...nel.org> 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/ <tool>
     $ make -C tools/ <tool>_install

...because some <tool> 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.

Regards,
- Sedat -

Download attachment "0001-tools-Improve-and-correct-help-text.patch" of type "application/octet-stream" (1091 bytes)

Download attachment "0002-tools-lguest-Fix-typo-in-Makefile-target.patch" of type "application/octet-stream" (674 bytes)

Download attachment "0003-tools-vm-Consider-liblk-as-a-prerequisite.patch" of type "application/octet-stream" (1582 bytes)

Download attachment "0004-tools-usb-Use-pthread-instead-of-lpthread.patch" of type "application/octet-stream" (696 bytes)

Download attachment "0005-tools-vm-Add-dummy-install-target-to-fix-make-C-tool.patch" of type "application/octet-stream" (647 bytes)

Download attachment "0006-tools-selftests-Fix-selftests_install-target.patch" of type "application/octet-stream" (1244 bytes)

Download attachment "0007-tools-Introduce-an-all-target-to-build-all-tools.patch" of type "application/octet-stream" (1018 bytes)

Download attachment "0008-tools-Reorder-tool-_install-install-and-clean-target.patch" of type "application/octet-stream" (2645 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ