There is host infection with the usage of /usr/include/slang and /usr/include/elfutils.
Can you add slightly more detail about how to reproduce, as I am not seeing this in my builds.
do a bitbake -k world, or build the newt and slag packages.
Assigning to Tom as it's "tracing".
Running 'bitbake libnewt' produces the following error: | NOTE: Checking autotools environment for common misconfiguration | ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. | Rerun configure task after fixing this. The path was '/usr/local/test/intel-bsp/build/tmp/work/atom-poky-linux/slang-2.2.4-r5/slang-2.2.4' | ERROR: Function 'do_qa_configure' failed NOTE: package slang-2.2.4-r5: task do_configure: Failed ERROR: Task 210 (/usr/local/test/intel-bsp/meta/recipes-extended/slang/slang_2.2.4.bb, do_configure) failed with exit code '1' Waiting for 2 active tasks to finish: 0: gettext-0.17-r5 do_configure (pid 9910) 1: eglibc-2.12-r13 do_package (pid 4698) Waiting for 1 active tasks to finish: 0: eglibc-2.12-r13 do_package (pid 4698) NOTE: package gettext-0.17-r5: task do_configure: Succeeded NOTE: package eglibc-2.12-r13: task do_package: Succeeded ERROR: '/usr/local/test/intel-bsp/meta/recipes-extended/slang/slang_2.2.4.bb' failed The cause of the failure is the use of /usr/lib: /usr/local/test/intel-bsp/build/tmp/sysroots/x86_64-linux/usr/libexec/atom-poky-linux/gcc/i586-poky-linux/4.5.1/ld: warning: library search path "/usr/lib" is unsafe for cross-compilation libnewt DEPENDS on slang and recipes-extended/chkconfig/chkconfig_1.3.51.bb depends on libnewt.
I tried to reproduce this by building the kernel/perf for the sugarbay target, and didn't see the problem. I also built the kernel/perf for crownbay and ran into the problem of bug #963, but got around that by pointing to a local clone of linux-yocto-2.6.37. Again, there was no problem with compile_perf and host infection. As I pointed out after the initial look, there does look like a problem with the perf Makefile hard-coding /usr/include/slang and /usr/include/elfutils, but there's no dependency in the perf recipe on libnewt/slang or elfutils - it skips those and builds without them if not found, and so far that's been the case and so those hard-coded paths haven't come into play. But it looks like with the recent addition of libnewt, perf sometimes does find the libnewt/slang pulled in by the unrelated chkconfig recipe, and at that point tries to use it, exposing the hard-coded /usr/include/slang. But since we now have libnewt available in the metadata, perf really should take advantage of it, so the hard-coded path should be fixed regardless, which I'll do. So I'll try adding the libnewt dependency for per, which should legitimately trigger the problem - I need to be able to trigger it somehow anyway in order to verify the fix. I'll also try getting perf to use elfutils, which is also available and should be getting used though it hasn't been so far, and is why the other hard-coded patch for elfutils hasn't come into play either. But note also that the slang recipe that libnewt depends on seems to have unrelated host contamination issues of its own, independent of perf.
Fixed by commit: ee2ff2ab53c4b26462fa2445b34c3ce09684a82c
Bernard: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=aa37762223fba8836f7a1ce09498fe7ac8851bdb
build works without host infection