Bug 9579

Summary: [jethro] perf build failure with linux-yocto_3.19
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Frederico Cadete <frederico.cadete>
Component: kernelAssignee: Tom Zanussi <tom.zanussi>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: tom.zanussi
Version: 2.0.2   
Target Milestone: 2.0.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Frederico Cadete 2016-05-03 17:26:14 UTC
On poky, jethro tip (6dba9abd)
  source oe-init-build-env
  cd build
  echo 'PREFERRED_VERSION_linux-yocto_qemux86 = "3.19%"' >> conf/local.conf
  bitbake perf
  
Will fail with:
...
|   LINK     /home/extra/git/poky/build/tmp/work/qemux86-poky-linux/perf/1.0-r9/perf-1.0/perf
| /home/extra/git/poky/build/tmp/work/qemux86-poky-linux/perf/1.0-r9/perf-1.0/tests/builtin-test.o:(.data+0xac): undefined reference to `test__perf_time_to_tsc'
| collect2: error: ld returned 1 exit status
| make[1]: *** [/home/extra/git/poky/build/tmp/work/qemux86-poky-linux/perf/1.0-r9/perf-1.0/perf] Error 1
| make[1]: *** Waiting for unfinished jobs....
| make: *** [all] Error 2
| make: Leaving directory `/home/extra/git/poky/build/tmp/work-shared/qemux86/kernel-source/tools/perf'
| WARNING: exit code 1 from a shell command.
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/extra/git/poky/build/tmp/work/qemux86-poky-linux/perf/1.0-r9/temp/log.do_compile.26584)
ERROR: Task 6 (/home/extra/git/poky/meta/recipes-kernel/perf/perf.bb, do_compile) failed with exit code '1'
..

It works OK with linux-yocto 4.1 (the default).
It worked OK on yocto-2.0.
Comment 1 Tom Zanussi 2016-05-09 21:57:37 UTC
The reason this is failing is because the perf build is seeing ARCH=i386 and doesn't know what to do with that (it should be ARCH=x86).

The reason it's seeing ARCH=i386 is because of 

commit a6f52930a68d8462e23486d51cdda715072dd752
Author: Jianxun Zhang <jianxun.zhang@linux.intel.com>
Date:   Tue Jan 12 13:53:56 2016 -0800

    kernel/kernel-arch: Explicitly mapping between i386/x86_64 and x86 for kernel ARCH

This commit was reverted in krogoth and master; it also needs to be reverted from jethro.
Comment 2 Tom Zanussi 2016-05-10 21:51:25 UTC
Patch submitted to oe-core