[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 20:01:17 UTC 2018


Alex wrote:
> The order of arguments to compiler and linker matters. I remember that
> when converting recipes from autotools to meson, I had to fix the
> order to be exactly same, or some weird, arch-specific issues arose.
> Can you check the precise command line in both working and broken
> case, and what has changed there?
> 
> Alex

I did two builds with a local change to compile using
ninja -v to get the actual compiler/linker lines.

after:  a6b62ef9ae meson: update to 0.46.0 - BAD
before: 26fba81701 webkitgtk: update to 2.20.1 - good

The list of compiler arguments (when building boot-timestamps.c)
is identical aside from an odd path change but the order
changes across the meson 0.46.0 update:

The odd path change is:

before:
    'src/shared/            systemd-shared-237 at sta/acpi-fpdt.c.o'
after:
    'src/shared/src at shared@@systemd-shared-237 at sta/acpi-fpdt.c.o'
This looks odd to me but I'm ignoring it since the files are
clearly found by the build.

The compiler flag order difference is too large for a civilized
email so it's here:
diff -Naur: https://pastebin.com/pWSzDm5W
sdiff -t  : https://pastebin.com/5BX8QvNs


When linking libsystemd-shared-237.so the location of the:
    -Wl,--end-group
option changes:

before:

-lrt
-L/.../qppc-sd/tmp/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr//lib
-lcap
-lacl
-llzma
-lblkid
-Wl,--end-group <-----
-lrt

after:

-lrt
-Wl,--end-group <-----
-L/.../qppc-sd/tmp/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr//lib
-lcap
-lacl
-llzma
-lblkid
-lrt


and some _apparently_ redundant libraries and lib paths were dropped:

both:
-L/.../qppc-sd/tmp/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr//lib
-lcap
-lblkid
-lrt

only before:
-L/.../qppc-sd/tmp/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr//lib
-lcap
-lblkid


On 06/19/2018 12:00 PM, Khem Raj wrote:
> 
> 
> On 6/19/18 2:59 AM, Burton, Ross wrote:
>> On 19 June 2018 at 06:03, Randy MacLeod <randy.macleod at windriver.com> 
>> wrote:
>>> 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
> 
> This would also indicate that libsystemd is probably missing -fPIC 
> during compile, can you check the compiler cmdline passed when building 
> on of .o files that gets includes in libsystemd.

fPIC is used in both cases:

$ grep fPIC temp-good/log.do_compile.boot-timestamp \
             temp-bad/log.do_compile.boot-timestamp
temp-good/log.do_compile.boot-timestamp:-fPIC
temp-bad/log.do_compile.boot-timestamp:-fPIC


I don't have any more time for this today so I'm sending this
update. My next step is to examine the libsystemd-shared-237.so
file itself using readelf and/or objdump to see why the file size
increased ... unless someone has a better idea.

../Randy

> 
>>>
>>> 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.
>>
>> Khem suggests that this is due to the new gcc and PIE on PPC being
>> bust, but even after passing no-pie this is still happening for me.
>>
>> Ross
>>


-- 
# Randy MacLeod
# Wind River Linux



More information about the Openembedded-core mailing list