<?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>11104</bug_id>
          
          <creation_ts>2017-02-24 09:46:41 +0000</creation_ts>
          <short_desc>boost libboost_python3.so.1.62.1 links incorrectly against Python 2 C API</short_desc>
          <delta_ts>2017-03-30 13:00:23 +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>unspecified</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>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ismo Puustinen">ismo.puustinen</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>lukas.bulwahn</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70927</commentid>
    <comment_count>0</comment_count>
    <who name="Ismo Puustinen">ismo.puustinen</who>
    <bug_when>2017-02-24 09:46:41 +0000</bug_when>
    <thetext>Using libboost_python3 from any project fails with an &quot;undefined reference&quot; linking problem, because libboost_python3.so.1.62.0 appears to be built incorrectly against Python 2 includes and uses symbols which are not present in Python 3 C library.

libboost_python.so (Python 2) uses PyClass_Type, which is fine:

nm -D tmp-glibc/work/corei7-64-refkit-linux/boost/1.62.0-r1/sysroot-destdir/usr/lib/libboost_python.so.1.62.0 | grep PyClass_Type
                 U PyClass_Type

However, libboost_python3.so also uses the same symbol, which is not fine:

nm -D tmp-glibc/work/corei7-64-refkit-linux/boost/1.62.0-r1/sysroot-destdir/usr/lib/libboost_python3.so.1.62.0 | grep PyClass_Type
                 U PyClass_Type

Looking at the Python C libraries we can see that the symbol is prsent only in Python 2:

nm -D tmp-glibc/work/corei7-64-refkit-linux/boost/1.62.0-r1/recipe-sysroot/usr/lib/libpython3.5m.so | grep PyClass_Type
nm -D tmp-glibc/work/corei7-64-refkit-linux/boost/1.62.0-r1/recipe-sysroot/usr/lib/libpython2.7.so | grep PyClass_Type
000000000038e420 D PyClass_Type

There&apos;s some discussion about the issue here:

http://stackoverflow.com/questions/25188861/libboost-python3-so-1-56-0-undefined-symbol-pyclass-type</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71704</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-03-24 16:08:26 +0000</bug_when>
    <thetext>I&apos;m sending a patch to port boost from py2 to py3, so if Python is enabled in boost it only builds against Py3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71707</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-03-24 16:15:46 +0000</bug_when>
    <thetext>*** Bug 11152 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71902</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2017-03-30 13:00:23 +0000</bug_when>
    <thetext>Fixed in oe-core 0f5418eb0ce12811b16d2e3c28c28140a509f685.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>