<?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>335</bug_id>
          
          <creation_ts>2010-09-16 13:28:52 +0000</creation_ts>
          <short_desc>Bitbake of ncurses fails with undefined symbol: _PyUnicodeUCS4_AsDefaultEncodedString</short_desc>
          <delta_ts>2010-12-21 06:07:11 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>0.9</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>0.9 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Díaz">yosoy</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>dexuan.cui</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>yosoy</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>9869</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Díaz">yosoy</who>
    <bug_when>2010-09-16 13:28:52 +0000</bug_when>
    <thetext>Trying to compile (or clean) ncurses or ncurses-native fails due to an undefined symbol in Python&apos;s operator.so:

-----8&lt;----------8&lt;----------8&lt;-----
$ time bitbake -c clean ncurses-native
NOTE: Handling BitBake files: | (0936/0936) [100 %]
Parsing of 936 .bb files complete (853 cached, 83 parsed). 1069 targets, 53 skipped, 0 masked, 0 errors.

OE Build Configuration:
BB_VERSION        = &quot;1.11.0&quot;
METADATA_BRANCH   = &quot;master&quot;
METADATA_REVISION = &quot;c01e8760ba5552e91f3af764c1233c2462494213&quot;
TARGET_ARCH       = &quot;arm&quot;
TARGET_OS         = &quot;linux-gnueabi&quot;
MACHINE           = &quot;pandaboard&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;3.3+snapshot-20100916&quot;
TARGET_FPU        = &quot;soft&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Full skip list set([])
NOTE: Running task 1 of 1 (ID: 0, virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb, do_clean)
Traceback (most recent call last):
  File &quot;/home/ddiazlocal/poky/scripts/..//bitbake//bin/bitbake-runtask&quot;, line 32, in &lt;module&gt;
    import bb.event
  File &quot;/home/ddiazlocal/poky/scripts/..//bitbake/lib/bb/__init__.py&quot;, line 31, in &lt;module&gt;
    import bb.msg
  File &quot;/home/ddiazlocal/poky/scripts/..//bitbake/lib/bb/msg.py&quot;, line 26, in &lt;module&gt;
    import collections
  File &quot;/usr/lib/python2.6/collections.py&quot;, line 9, in &lt;module&gt;
    from operator import itemgetter as _itemgetter
ImportError: /usr/lib/python2.6/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS4_AsDefaultEncodedString
ERROR: Task 0 (virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb, do_clean) failed with 1
ERROR: &apos;virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb&apos; failed

real    0m19.596s
user    0m16.080s
sys     0m0.360s
-----&gt;8----------&gt;8----------&gt;8-----

This is on Gentoo with python-2.6.5-r3 (latest of the Python 2.6.x series). For what it&apos;s worth, no previous version of operator.so presented that symbol:

-----8&lt;----------8&lt;----------8&lt;-----
$ for i in 2.4 2.5 2.6; do echo &quot;Python ${i}: `nm -D /usr/lib/python${i}/lib-dynload/operator.so | grep UCS`&quot;; done
Python 2.4: 
Python 2.5: 
Python 2.6:          U _PyUnicodeUCS4_AsDefaultEncodedString
-----&gt;8----------&gt;8----------&gt;8-----

All other packages seem to build correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9912</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-09-20 09:10:13 +0000</bug_when>
    <thetext>David,

Can you try this again with the latest master, I was not able to reproduce this issue.  We do not have a Gentoo System, but I have tried it on Fedora 64 as well as OpenSuse 64.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9945</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Díaz">yosoy</who>
    <bug_when>2010-09-25 01:09:01 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; David,
&gt; 
&gt; Can you try this again with the latest master, I was not able to reproduce this
&gt; issue.  We do not have a Gentoo System, but I have tried it on Fedora 64 as
&gt; well as OpenSuse 64.
&gt; 
&gt; Thanks

Paul,

It failed just the same with the newer master:
-----8&lt;----------8&lt;----------8&lt;-----
$ time bitbake ncurses-native 
NOTE: Handling BitBake files: \ (0839/0839) [100 %]
Parsing of 839 .bb files complete (793 cached, 46 parsed). 967 targets, 57 skipped, 0 masked, 0 errors.

