<?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>9772</bug_id>
          
          <creation_ts>2016-06-14 08:28:18 +0000</creation_ts>
          <short_desc>musl libgcc_s.so.1 missing symbols on target</short_desc>
          <delta_ts>2016-07-29 15:49: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>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.2 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jussi Kukkonen">jku</reporter>
          <assigned_to name="Khem Raj">raj.khem</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</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>62951</commentid>
    <comment_count>0</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-06-14 08:28:18 +0000</bug_when>
    <thetext>&gt; sh-4.3# ldd /lib/libgcc_s.so.1
&gt;         ldd (0x800f7000)
&gt;         libc.so =&gt; ldd (0x800f7000)
&gt; Error relocating /lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
&gt; Error relocating /lib/libgcc_s.so.1: __cpu_model: symbol not found


This happens with TCLIBC = &quot;musl&quot; and seems to break newer libvte versions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64140</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-18 21:18:01 +0000</bug_when>
    <thetext>We also saw this with weston:

  gbm: failed to open any driver (search paths /usr/lib/dri)
  gbm: last dlopen error: Error relocating /lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
  failed to load driver: i965

There was talk of security flags being a problem here, has this been verified or refuted?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64142</commentid>
    <comment_count>2</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-07-19 00:15:44 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; We also saw this with weston:
&gt; 
&gt;   gbm: failed to open any driver (search paths /usr/lib/dri)
&gt;   gbm: last dlopen error: Error relocating /lib/libgcc_s.so.1:
&gt; __cpu_indicator_init: symbol not found
&gt;   failed to load driver: i965
&gt; 
&gt; There was talk of security flags being a problem here, has this been
&gt; verified or refuted?

which architecture does it happen on ?
on x86 (qemux86) I dont see it

kraj02@dvm-wcdcc-khem-002 /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/lib
 % readelf -sW libgcc_s.so.1 | grep __cpu
   125: 0001d040    16 OBJECT  GLOBAL DEFAULT   22 __cpu_model@GCC_4.8.0
   135: 00002210   855 FUNC    GLOBAL DEFAULT   11 __cpu_indicator_init@GCC_4.8.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64145</commentid>
    <comment_count>3</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-07-19 07:42:20 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; We also saw this with weston:
&gt; &gt; 
&gt; &gt;   gbm: failed to open any driver (search paths /usr/lib/dri)
&gt; &gt;   gbm: last dlopen error: Error relocating /lib/libgcc_s.so.1:
&gt; &gt; __cpu_indicator_init: symbol not found
&gt; &gt;   failed to load driver: i965
&gt; &gt; 
&gt; &gt; There was talk of security flags being a problem here, has this been
&gt; &gt; verified or refuted?
&gt;
&gt; which architecture does it happen on ?

The core-image-weston test was with &quot;MACHINE=intel-corei7-64&quot; so x86-64.

I assume this is the issue:
https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00822.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64146</commentid>
    <comment_count>4</comment_count>
    <who name="Jussi Kukkonen">jku</who>
    <bug_when>2016-07-19 08:11:29 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; on x86 (qemux86) I dont see it
&gt; 
&gt; kraj02@dvm-wcdcc-khem-002
&gt; /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/lib
&gt;  % readelf -sW libgcc_s.so.1 | grep __cpu
&gt;    125: 0001d040    16 OBJECT  GLOBAL DEFAULT   22 __cpu_model@GCC_4.8.0
&gt;    135: 00002210   855 FUNC    GLOBAL DEFAULT   11
&gt; __cpu_indicator_init@GCC_4.8.0

readelf -s does not seem to show the problem:

root@qemux86-64:~# readelf -sW /lib/libgcc_s.so.1 |grep _cpu
    92: 0000000000002e60   969 FUNC    GLOBAL DEFAULT   12 __cpu_indicator_init@GCC_4.8.0
   116: 0000000000215650    16 OBJECT  GLOBAL DEFAULT   24 __cpu_model@GCC_4.8.0
root@qemux86-64:~# ldd /lib/libgcc_s.so.1 
	ldd (0x55bb59997000)
	libc.so =&gt; ldd (0x55bb59997000)
Error relocating /lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
Error relocating /lib/libgcc_s.so.1: __cpu_model: symbol not found</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64208</commentid>
    <comment_count>5</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-07-20 00:52:19 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #2)
&gt; &gt; on x86 (qemux86) I dont see it
&gt; &gt; 
&gt; &gt; kraj02@dvm-wcdcc-khem-002
&gt; &gt; /mnt/oe/openembedded-core/build/tmp-musl/sysroots/qemux86/lib
&gt; &gt;  % readelf -sW libgcc_s.so.1 | grep __cpu
&gt; &gt;    125: 0001d040    16 OBJECT  GLOBAL DEFAULT   22 __cpu_model@GCC_4.8.0
&gt; &gt;    135: 00002210   855 FUNC    GLOBAL DEFAULT   11
&gt; &gt; __cpu_indicator_init@GCC_4.8.0
&gt; 
&gt; readelf -s does not seem to show the problem:
&gt; 
&gt; root@qemux86-64:~# readelf -sW /lib/libgcc_s.so.1 |grep _cpu
&gt;     92: 0000000000002e60   969 FUNC    GLOBAL DEFAULT   12
&gt; __cpu_indicator_init@GCC_4.8.0
&gt;    116: 0000000000215650    16 OBJECT  GLOBAL DEFAULT   24
&gt; __cpu_model@GCC_4.8.0
&gt; root@qemux86-64:~# ldd /lib/libgcc_s.so.1 
&gt; 	ldd (0x55bb59997000)
&gt; 	libc.so =&gt; ldd (0x55bb59997000)
&gt; Error relocating /lib/libgcc_s.so.1: __cpu_indicator_init: symbol not found
&gt; Error relocating /lib/libgcc_s.so.1: __cpu_model: symbol not found


testing a patch here

https://github.com/kraj/openembedded-core/commit/d1f8f1622d9c936019220e9105c9544644d50c52</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64250</commentid>
    <comment_count>6</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2016-07-20 19:44:20 +0000</bug_when>
    <thetext>posted patched to ml</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>64495</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-07-26 16:32:17 +0000</bug_when>
    <thetext>Fixed in oe-core f96da00e78999899ea7037ebc9547a87023e309a.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>