<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>994</bug_id>
          
          <creation_ts>2011-04-17 21:28:52 +0000</creation_ts>
          <short_desc>Fix host infection in compile_perf</short_desc>
          <delta_ts>2011-07-22 11:32:11 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Kernel</product>
          <component>kernel-tooling</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>Saul and Tom working, testing Tom&apos;s patch</status_whiteboard>
          <keywords></keywords>
          <priority>High</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Saul Wold">sgw</reporter>
          <assigned_to name="Tom Zanussi">tom.zanussi</assigned_to>
          <cc>dvhart</cc>
    
    <cc>tom.zanussi</cc>
    
    <cc>yp.kernel.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13311</commentid>
    <comment_count>0</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-04-17 21:28:52 +0000</bug_when>
    <thetext>There is host infection with the usage of /usr/include/slang and /usr/include/elfutils.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13312</commentid>
    <comment_count>1</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-04-17 22:01:52 +0000</bug_when>
    <thetext>Can you add slightly more detail about how to reproduce, as I am not seeing this in my builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13320</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-04-18 08:45:59 +0000</bug_when>
    <thetext>do a bitbake -k world, or build the newt and slag packages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13322</commentid>
    <comment_count>3</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-04-18 09:50:02 +0000</bug_when>
    <thetext>Assigning to Tom as it&apos;s &quot;tracing&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13337</commentid>
    <comment_count>4</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-04-18 14:05:11 +0000</bug_when>
    <thetext>Running &apos;bitbake libnewt&apos; 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 &apos;/usr/local/test/intel-bsp/build/tmp/work/atom-poky-linux/slang-2.2.4-r5/slang-2.2.4&apos;
| ERROR: Function &apos;do_qa_configure&apos; 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 &apos;1&apos;
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: &apos;/usr/local/test/intel-bsp/meta/recipes-extended/slang/slang_2.2.4.bb&apos; 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 &quot;/usr/lib&quot; is unsafe for cross-compilation

libnewt DEPENDS on slang and recipes-extended/chkconfig/chkconfig_1.3.51.bb depends on libnewt.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13351</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-04-18 23:20:41 +0000</bug_when>
    <thetext>I tried to reproduce this by building the kernel/perf for the sugarbay target, and didn&apos;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&apos;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&apos;s been the case and so those hard-coded paths haven&apos;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&apos;ll do.  So I&apos;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&apos;ll also try getting perf to use elfutils, which is also available and should be getting used though it hasn&apos;t been so far, and is why the other hard-coded patch for elfutils hasn&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13403</commentid>
    <comment_count>6</comment_count>
    <who name="Tom Zanussi">tom.zanussi</who>
    <bug_when>2011-04-25 11:14:48 +0000</bug_when>
    <thetext>Fixed by commit:

ee2ff2ab53c4b26462fa2445b34c3ce09684a82c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13799</commentid>
    <comment_count>7</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-05-13 10:53:42 +0000</bug_when>
    <thetext>Bernard:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=aa37762223fba8836f7a1ce09498fe7ac8851bdb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>14931</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2011-07-22 11:32:11 +0000</bug_when>
    <thetext>build works without host infection</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>