OE Build Configuration:
BB_VERSION        = &quot;1.11.0&quot;
METADATA_BRANCH   = &quot;master&quot;
METADATA_REVISION = &quot;09f1f6939e5ec6a64c602bfb609e247082736ce8&quot;
TARGET_ARCH       = &quot;arm&quot;
TARGET_OS         = &quot;linux-gnueabi&quot;
MACHINE           = &quot;pandaboard&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;3.3+snapshot-20100925&quot;
TARGET_FPU        = &quot;soft&quot;

NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Full skip list set([])
Traceback (most recent call last):
  File &quot;/home/ddiazlocal/poky/scripts/..//bitbake//bin/bitbake-runtask&quot;, line 32, in &lt;module&gt;
    import bb.event
  File &quot;/home/ddiazlocal/poky/scripts/..//bitbake/lib/bb/__init__.py&quot;, line 31, in &lt;module&gt;
    import bb.msg
  File &quot;/home/ddiazlocal/poky/scripts/..//bitbake/lib/bb/msg.py&quot;, line 26, in &lt;module&gt;
    import collections
  File &quot;/usr/lib/python2.6/collections.py&quot;, line 9, in &lt;module&gt;
    from operator import itemgetter as _itemgetter
ImportError: /usr/lib/python2.6/lib-dynload/operator.so: undefined symbol: _PyUnicodeUCS4_AsDefaultEncodedString
NOTE: Running task 335 of 457 (ID: 12, virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb, do_package)
ERROR: Task 12 (virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb, do_package) failed with 1
ERROR: &apos;virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb&apos; failed

real    0m13.365s
user    0m12.053s
sys     0m0.364s
-----&gt;8----------&gt;8----------&gt;8-----

