[OpenWrt-Devel] GCC 7.4.0 ld LTO plugin issues with SDK

Daniel F. Dickinson cshored at thecshore.com
Mon Jan 7 05:42:41 EST 2019


On 2019-01-03 2:21 a.m., Daniel F. Dickinson wrote:
> On 2019-01-02 8:58 p.m., Daniel F. Dickinson wrote:
>> On 2019-01-02 3:06 p.m., Daniel F. Dickinson wrote:
>>> Hi,
>>>
>>> With the SDK I'm getting errors with LTO -- at least for json-c LD is
>>> trying to load the *target's* LTO plugin instead of host.
>>>
>>> 7.4.0_musl_eabi/bin/../libexec/gcc/arm-openwrt-linux-muslgnueabi/7.4.0/liblto_plugin.so:
>>> error loading plugin:
>>> /home/daniel/Build/openwrt-sdk/cshoredwrt-sdk-19.01-1-brcm2708-bcm2708_gcc-7.4.0_musl_eabi.Linux-x86_64/staging_dir/toolchain-arm_arm1176jzf-s+vfp_gcc-7.4.0_musl_eabi/bin/../libexec/gcc/arm-openwrt-linux-muslgnueabi/7.4.0/liblto_plugin.so:
>>> invalid ELF header
>> So it turns out that for the SDK that it turns libraries into
>> library.bin and the original *.so* becomes a bash script.  Apparently
>> GCC doesn't like that, at least for it's own plugins.
> Ok, building the SDK on Debian 9 solves the issue.  The SDK built on
> Ubuntu 18.10 has the issue even if used on Debian 9, so it's the
> building of the SDK where the issue, whatever it is, occurs.  As I have
> a handy Debian VM I'm not going to worry too much about it at the
> moment, unless there is a patch someone needs me to test.
So this may be a path too long issue ... I've run into other problems
with the sdk using default path, and not in the base of my home
directory (i.e. long path) that 'go away' when I shorten the path.  It
looks like somewhere in the toolchain there is some limit being
exceeded.  Unfortunately I have not identified where, only noticed it
because of the following build failure with glib2:

|c-7.4.0_musl_eabi.Linux-x86_64/build_dir/hostpkg/glib-2.58.2/gobject'
Making all in gio make[6]: Entering directory
'/home/daniel/Build/openwrt-sdk/cshoredwrt-sdk-19.01-1-brcm2708-bcm2708_gcc-7.4.0_musl_eabi.Linux-x86_64/build_dir/hostpkg/glib-2.58.2/gio'
GEN xdp-dbus.c GEN xdp-dbus.h cp gnextstepsettingsbackend.m
gnextstepsettingsbackend.c cp gosxcontenttype.m gosxcontenttype.c cp
gosxappinfo.m gosxappinfo.c cp gcocoanotificationbackend.m
gcocoanotificationbackend.c GEN gconstructor_as_data.h GEN
gioenumtypes.h /usr/bin/env:
'/home/daniel/Build/openwrt-sdk/cshoredwrt-sdk-19.01-1-brcm2708-bcm2708_gcc-7.4.0_musl_eabi.Linux-x86_64/staging_':
No such file or directory Makefile:5039: recipe for target
'gioenumtypes.h' failed make[6]: *** [gioenumtypes.h] Error 127 make[6]:
Leaving directory
'/home/daniel/Build/openwrt-sdk/cshoredwrt-sdk-19.01-1-brcm2708-bcm2708_gcc-7.4.0_musl_eabi.Linux-x86_64/build_dir/hostpkg/glib-2.58.2/gio'
Makefile:1254: recipe for target 'all-recursive' failed make[5]: ***
[all-recursive] Error 1 make[5]: Leaving directory
'/home/daniel/Build/openwrt-sdk/cshoredwrt-sdk-19.01-1-brcm2708-bcm2708_gcc-7.4.0_musl_eabi.Linux-x86_64/build_dir/hostpkg/glib-2.58.2'
Makefile:881: recipe for target 'all' failed make[4]: *** [all] Error 2|


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list