[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:06:00 UTC 2018


On 06/19/2018 03:49 PM, Burton, Ross wrote:
> On 19 June 2018 at 17:00, Khem Raj <raj.khem at gmail.com> wrote:
>>>> 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.
> 
> [1/1423] powerpc-poky-linux-gcc -m32 -mhard-float -mcpu=7400 -mno-spe
> -fstack-protector-strong -D_FORTIFY_SOURCE=2 -no-pie -fno-PIE
> --sysroot=/data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot
> -Isrc/libsystemd/src at libsystemd@@systemd at sta -Isrc/libsystemd
> -I../git/src/libsystemd -Isrc/basic -I../git/src/basic -Isrc/shared
> -I../git/src/shared -Isrc/systemd -I../git/src/systemd -Isrc/journal
> -I../git/src/journal -Isrc/resolve -I../git/src/resolve -Isrc/timesync
> -I../git/src/timesync -Isrc/login -I../git/src/login -Isrc/udev
> -I../git/src/udev -Isrc/libudev -I../git/src/libudev -Isrc/core
> -I../git/src/core -I../git/src/libsystemd/sd-bus
> -I../git/src/libsystemd/sd-device -I../git/src/libsystemd/sd-hwdb
> -I../git/src/libsystemd/sd-id128 -I../git/src/libsystemd/sd-netlink
> -I../git/src/libsystemd/sd-network -Isrc/libsystemd-network
> -I../git/src/libsystemd-network -I. -I../git/
> -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99
> -Wextra -Werror=undef -Wlogical-op -Wmissing-include-dirs
> -Wold-style-definition -Wpointer-arith -Winit-self
> -Wdeclaration-after-statement -Wfloat-equal
> -Wsuggest-attribute=noreturn -Werror=missing-prototypes
> -Werror=implicit-function-declaration -Werror=missing-declarations
> -Werror=return-type -Werror=incompatible-pointer-types
> -Werror=format=2 -Wstrict-prototypes -Wredundant-decls
> -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels
> -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Wdate-time
> -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option
> -fno-strict-aliasing -fvisibility=hidden -fstack-protector
> -fstack-protector-strong --param=ssp-buffer-size=4 -fPIE
> -Wno-unused-parameter -Wno-missing-field-initializers
> -Wno-unused-result -Wno-format-signedness -Wno-error=nonnull
> -Werror=shadow -ffunction-sections -fdata-sections -include config.h

> -fPIC
Hey Ross ^^^

> -pthread -fvisibility=default -m32 -mhard-float -mcpu=7400
> -mno-spe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -no-pie -fno-PIE
> --sysroot=/data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot
> -O2 -pipe -g -feliminate-unused-debug-types
> -fdebug-prefix-map=/data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0=/usr/src/debug/systemd/1_237-r0
> -fdebug-prefix-map=/data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot=
> -fdebug-prefix-map=/data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot-native=
> -MD -MQ 'src/libsystemd/src at libsystemd@@systemd at sta/sd-utf8_sd-utf8.c.o'
> -MF 'src/libsystemd/src at libsystemd@@systemd at sta/sd-utf8_sd-utf8.c.o.d'
> -o 'src/libsystemd/src at libsystemd@@systemd at sta/sd-utf8_sd-utf8.c.o' -c
> ../git/src/libsystemd/sd-utf8/sd-utf8.c
> 
> You're right, no -fPIC.  

fPIC is there, look again!
I just send my reply as your email arrived.

> The no-PIE flags are coming from
> SECURITY_NOPIE_CFLAGS.  I'm guessing security_flags is interacting
> badly with ppc again?

Right and I could just add:
    SECURITY_CFLAGS_pn-systemd_powerpc = "${SECURITY_NO_PIE_CFLAGS}"
in meta/conf/distro/include/security_flags.inc but
I wanted to be sure that I understood why such a change is needed.
The meson update shouldn't break things...

../Randy

> 
> Ross
> 


-- 
# Randy MacLeod
# Wind River Linux



More information about the Openembedded-core mailing list