On Tue, Jun 19, 2018 at 4:13 PM Burton, Ross <ross.bur...@intel.com> wrote: > > Okay, odd. Hacked in a few compile fixes and now systemd v237 fails > to build with Meson git master: > > | FAILED: libsystemd.so.0.21.0 > | 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 > -o libsystemd.so.0.21.0 -Wl,--no-undefined -Wl,--as-needed -shared > -fPIC -Wl,--start-group -Wl,-soname,libsystemd.so.0 > -Wl,--whole-archive src/libsystemd/libsystemd.a > src/journal/libjournal-client.a -Wl,--no-whole-archive -Wl,-z,relro > -Wl,-z,now -pie -Wl,--gc-sections src/basic/libbasic.a > src/basic/libbasic-gcrypt.a -pthread -shared > -Wl,--version-script=/data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/git/src/libsystemd/libsystemd.sym > -lrt -Wl,--end-group > /data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr/lib/liblzma.so > /data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/lib/libcap.so > /data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr/lib/libblkid.so > -lrt -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 > -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong > -Wl,-z,relro,-z,now > | > /data/poky-tmp/master/work/ppc7400-poky-linux/systemd/1_237-r0/recipe-sysroot/usr/lib/../lib/crt1.o:(.rodata+0x4): > undefined reference to `main' > > I'm guessing the compile option re-ordering is going wrong with our > compiler flags? >
When building a .so we need to remove pie flags regardless for linker and compiler and replace with -fPIC like libtool does pie flags are only relevant when building executable. Can we try with v238 and see if that helps ? > Ross > > On 20 June 2018 at 00:02, Burton, Ross <ross.bur...@intel.com> wrote: > > On 19 June 2018 at 21:24, Nirbheek Chauhan <nirbheek.chau...@gmail.com> > > wrote: > >> On Wed, Jun 20, 2018 at 1:39 AM Alexander Kanavin > >> <alex.kana...@gmail.com> wrote: > >>> FWIW, I did fix a similar (or maybe even same) issue with this patch: > >>> http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-devtools/meson/meson/0001-Linker-rules-move-cross_args-in-front-of-output_args.patch > >>> > >>> It's possible that more rearranging needs to be done, or this patch no > >>> longer has the desired effect. > >>> > >> > >> So far in this thread, I don't see any changes that would cause this > >> issue, and that patch shouldn't change things either. The bisection is > >> probably significant, but I am not sure what's going. > >> > >> Also, in general please try to talk to us first before doing a change > >> like that (switching the order of cross_args) so we can investigate > >> and figure out what we should fix. The cross_args are at the end so > >> they can override existing arguments, such as -D flags or -W flags. > >> > >> Another thing to try would be current git, which has significant > >> changes in how we do library resolution, de-duplication, and so on. > >> Specifically, instead of `-lfoo`, we now prefer full paths to the > >> library to use instead since this allows greater flexibility in > >> selecting whether to use shared or static libraries. > > > > So I just generated a snapshot of current git and am building systemd > > with it. Interestingly, the flag order change is resulting in what > > were warnings now being fatal and systemd fails to build. One was > > easily fixed with a patch from master, the other will have to wait > > until tomorrow morning, but I will get back to this. > > > > Ross > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core