<?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>2530</bug_id>
          
          <creation_ts>2012-06-01 16:27:23 +0000</creation_ts>
          <short_desc>bitbake fails to parse with &quot;method already seen&quot; error</short_desc>
          <delta_ts>2012-10-03 13:56:46 +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>BitBake</product>
          <component>bitbake</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
    
    <cc>sstncr</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>21794</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-06-01 16:27:23 +0000</bug_when>
    <thetext>When building, bitbake often fails to parse in my configuration.  The exact message is:

ERROR: Error Method already seen: get_policyconfigarch in&apos; libselinux_2.1.9.bb&apos; now in &apos;libselinux_git.bb&apos;

In order to reproduce this problem:

Host system - Fedora 16 - i686 (32-bit) - Core 2 Duo system

Python version 2.7.2

OE-core master -- commit: e3113827810e98eb1b012f0b280fb917199704c1
Bitbake master -- commit: 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b
meta-selinux master -- commit: a424d778f3b92a315553383ac1a6bcca682f6007

Use . ./oe-init-build-env to setup a default configuration, modify it:

BB_NUMBER_THREADS = &quot;2&quot;

PARALLEL_MAKE = &quot;-j 2&quot;

Add the meta-selinux to the bblayers.conf file:


# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = &quot;4&quot;

BBFILES ?= &quot;&quot;
BBLAYERS ?= &quot; \
  /home/buildbot/temp-fray/openembedded-core/meta \
  /home/buildbot/temp-fray/openembedded-core/meta-selinux \
  &quot;


I then ran bitbake in a loop:

while bitbake -e libselinux ; do rm -rf tmp-eglibc ; done

Within 2-3 runs, I usually receive the failure message indicated above.  (This issue was also reproduced with the version of bitbake and oe-core in the Yocto Project 1.2 release.)

Note: I was -not- able to reproduce this problem w/ Python 2.6.x that comes with CentOS 6.2, or a Fedora 13 machine running a similar python version.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>21795</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2012-06-01 16:46:34 +0000</bug_when>
    <thetext>I have checked in a workaround for this issue to the meta-selinux layer.  When attempting to reproduce this, be sure you match the commits in the original reproducer.

Commit: df4662758708ec030852ba3de007e021f0c4ad49 -- workaround for this issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22139</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-06-13 15:37:51 +0000</bug_when>
    <thetext>This is not so much a bug but bitbake telling you that you&apos;re doing something invalid.

Whilst its not particularly obvious, python functions share a global namespace since this is what BitBake has always done. Bitbake therefore errors if you try and add the same funciton name from different contexts. The solution is to put common functions within a .inc file.

I agree the error message is less than intuative...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>22181</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2012-06-14 13:21:17 +0000</bug_when>
    <thetext>I&apos;ve improved the error message in master to resolve this issue: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=4ff6160d909e2a39e357c8a51f37d803dab64d5d</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>26133</commentid>
    <comment_count>4</comment_count>
    <who name="Stefan Stanacar">sstncr</who>
    <bug_when>2012-10-03 13:56:46 +0000</bug_when>
    <thetext>Verified.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>