<?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>522</bug_id>
          
          <creation_ts>2010-11-05 00:45:49 +0000</creation_ts>
          <short_desc>enable sstate prebuilt for different build directory</short_desc>
          <delta_ts>2011-02-01 10:02:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>0.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.0 M1</target_milestone>
          
          <blocked>507</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Kevin Tian">kevin.tian</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>ke.yu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>tom.rini</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>10847</commentid>
    <comment_count>0</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2010-11-05 00:45:49 +0000</bug_when>
    <thetext>So far the prebuilt packages can be only reused if we use same build directory path as the one generating prebuilts. It&apos;s perhaps fine for delivering prebuilts to customer, but not good for developers who normally have various build directories which are removed and created occasionally. Having a prebuilt collection would ease those build-from-scratch tasks.

At least there&apos;re two factors blocking this purpose so far:
    PWD variable
    do_populate_sysroot encodes full path

For the first one we can easily add to base hash whitelist. But for 2nd one we may need more work. Perhaps we can split do_populate_sysroot into two stages, with the 1st stage installed to local sysroot directory, and the latter stage actually installed to target sysroot. This way 1st stage can be reused w/o need to rebuild from scratch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10872</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-11-10 14:25:06 +0000</bug_when>
    <thetext>The PWD part has now been fixed in master at least. Is the full path problem with do_populate_sysroot still present? Its possible this was already fixed close to the 0.9 release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10873</commentid>
    <comment_count>2</comment_count>
    <who name="Tom Rini">tom.rini</who>
    <bug_when>2010-11-10 14:35:23 +0000</bug_when>
    <thetext>As of 2e0ab8c18f1869a6fd1f53140fed0b4f3a1c3274 it&apos;s still not right (mkdir .../build2, cp -a build/conf build2/, modify SSTATE_CACHE).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10877</commentid>
    <comment_count>3</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2010-11-10 16:49:06 +0000</bug_when>
    <thetext>I think do_populate_sysroot issue I observed last time did disappear now. So you&apos;re right that it has been fixed around 0.9.

I did a full sato build, there&apos;re still 31 packages which didn&apos;t reuse prebuilt. I haven&apos;t got time to look into the reason, but I&apos;ll do some work today and perhaps open a new bug for that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10878</commentid>
    <comment_count>4</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2010-11-10 16:50:46 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; As of 2e0ab8c18f1869a6fd1f53140fed0b4f3a1c3274 it&apos;s still not right (mkdir
&gt; .../build2, cp -a build/conf build2/, modify SSTATE_CACHE).

Tom, could you elaborate your problem? Is it related to the issues stated by this bug? I know there&apos;re still some problems with sstate health, but if yours is a new problem, then we may open a new bug to track the exact problem more closely...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10881</commentid>
    <comment_count>5</comment_count>
    <who name="Tom Rini">tom.rini</who>
    <bug_when>2010-11-11 06:02:51 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #2)
&gt; &gt; As of 2e0ab8c18f1869a6fd1f53140fed0b4f3a1c3274 it&apos;s still not right (mkdir
&gt; &gt; .../build2, cp -a build/conf build2/, modify SSTATE_CACHE).
&gt; 
&gt; Tom, could you elaborate your problem? Is it related to the issues stated by
&gt; this bug? I know there&apos;re still some problems with sstate health, but if yours
&gt; is a new problem, then we may open a new bug to track the exact problem more
&gt; closely...

I think I hit the post button a tad too quickly.  What I have seen is that if I build say poky-image-base in /tmp/poky/build and then poky-image-basic in /tmp/poky/build, and then create a /tmp/poky/build2 which points at /tmp/poky/build/sstate-cache for SSTATE_CACHE, gcc-runtime is (a) attempted to be built rather than found in the cache and (b) fails with (from config.log):
configure:3605: checking for i586-poky-linux-gcc -march=i586 --sysroot=/home/trini/work/poky/build2/tmp/sysroots/i586-poky-linux option to accept ISO C89
configure:3669: i586-poky-linux-gcc -march=i586 --sysroot=/home/trini/work/poky/build2/tmp/sysroots/i586-poky-linux  -c -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb -feliminate-unused-debug-types  conftest.c &gt;&amp;5
conftest.c:12:19: fatal error: stdio.h: No such file or directory

This is with MACHINE=qemux86 (local.conf is otherwise stock except for -j6 and BB_NUMBER_THREADS=4) on ubuntu 9.10 x86_64 host.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10924</commentid>
    <comment_count>6</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2010-11-19 00:46:32 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #2)
&gt; &gt; &gt; As of 2e0ab8c18f1869a6fd1f53140fed0b4f3a1c3274 it&apos;s still not right (mkdir
&gt; &gt; &gt; .../build2, cp -a build/conf build2/, modify SSTATE_CACHE).
&gt; &gt; 
&gt; &gt; Tom, could you elaborate your problem? Is it related to the issues stated by
&gt; &gt; this bug? I know there&apos;re still some problems with sstate health, but if yours
&gt; &gt; is a new problem, then we may open a new bug to track the exact problem more
&gt; &gt; closely...
&gt; I think I hit the post button a tad too quickly.  What I have seen is that if I
&gt; build say poky-image-base in /tmp/poky/build and then poky-image-basic in
&gt; /tmp/poky/build, and then create a /tmp/poky/build2 which points at
&gt; /tmp/poky/build/sstate-cache for SSTATE_CACHE, gcc-runtime is (a) attempted to
&gt; be built rather than found in the cache and (b) fails with (from config.log):
&gt; configure:3605: checking for i586-poky-linux-gcc -march=i586
&gt; --sysroot=/home/trini/work/poky/build2/tmp/sysroots/i586-poky-linux option to
&gt; accept ISO C89
&gt; configure:3669: i586-poky-linux-gcc -march=i586
&gt; --sysroot=/home/trini/work/poky/build2/tmp/sysroots/i586-poky-linux  -c
&gt; -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -ggdb
&gt; -feliminate-unused-debug-types  conftest.c &gt;&amp;5
&gt; conftest.c:12:19: fatal error: stdio.h: No such file or directory
&gt; This is with MACHINE=qemux86 (local.conf is otherwise stock except for -j6 and
&gt; BB_NUMBER_THREADS=4) on ubuntu 9.10 x86_64 host.

So this is the similar issue that I&apos;m seeing now. The bootstrap process is somewhat broken with sstate when some of gcc/libc stages change. gcc-runtime assumes gcc-cross-intermediate and thus eglibc-initial ready, however sstate.bbclass doesn&apos;t install anything for -intermediate and -initial prebuilts.

You suggested to use deptasks from pstage side, and I&apos;ll try that later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11636</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2011-02-01 10:02:34 +0000</bug_when>
    <thetext>The toolchain bootstrap process has been changed so this set of problems no longer exists in master.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>