[linux-yocto] Perf compile issue with kernel 4.1-rc7

Bruce Ashfield bruce.ashfield at windriver.com
Wed Jun 17 19:23:55 PDT 2015


On 2015-06-17 9:23 PM, Yu, Chan KitX wrote:
> Bumping this up in case you don’t see this.

I'm already building perf against the latest 4.1.x kernel's. Your
issue is that you are on the fido branch, which is missing the
changes that I sent to fix the build.

commit 358be3e8896c9c61522df60c62809aaf7601a185
Author: Bruce Ashfield <bruce.ashfield at windriver.com>
Date:   Thu Apr 30 21:34:19 2015 -0400

     perf: fix build (and feature tests) for 4.1-rcX

     The way that perf detects features has changed/moved via commit 
e6c76d620
     [perf build: Move feature checks code under tools/build].

     This code movement resulted in the definition of CC being dropped, and
     in turn the passing of --sysroot not part of the build.

     This results in feature tests failing with errors such as:

       In file included from test-pthread-attr-setaffinity-np.c:1:0:
 
sysroots/x86_64-linux/usr/lib/x86_64-poky-linux/gcc/x86_64-poky-linux/4.9.2/include/stdint.h:9:26:
       fatal error: stdint.h: No such file or directory
       # include_next <stdint.h>
                               ^
       compilation terminated.

     While the fix is going upstream, we can modify the perf recipe to add
     the definition of CC into the Makefile, and we'll continue to work on
     patched and unpatched kernels.

     Upstream-status: Pending

     (From OE-Core rev: 46f842039422aa35f62b03f11b648c02980ea1b1)

     Signed-off-by: Bruce Ashfield <bruce.ashfield at windriver.com>
     Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

:100644 100644 420fe6b57aba... eb273740ee10... M 
meta/recipes-kernel/perf/perf.bb




>
> *From:*Yu, Chan KitX
> *Sent:* Tuesday, June 16, 2015 8:03 AM
> *To:* linux-yocto at yoctoproject.org
> *Subject:* Perf compile issue with kernel 4.1-rc7
>
> Hi all,
>
> I recently found some compile issue whilst compiling perf in Yocto
> version Fido in kernel 4.1.0-rc7. The error log is at
> http://pastebin.com/mMBEDdsJ .
>
> The error log might have seem to suggest that the configure process (or
> compile) failed to detect the presence of Glibc libraries. Here’s the
> extract of perf’s config Makefile which could show the flow of the issue:
>
> ifdef NO_LIBELF
>
>    NO_DWARF := 1
>
>    NO_DEMANGLE := 1
>
>    NO_LIBUNWIND := 1
>
>    NO_LIBDW_DWARF_UNWIND := 1
>
> else
>
>    ifeq ($(feature-libelf), 0)
>
>      ifeq ($(feature-glibc), 1)
>
>        LIBC_SUPPORT := 1
>
>      endif
>
>      ifeq ($(BIONIC),1)
>
>        LIBC_SUPPORT := 1
>
>      endif
>
>      ifeq ($(LIBC_SUPPORT),1)
>
>        msg := $(warning No libelf found, disables 'probe' tool, please
> install elfutils-libelf-devel/libelf-dev);
>
>        NO_LIBELF := 1
>
>        NO_DWARF := 1
>
>        NO_DEMANGLE := 1
>
>        NO_LIBUNWIND := 1
>
>        NO_LIBDW_DWARF_UNWIND := 1
>
>      else
>
>        ifneq ($(filter s% -static%,$(LDFLAGS),),)
>
>          msg := $(error No static glibc found, please install glibc-static);
>
> *else*
>
> *        msg := $(error No gnu/libc-version.h found, please install
> glibc-dev[el]);*
>
> *      endif*
>
>      endif
>
>    else
>
>      ifndef NO_LIBDW_DWARF_UNWIND
>
>        ifneq ($(feature-libdw-dwarf-unwind),1)
>
>          NO_LIBDW_DWARF_UNWIND := 1
>
>          msg := $(warning No libdw DWARF unwind found, Please install
> elfutils-devel/libdw-dev >= 0.158 and/or set LIBDW_DIR);
>
>        endif
>
>      endif
>
>      ifneq ($(feature-dwarf), 1)
>
>        msg := $(warning No libdw.h found or old libdw.h found or
> elfutils is older than 0.138, disables dwarf support. Please install new
> elfutils-devel/libdw-dev);
>
>        NO_DWARF := 1
>
>      endif # Dwarf support
>
>    endif # libelf support
>
> endif # NO_LIBELF
>
> So it looked like LIBC_SUPPORT returned 0, then ($(filter s%
> -static%,$(LDFLAGS),) returned empty string or NULL (not too sure since
> I’m not skilled in Makefiles). I couldn’t conduct further debug process
> from here since I’m clueless on how to proceed. Hence my email J
>
> Any idea on how to crack on this?
>
> Chan Kit
>
>
>



More information about the linux-yocto mailing list