[OpenWrt-Devel] [PATCH] package/devel/perf: fix build for kernel 4.1

Alexandru Ardelean ardeleanalex at gmail.com
Mon Oct 26 07:48:05 EDT 2015


Looks like it did not take much to actually come back with an answer.
So,

In file:
https://github.com/torvalds/linux/blob/v4.1/tools/perf/Makefile.perf
Line 75:   # Define NO_LZMA if you do not want to support compressed (xz)
kernel modules

Then file:
https://github.com/torvalds/linux/blob/v4.1/tools/perf/config/Makefile
Lines 544-553:

ifndef NO_LZMA
  ifeq ($(feature-lzma), 1)
    CFLAGS += -DHAVE_LZMA_SUPPORT
    EXTLIBS += -llzma
    $(call detected,CONFIG_LZMA)
  else
    msg := $(warning No liblzma found, disables xz kernel module
decompression, please install xz-devel/liblzma-dev);
    NO_LZMA := 1
  endif
endif

In my case it seems to enable by default.

Looking at the same files in 3.18:
https://github.com/torvalds/linux/blob/v3.18/tools/perf/config/Makefile
https://github.com/torvalds/linux/blob/v3.18/tools/perf/Makefile.perf

No mention of these.

Going a bit deeper, I found this commit:
https://github.com/torvalds/linux/commit/80a32e5b498a7547073e5e4b2b804edc7219979d
where LZMA compression gets added to perf.

Looks like it was enabled default in upstream.

So, I guess, we could build perf with NO_LZMA:=1 defined and we could
disable it.
No strong preferences from me.

Your call :)

On Mon, Oct 26, 2015 at 12:58 PM, John Crispin <blogic at openwrt.org> wrote:

> thanks ! the patch looks good but i am failing to understand why the
> lzma needs to be added :)
>
> On 26/10/2015 11:52, Alexandru Ardelean wrote:
> > Ah, sorry about this.
> > I forgot about it ; completely swamped.
> >
> > Will add it in my desktop notes that I keep and come back with an answer
> > asap (hopefully today/tomorrow).
> >
> >
> > On Mon, Oct 26, 2015 at 12:13 PM, John Crispin <blogic at openwrt.org
> > <mailto:blogic at openwrt.org>> wrote:
> >
> >
> >
> >     On 21/10/2015 20:03, John Crispin wrote:
> >     >
> >     >
> >     > On 15/10/2015 15:01, Alexandru Ardelean wrote:
> >     >> This fix contains 2 parts:
> >     >>  - kernel 4.1: backport upstream patch "perf build: Do not fail
> on missing Build file"
> >     >>  - add +liblzma dependency
> >     >>
> >     >
> >     > did you find out why there is suddenly a dependency on lzma ?
> >     >
> >     >       John
> >
> >
> >     ping ...
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20151026/62849c5c/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list