[OE-core] [PATCH 12/14] meson: update to 0.46.0 -- broke systemd on qemuppc

Randy MacLeod randy.macleod at windriver.com
Tue Jun 19 05:03:44 UTC 2018


On 05/04/2018 08:32 AM, Alexander Kanavin wrote:
> Rebase a couple of patches


It seems that this meson update broke systemd on qemuppc.
I'll look into it a more tomorrow but below is what I know so far.
It looks like the libsystemd-shared.so size increased by 18% despite
the build flags being the same!

Despite my IRC handle, I'm a meson newbie so any tips will
be appreciated. I'll work on getting meson/ninja to be more
verbose tomorrow to track down what really changed.


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' 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 = "${SECURITY_NO_PIE_CFLAGS}"

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'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
...


Looking at:
$ buildhistory-diff 10cdd2f bbbbd64
Changes to images/qemuppc/glibc/core-image-minimal (files-in-image.txt):
   /etc/udev/hwdb.bin was removed
   /etc/rpm-postinsts/100-udev-hwdb was added
   /etc/rpm-postinsts was added
images/qemuppc/glibc/core-image-minimal:
   IMAGESIZE changed from 48828 to 43144 (-12%)
packages/ppc7400-poky-linux/systemd/libnss-myhostname:
   PKGSIZE changed from 198364 to 132584 (-33%)
packages/ppc7400-poky-linux/systemd/libnss-mymachines:
   PKGSIZE changed from 461724 to 394872 (-14%)
packages/ppc7400-poky-linux/systemd/libudev:
   PKGSIZE changed from 264200 to 198180 (-25%)
packages/ppc7400-poky-linux/systemd/systemd-analyze:
   PKGSIZE changed from 1445140 to 1902168 (+32%)
packages/ppc7400-poky-linux/systemd/systemd-container:
   PKGSIZE changed from 528737 to 725017 (+37%)
packages/ppc7400-poky-linux/systemd/systemd:
   PKGSIZE changed from 9540698 to 11236850 (+18%)

The systemd package sizes have change quite a bit
and the main pkg increased by 18% likely putting the
shared library over a PPC relative jump limit of 8MB iirc.

The configure files changed but only due to a typo fix
and a warning about a feature that will become an error in
the next release. None of the flags that get tested and used changed!
The PIE/pie flags [1] don't change.

The meson compile logs don't help immediately because they
hide the 'Compiling/Linking' flags but massaging the logs,
shows that all the same files are compiled and linked.

Any suggestions?

More tomorrow...

-- 
# Randy MacLeod
# Wind River Linux


[1]

$ grep -i pie /tmp/log.do_configure.93182  /tmp/log.do_configure.57702
/tmp/log.do_configure.93182:Cross C compiler: \
   powerpc-poky-linux-gcc -m32 -mhard-float -mcpu=7400 -mno-spe \
     -fstack-protector-strong -D_FORTIFY_SOURCE=2 \
     -no-pie -fno-PIE \
 
--sysroot=/.../tmp/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot 
(gcc 7.3.0)
/tmp/log.do_configure.93182:Compiler for C supports argument -fPIE: YES
/tmp/log.do_configure.93182:Message: Linking with -pie supported: yes

/tmp/log.do_configure.57702:Cross C compiler: \
   powerpc-poky-linux-gcc -m32 -mhard-float -mcpu=7400 -mno-spe \
     -fstack-protector-strong -D_FORTIFY_SOURCE=2 \
     -no-pie -fno-PIE \
 
--sysroot=/.../tmp/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot 
(gcc 7.3.0)
/tmp/log.do_configure.57702:Compiler for C supports arguments -fPIE: YES
/tmp/log.do_configure.57702:Message: Linking with -pie supported: yes




More information about the Openembedded-core mailing list