<?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>1455</bug_id>
          
          <creation_ts>2011-09-05 22:23:21 +0000</creation_ts>
          <short_desc>apt-native-0.7.14-r4: do_compile Failed: parallel-make issue?</short_desc>
          <delta_ts>2011-09-08 17:48:51 +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>devtools / tool chain</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dexuan Cui">dexuan.cui</reporter>
          <assigned_to name="Nitin Kamble">nitin.a.kamble</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</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>16028</commentid>
    <comment_count>0</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-05 22:23:21 +0000</bug_when>
    <thetext>My conf/local is:

BB_NUMBER_THREADS = &quot;16&quot;
PARALLEL_MAKE = &quot;-j 8&quot;
MACHINE ?= &quot;qemuarm&quot;
DL_DIR ?= &quot;/distro/dcui/sources/&quot;
DISTRO ?= &quot;poky&quot;
PACKAGE_CLASSES ?= &quot;package_deb&quot;
SDKMACHINE ?= &quot;i686&quot;
EXTRA_IMAGE_FEATURES = &quot;debug-tweaks&quot;
CONF_VERSION = &quot;1&quot;

The log of &quot;bitbake core-image-sato-sdk&quot; shows:
(When I get the issue, running &quot;bitbake apt-natve -c compile&quot; can succeed. So I think this is a parallel make issue)  

OE Build Configuration:
BB_VERSION        = &quot;1.13.3&quot;
TARGET_ARCH       = &quot;arm&quot;
TARGET_OS         = &quot;linux-gnueabi&quot;
MACHINE           = &quot;qemuarm&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;1.0+snapshot-20110906&quot;
TUNE_FEATURES     = &quot;armv5 dsp thumb arm926ejs&quot;
TARGET_FPU        = &quot;soft&quot;
meta
meta-yocto        = &quot;master:99cb233e0c8058c9a406e18fedae70b0f60e3864&quot;
...
...
ERROR: Logfile of failure stored in: /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/temp/log.do_compile.12636
Log data follows:
| NOTE: make -j 8
...
| Compiling deb/debsystem.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-pkg/debsystem.opic
| Compiling deb/debindexfile.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-pkg/debindexfile.opic
| Compiling deb/debmetaindex.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-pkg/debmetaindex.opic
| Building shared library /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/bin/libapt-pkg-libc6.3-6.so.4.6.0
| Compiling contrib/extracttar.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-inst/extracttar.opic
| Compiling contrib/arfile.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-inst/arfile.opic
| Compiling filelist.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-inst/filelist.opic
| Compiling database.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-inst/database.opic
| Compiling dirstream.cc to /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-inst/dirstream.opic
| database.cc:18: error: &apos;pkgDataBase&apos; has not been declared
| database.cc:18: error: &apos;string&apos; was not declared in this scope
ERROR: Function &apos;do_compile&apos; failed (see /distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/temp/log.do_compile.12636 for further information)
| database.cc:18: error: &apos;Dir&apos; was not declared in this scope
| database.cc:19: error: expected &apos;,&apos; or &apos;;&apos; before &apos;{&apos; token
| make[2]: *** [/distro/dcui/0905/p2/build/tmp/work/x86_64-linux/apt-native-0.7.14-r4/apt-0.7.14/obj/apt-inst/database.opic] Error 1
| make[2]: *** Waiting for unfinished jobs....
| contrib/extracttar.cc: In member function &apos;bool ExtractTar::Go(pkgDirStream&amp;)&apos;:
| contrib/extracttar.cc:211: warning: array subscript is above array bounds
| contrib/extracttar.cc:218: warning: array subscript is above array bounds
| make[1]: *** [all] Error 2
| make: *** [all] Error 2
| ERROR: oe_runmake failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16055</commentid>
    <comment_count>1</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-09-06 09:12:45 +0000</bug_when>
    <thetext>is this issue consistently reproducible ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16060</commentid>
    <comment_count>2</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-06 09:21:56 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; is this issue consistently reproducible ?

Yes. Following the config in comment #0, I can almost 100% reproduce it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16061</commentid>
    <comment_count>3</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-09-06 09:24:41 +0000</bug_when>
    <thetext>as it is a native recipe arch, machine, package_class should be irrelevant for reproducing the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16063</commentid>
    <comment_count>4</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-06 09:36:33 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; as it is a native recipe arch, machine, package_class should be irrelevant for
&gt; reproducing the issue.

Yes, you&apos;re right.

I meant there must be some race condition or parallel make issue here.
E.g., if I build from scratch, looks &quot;bitbake apt-native&quot; can&apos;t reproduce this bug, but &quot;bitbake core-image-sato-sdk&quot; can almost 100% reproduce this bug.

The config in comment #0 is only a config I used to reproduce the issue. It doesn&apos;t mean it&apos;s the necessary&amp;sufficient condition. :-)

It reported pkgDataBase is not declared. I had a look at the code, looks a header file does define pkgDataBase and is included in the .c file... Not sure how this compile failure occurs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16064</commentid>
    <comment_count>5</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-09-06 09:38:11 +0000</bug_when>
    <thetext>ok, thanks for the update. I am trying to reproduce it here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16074</commentid>
    <comment_count>6</comment_count>
    <who name="Nitin Kamble">nitin.a.kamble</who>
    <bug_when>2011-09-07 06:00:24 +0000</bug_when>
    <thetext>I tried to reproduce it, and it does not get reproduced.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16108</commentid>
    <comment_count>7</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2011-09-08 17:48:51 +0000</bug_when>
    <thetext>Nitin,
Sorry, but unluckily now even I can&apos;t reproduce the issue, either...

Looks only with my patches(not in poky master yet), it&apos;s easier to reproduce -- but I don&apos;t think my patch causes the bug.

So let me mark this bug as WorksForMe, and if I meet with it in my ongoing debugging and find a stable way to reproduce it, I&apos;ll reopen it.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>