<?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>15712</bug_id>
          
          <creation_ts>2025-01-09 13:44:55 +0000</creation_ts>
          <short_desc>Add sanity test for working libstdc++</short_desc>
          <delta_ts>2025-01-30 16:32:14 +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>0.0.0</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>enhancement</bug_severity>
          <target_milestone>5.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Christos Gavros">gavrosc</assigned_to>
          <cc>gavrosc</cc>
    
    <cc>mark.asselstine</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>yoann.congal</cc>
          
          
          <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>100558</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2025-01-09 13:44:55 +0000</bug_when>
    <thetext>On irc we&apos;ve seen a couple of people report demangling problems in elfutils-native on differing ubuntu versions.

Once I convinced someone to share the config.log, it turned out that linking with -lstdc++ is failing. They were missing the right libstdc++-12-dev for their current c++ lib version (they had older ones).

The best &quot;fix&quot; for this I can see would be to test linking to libstdc++ in sanity.bbclass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100575</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-01-09 15:59:34 +0000</bug_when>
    <thetext>basically just need to test by having a hello world that use libstdc++ to add to  sanity.bbclass.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100618</commentid>
    <comment_count>2</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2025-01-13 23:21:56 +0000</bug_when>
    <thetext>Christos sent a v1 here: https://lists.openembedded.org/g/openembedded-core/topic/meta_oe_patch_sanity_test/110595436

Looking through the mentioned IRC logs: https://libera.irclog.whitequark.org/yocto/2025-01-06#37555109, it appear that the test to do is:
  gcc -lstdc++ ...
and not a compilation with g++.

The failing line in the logs of the original reporter (https://pastebin.com/HtzCe1vb) is
  configure:8876: checking for __cxa_demangle in -lstdc++
  configure:8905: gcc  -o conftest [...] conftest.c -lstdc++   &gt;&amp;5
  /yoc/test/build/tmp-glibc/hosttools/ld: cannot find -lstdc++: No such file or directory
  collect2: error: ld returned 1 exit status

To trigger the test, maybe removing libstc++-dev suffice?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100655</commentid>
    <comment_count>3</comment_count>
    <who name="Christos Gavros">gavrosc</who>
    <bug_when>2025-01-15 19:42:09 +0000</bug_when>
    <thetext>I have submitted a patch v2. The use of gcc with lstdc++ sounds advanced case to me.Am I wrong?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100771</commentid>
    <comment_count>4</comment_count>
    <who name="Christos Gavros">gavrosc</who>
    <bug_when>2025-01-30 14:47:54 +0000</bug_when>
    <thetext>hi

it is merged with the following commit ID:

https://git.openembedded.org/openembedded-core/commit/?id=611c1a26212dfbfe8d0640d9fefe5df49f7b69b8</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100820</commentid>
    <comment_count>5</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-01-30 16:32:14 +0000</bug_when>
    <thetext>Changed the issue type to an enhancement and also set the Status to resolved/fixed.

Thanks Christos.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>