<?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>10441</bug_id>
          
          <creation_ts>2016-10-16 10:08:44 +0000</creation_ts>
          <short_desc>source-highlight-native world build failures</short_desc>
          <delta_ts>2017-05-26 18:11:25 +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>2.2</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>major</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Ed Bartosh">eduard.bartosh</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
          
          <qa_contact name="David Lopez Barriba">davidx.lopez.barriba</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>67278</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-10-16 10:08:44 +0000</bug_when>
    <thetext>We&apos;ve seen two different world build failures in source-hightlight-native (dependency of source-hightlight). These are coming from libstdc++ incompatibility issues (from boost) coming from uninative.

debian8 (gcc 4.9):

configure:17686: result: no
configure:17651: checking for exit in -lboost_regex
configure:17676: g++  -o conftest -isystem/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2
 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -isystem/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include  -L
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib -L/home/pokybuild/yocto-autobuilder/yocto-worker/
nightly-world/build/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroot
s/x86_64-linux/usr/lib -Wl,-rpath-link,/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/ho
me/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/pokybuild/yocto-autobuilder/yocto-w
orker/nightly-world/build/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1 -L/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroot
s/x86_64-linux/usr/lib conftest.cpp -lboost_regex   &gt;&amp;5
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `std::r
untime_error::runtime_error(char const*)@GLIBCXX_3.4.21&apos;
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `std::o
verflow_error::overflow_error(char const*)@GLIBCXX_3.4.21&apos;
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `std::l
ogic_error::logic_error(char const*)@GLIBCXX_3.4.21&apos;
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `std::invalid_argument::invalid_argument(char const*)@GLIBCXX_3.4.21&apos;
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `std::runtime_error::runtime_error(char const*)@GLIBCXX_3.4.21&apos;
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `operator delete(void*, unsigned long)@CXXABI_1.3.9&apos;
collect2: error: ld returned 1 exit status
configure:17676: $? = 1
configure: failed program was:
| /* confdefs.h */
:

opensuse132 (gcc 4.8):

configure:17651: checking for exit in -lboost_regex
configure:17676: g++  -o conftest -isystem/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include -O2
 -pipe -D_GLIBCXX_USE_CXX11_ABI=0 -isystem/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/include  -L
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib -L/home/pokybuild/yocto-autobuilder/yocto-worker/
nightly-world/build/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath-link,/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroot
s/x86_64-linux/usr/lib -Wl,-rpath-link,/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/lib -Wl,-rpath,/ho
me/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib -Wl,-rpath,/home/pokybuild/yocto-autobuilder/yocto-w
orker/nightly-world/build/build/tmp/sysroots/x86_64-linux/lib -Wl,-O1 -L/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroot
s/x86_64-linux/usr/lib conftest.cpp -lboost_regex   &gt;&amp;5
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-world/build/build/tmp/sysroots/x86_64-linux/usr/lib/libboost_regex.so: undefined reference to `std::_
_throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20&apos;
collect2: error: ld returned 1 exit status
configure:17676: $? = 1
configure: failed program was:</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67279</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-10-16 13:08:30 +0000</bug_when>
    <thetext>Posted for discussion on the mailing list:

On a system compiling source-highlight-native with gcc 4.9 where boost-
native was built on a gcc 5 system, we see one error. On a system
compiling source-highlight-native with gcc 4.8 where boost-native was
built on a gcc 4.9 system, we see a different error.

The trouble is that libboost_regex.so in these cases wants the newer
libstdc++ but at link time of executable, it can only see the host
system and hence can&apos;t see newer symbols like
std::runtime_error::runtime_error(char const*) or
std::__throw_out_of_range_fmt(char const*, ...).

I have done a lot of experimentation and the only way I can see of
possibly making this work is to add -Wl,--unresolved-symbols=ignore-in-
shared-libs to BUILD_LDFLAGS for source-highlight *and* ensure any
native binaries get tweaked to use our own uninative loader before
they&apos;re run. The former is horrible and the latter bit is hard.

Another option would be to have multiple uninative feeds based on gcc
version rather than a single uninative one.

This close to release, I&apos;m reluctant to poke this too much. We don&apos;t
have many components that using C++, source-highlight is a
comparatively new one which isn&apos;t in our default configuration for now.
I&apos;m therefore tempted to release note and look at this in 2.3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67597</commentid>
    <comment_count>2</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-26 14:46:27 +0000</bug_when>
    <thetext>Fixed by implementing gcc version dependant uninative sstate cache.

Please, review:
http://lists.openembedded.org/pipermail/openembedded-core/2016-October/128067.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67627</commentid>
    <comment_count>3</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-10-27 07:12:50 +0000</bug_when>
    <thetext>Sent v2 for review: http://lists.openembedded.org/pipermail/openembedded-core/2016-October/128075.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69117</commentid>
    <comment_count>4</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-12-13 23:58:22 +0000</bug_when>
    <thetext>sent v3 after Pauls comment regarding v2 + fix:
http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130154.html

http://lists.openembedded.org/pipermail/openembedded-core/2016-December/130158.html

Tested on oe and poky.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69209</commentid>
    <comment_count>5</comment_count>
    <who name="Ed Bartosh">eduard.bartosh</who>
    <bug_when>2016-12-19 12:47:40 +0000</bug_when>
    <thetext>the fix has been merged to poky master</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73532</commentid>
    <comment_count>6</comment_count>
    <who name="David Lopez Barriba">davidx.lopez.barriba</who>
    <bug_when>2017-05-26 18:11:25 +0000</bug_when>
    <thetext>Verified in e5aa1ac23669a45491de9ecffac491c01e70203f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>