perf compilation fails


Cardenas Jose Antonio (JCARDENA)
 

Hi guys

 

I’m no table to build correctly perf package.

 

It looks like some sources have no been compiled because I’m getting an “undefined reference to” error.

 

This problem has appeared since we have upgraded the version of yocto zeus.

 

I’m getting this error

 

   arm-poky-linux-gnueabi-ld --sysroot=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot    -r -o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/perf-in.o  /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-bench.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-annotate.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-config.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-diff.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-evlist.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-ftrace.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-help.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-sched.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-buildid-list.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-buildid-cache.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-kallsyms.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-list.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-record.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-report.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-stat.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-timechart.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-top.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-script.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-kmem.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-lock.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-kvm.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-inject.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-mem.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-data.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-version.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-c2c.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/builtin-probe.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/bench/perf-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tests/perf-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/perf.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/util/perf-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/arch/perf-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/ui/perf-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/scripts/perf-in.o

arm-poky-linux-gnueabi-gcc  -march=armv7-a -mfpu=neon -mfloat-abi=hard -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -Os -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9=/usr/src/debug/perf/1.0-r9                      -fdebug-prefix-map=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9=/usr/src/debug/perf/1.0-r9                      -fdebug-prefix-map=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot=                      -fdebug-prefix-map=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot-native=  --sysroot=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot -ldw -Wbad-function-cast -Wdeclaration-after-statement -Wformat-security -Wformat-y2k -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-system-headers -Wold-style-definition -Wpacked -Wredundant-decls -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wformat -Wstrict-aliasing=3 -Wshadow -DHAVE_PERF_REGS_SUPPORT -O6 -fno-omit-frame-pointer -ggdb3 -funwind-tables -Wall -Wextra -std=gnu99 -fstack-protector-all -D_FORTIFY_SOURCE=2 -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf/util/include -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf/arch/arm/include -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/include/uapi -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/include/ -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/arch/arm/include/uapi -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/arch/arm/include/ -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/arch/arm/ -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0//util -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/ -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf/util -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/lib/ -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHAVE_SYNC_COMPARE_AND_SWAP_SUPPORT -DHAVE_PTHREAD_ATTR_SETAFFINITY_NP -DHAVE_PTHREAD_BARRIER -DHAVE_EVENTFD -DHAVE_GET_CURRENT_DIR_NAME -DHAVE_GETTID -DHAVE_DWARF_GETLOCATIONS_SUPPORT -DHAVE_GLIBC_SUPPORT -DHAVE_AIO_SUPPORT -DHAVE_SCHED_GETCPU_SUPPORT -DHAVE_SETNS_SUPPORT -DHAVE_LIBELF_SUPPORT -DHAVE_LIBELF_MMAP_SUPPORT -DHAVE_ELF_GETPHDRNUM_SUPPORT -DHAVE_GELF_GETNOTE_SUPPORT -DHAVE_ELF_GETSHDRSTRNDX_SUPPORT -DHAVE_LIBBPF_SUPPORT -DHAVE_JITDUMP -DHAVE_DWARF_UNWIND_SUPPORT -DHAVE_LIBUNWIND_SUPPORT -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot/usr/include -DHAVE_LIBCRYPTO_SUPPORT -DHAVE_SLANG_SUPPORT -DNO_LIBPERL -DHAVE_TIMERFD_SUPPORT -DNO_LIBPYTHON -DHAVE_CPLUS_DEMANGLE_SUPPORT -DHAVE_LIBBFD_SUPPORT -DHAVE_ZLIB_SUPPORT -DHAVE_LZMA_SUPPORT -DHAVE_BACKTRACE_SUPPORT -DDISASM_FOUR_ARGS_SIGNATURE -DHAVE_AUXTRACE_SUPPORT -I/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/ -ldl -lutil -Wl,-z,noexecstack -lunwind -lunwind-arm -L/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot/usr/lib -Xlinker --dynamic-list=/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/libtraceevent-dynamic-list \

               /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/perf-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/pmu-events/pmu-events-in.o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/libperf-in.o -Wl,--whole-archive /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/libapi.a /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/libtraceevent.a /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/libsubcmd.a /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/libbpf.a  -Wl,--no-whole-archive -Wl,--start-group -lpthread -lrt -lm -ldl -lelf -lunwind -lunwind-arm -lcrypto -lslang -lbfd -lopcodes -liberty -lz -llzma -Wl,--end-group -o /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/perf

/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/perf-in.o: in function `find_address_in_section':

/usr/src/debug/perf/1.0-r9/perf-1.0/tools/perf/util/srcline.c:200: undefined reference to `bfd_get_section_flags'

/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: /usr/src/debug/perf/1.0-r9/perf-1.0/tools/perf/util/srcline.c:204: undefined reference to `bfd_get_section_vma'

/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: /usr/src/debug/perf/1.0-r9/perf-1.0/tools/perf/util/srcline.c:205: undefined reference to `bfd_get_section_size'

collect2: error: ld returned 1 exit status

make[2]: *** [Makefile.perf:608: /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/perf] Error 1

make[1]: *** [Makefile.perf:219: sub-make] Error 2

make: *** [Makefile:70: all] Error 2

make: Leaving directory '/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/perf-1.0/tools/perf'

ERROR: oe_runmake failed

WARNING: /home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/temp/run.do_compile.146045:1 exit 1 from 'exit 1'

ERROR: Execution of '/home/bob/develop/yocto/build/tmp/work/emperor-poky-linux-gnueabi/perf/1.0-r9/temp/run.do_compile.146045' failed with exit code 1

 

Any clue about how I could fix it?

 

Regards.

 

 

Join yocto@lists.yoctoproject.org to automatically receive all group messages.