It&apos;s important to note that my host&apos;s Python is indeed built with UCS4, whereas Poky&apos;s isn&apos;t:
-----8&lt;----------8&lt;----------8&lt;-----
$ find . -name operator.so | while read n; do echo &quot;$n: `nm -D $n | grep UCS`&quot;; done
tmp/work/i686-linux/python-native-2.6.5-ml8.3/Python-2.6.5/build/lib.linux-i686-2.6/operator.so:          U _PyUnicodeUCS2_AsDefaultEncodedString
tmp/work/i686-linux/python-native-2.6.5-ml8.3/image/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:          U _PyUnicodeUCS2_AsDefaultEncodedString
tmp/work/i686-linux/python-native-2.6.5-ml8.3/sysroot-destdir/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:          U _PyUnicodeUCS2_AsDefaultEncodedString
tmp/work/i686-linux/python-native-2.6.5-ml8.3/pstage-build-populate-sysroot/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:          U _PyUnicodeUCS2_AsDefaultEncodedString
-----&gt;8----------&gt;8----------&gt;8-----</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9946</commentid>
    <comment_count>3</comment_count>
    <who name="Daniel Díaz">yosoy</who>
    <bug_when>2010-09-25 01:11:20 +0000</bug_when>
    <thetext>(In reply to comment #2)
[...]
&gt; It&apos;s important to note that my host&apos;s Python is indeed built with UCS4, whereas
&gt; Poky&apos;s isn&apos;t:
&gt; -----8&lt;----------8&lt;----------8&lt;-----
&gt; $ find . -name operator.so | while read n; do echo &quot;$n: `nm -D $n | grep UCS`&quot;;
&gt; done
&gt; tmp/work/i686-linux/python-native-2.6.5-ml8.3/Python-2.6.5/build/lib.linux-i686-2.6/operator.so:
&gt;          U _PyUnicodeUCS2_AsDefaultEncodedString
&gt; tmp/work/i686-linux/python-native-2.6.5-ml8.3/image/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:
&gt;          U _PyUnicodeUCS2_AsDefaultEncodedString
&gt; tmp/work/i686-linux/python-native-2.6.5-ml8.3/sysroot-destdir/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:
&gt;          U _PyUnicodeUCS2_AsDefaultEncodedString
&gt; tmp/work/i686-linux/python-native-2.6.5-ml8.3/pstage-build-populate-sysroot/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:
&gt;          U _PyUnicodeUCS2_AsDefaultEncodedString
&gt; -----&gt;8----------&gt;8----------&gt;8-----

Missed one more:
tmp/sysroots/i686-linux/usr/lib/python2.6/lib-dynload/operator.so:          U _PyUnicodeUCS2_AsDefaultEncodedString</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10113</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-09-30 17:19:41 +0000</bug_when>
    <thetext>Daniel,

Could you do me a favor and run bitbake under strace (strace -s 8096 -f -o strace.out bitbake ...) and then attach the strace.out file to the bug. This will help me determine what might be happening.

Thanks for your help.
Sau!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10115</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Díaz">yosoy</who>
    <bug_when>2010-10-01 00:19:29 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Daniel,
&gt; Could you do me a favor and run bitbake under strace (strace -s 8096 -f -o
&gt; strace.out bitbake ...) and then attach the strace.out file to the bug. This
&gt; will help me determine what might be happening.

Good idea! It&apos;s a bit big, so I&apos;m putting it here instead:
  http://afuera.cortijodelrio.net/~ddiaz/bitbake-strace.out.gz</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10116</commentid>
    <comment_count>6</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-10-01 04:01:16 +0000</bug_when>
    <thetext>The key part of the log is:
10079 stat64(&quot;/usr/bin/python&quot;, {st_mode=S_IFREG|0755, st_size=9532, ...}) = 0
10079 execve(&quot;/usr/bin/python2.6&quot;, [&quot;/usr/bin/python2.6&quot;, &quot;/home/ddiazlocal/poky/scripts/..//bitbake//bin/bitbake-runtask&quot;, &quot;virtual:native:/home/ddiazlocal/poky/meta/recipes-core/ncurses/ncurses_5.4.bb&quot;, &quot;do_package&quot;, &quot;False&quot;], [/* 83 vars */]) = 0
10079 brk(0)                            = 0x804b000
10079 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7725000
10079 access(&quot;/etc/ld.so.preload&quot;, R_OK) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/i686/sse2/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/i686/sse2&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/i686/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/i686&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/sse2/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/sse2&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/tls&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/i686/sse2/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/i686/sse2&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/i686/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/i686&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/sse2/libpython2.6.so.1.0&quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
10079 stat64(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/sse2&quot;, 0xbfcccee0) = -1 ENOENT (No such file or directory)
10079 open(&quot;/home/ddiazlocal/poky/build/tmp/sysroots/i686-linux/usr/lib/libpython2.6.so.1.0&quot;, O_RDONLY) = 3

which shows it using the system python with the poky python lib. That would cause exactly the error you see. Now the question becomes why?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10117</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-10-01 04:02:56 +0000</bug_when>
    <thetext>If you comment out the export LD_LIBRARY_PATH in the ncurses.inc file, what happens?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10134</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Díaz">yosoy</who>
    <bug_when>2010-10-02 01:40:05 +0000</bug_when>
    <thetext>&gt; If you comment out the export LD_LIBRARY_PATH in the ncurses.inc file, what
&gt; happens?

That is pure, black, black magic!:

&gt; NOTE: Tasks Summary: Attempted 712 tasks of which 711 didn&apos;t need to be rerun and 0 failed.

Commenting out LD_LIBRARY_PATH did the trick. Thanks a bunch, Richard!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10148</commentid>
    <comment_count>9</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-10-04 13:10:53 +0000</bug_when>
    <thetext>Commenting out LD_LIBRARY_PATH fix the problem</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10149</commentid>
    <comment_count>10</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-10-04 13:12:27 +0000</bug_when>
    <thetext>Daniel&apos;s last message verify the fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10151</commentid>
    <comment_count>11</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-10-04 13:14:02 +0000</bug_when>
    <thetext>*** Bug 370 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10227</commentid>
    <comment_count>12</comment_count>
    <who name="Dexuan Cui">dexuan.cui</who>
    <bug_when>2010-10-07 20:16:58 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Daniel&apos;s last message verify the fix

Yes, I can also verify the fix (&quot;Commenting out LD_LIBRARY_PATH fix the problem&quot;).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>