<?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>12811</bug_id>
          
          <creation_ts>2018-06-22 17:11:23 +0000</creation_ts>
          <short_desc>meson: update to 0.46.0 breaks systemd on qemuppc</short_desc>
          <delta_ts>2018-09-21 02:40:49 +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.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>ppc</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.6 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy MacLeod">randy.macleod</reporter>
          <assigned_to name="Randy MacLeod">randy.macleod</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</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>80907</commentid>
    <comment_count>0</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-06-22 17:11:23 +0000</bug_when>
    <thetext>The meson update to 0.46.0 broke systemd on qemuppc for poky-lsb.
The libsystemd-shared.so size increased by 18% despite
the build flags being the same but using a different order.

You can work-around the problem by setting:
   SECURITY_CFLAGS_pn-systemd_powerpc = &quot;${SECURITY_NO_PIE_CFLAGS}&quot;
in:
   meta/conf/distro/include/security_flags.inc


I recently started testing qemuppc by booting
core-image-minimal with systemd as init. It fails with:

    /sbin/init: error while loading shared libraries:
       /lib/systemd/libsystemd-shared-237.so: R_PPC_REL24 relocation at 
0x0054574c for symbol `strlen&apos; out of range

or in some cases:

   systemd[1]: \
      unhandled signal 11 at b804b784 nip 0070d184 lr 008ee1ac code 1
   Kernel panic - not syncing: \
      Attempted to kill init! exitcode=0x0000000b
when running:
     runqemu slirp nographic qemuppc ext4

The error only appears when using the distro poky-lsb
or a security template in the WR builds.

Adding:
meta/conf/distro/include/security_flags.inc
+SECURITY_CFLAGS_pn-systemd_powerpc = &quot;${SECURITY_NO_PIE_CFLAGS}&quot;

the systemd configure flags changed from:
        -no-pie -fno-PIE
to:
        -Wformat -Wformat-security -Werror=format-security
and the problem went away.

Being a sucker for punishment and having a nice builder on hand,
I decided to bisect the error anyway, assuming that I&apos;d end up
at a systemd or toolchain uprev. Instead, I ended up at this
meson update being the culprit.


Here are the poky commits with the final stages of a
git bisect status appended:

53dfa673d7 musl: Upgrade to latest - bad
...
several bad results
...
96d783fa39 ifupdown: correct the repository location - bad
a6b62ef9ae meson: update to 0.46.0 - BAD
26fba81701 webkitgtk: update to 2.20.1 - good
4c52e22689 procps: update to 3.3.14 - untested
23320a2c9a libwebp: update to 1.0.0 - good
...
some good or unbuildable results
...

More info on the email thread:
http://lists.openembedded.org/pipermail/openembedded-core/2018-June/thread.html#152120</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81232</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-08-02 20:34:02 +0000</bug_when>
    <thetext>I&apos;ve heard that Ross is working on updating meson to 0.47.1.
I can test as needed once there is a commit on the email list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81599</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-09-21 02:40:49 +0000</bug_when>
    <thetext>Resolved in master by:

commit 1520f5a345fd03d46f33f0efaf76191e96344bec
Author: Khem Raj &lt;raj.khem@gmail.com&gt;
Date:   Sun Aug 19 10:23:34 2018 -0700

    powerpc: Remove pie flags from compiler cmdline
    
    Original approach to add -no-&lt;pie&gt; flags cause link time behavior changes
    where packages start to lose the -fPIC -DPIC in compiler cmdline and this
    list keeps growing as we build more and more packages,
    
    Instead lets just remove the options we dont need from SECURITY_CFLAGS
    this makes it more robust and less intrusive
    
    This also means we do not need to re-add pic options as we started to do
    for affected packages
    
    Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;

 meta/conf/distro/include/security_flags.inc | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>