On Thu, Nov 30, 2023 at 10:45 AM Johannes Pointner <h4nn35.w...@gmail.com> wrote: > > On Fri, Nov 24, 2023 at 6:03 PM Khem Raj <raj.k...@gmail.com> wrote: > > > > > > > > On Fri, Nov 24, 2023 at 2:34 AM Johannes Pointner <h4nn35.w...@gmail.com> > > wrote: > >> > >> Hello, > >> > >> I did recently my first Nanbield build which required the distro > >> feature usrmerge because of using systemd and as a result QtWebEngine > >> didn't work anymore. > >> I reported this to Qt(https://bugreports.qt.io/browse/QTBUG-119140), > >> but looking deeper into this it turned out to be an issue related to > >> the generated ld.so.cache in the rootfs.py. > >> At the moment in the ldconfig-native which is used to generate this, > >> are the paths to LIBDIR("/usr/lib") and SLIBDIR("/lib") hardcoded, but > >> that isn't correct if usrmerge is enabled, at least I think so. > >> The resulting ld.so.cache looks like this: > >> 236 libs found in cache `/etc/ld.so.cache' > >> libzstd.so.1 (libc6) => /lib/libzstd.so.1 > >> libz.so.1 (libc6) => /lib/libz.so.1 > >> libxtables.so.12 (libc6) => /lib/libxtables.so.12 > >> libxslt.so.1 (libc6) => /lib/libxslt.so.1 > >> libxml2.so.2 (libc6) => /lib/libxml2.so.2 > >> ... > >> > >> Would it be OK to configure the paths LIBDIR SLIBDIR using base_libdir > >> and libdir? > > > > > > I think it should check for usrmerge feature and generate the correct > > values during build > This is already done in bitbake.conf: > root_prefix = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', > '${exec_prefix}', '${base_prefix}', d)}" > Do you really think we should check again in ldconfig-native for > usrmerge, can't we just do something like that: > Add in ldconfig.c: > +#ifndef LIBDIR > #define LIBDIR "/usr/lib" > +#endif > +#ifndef SLIBDIR > #define SLIBDIR "/lib" > +#endif > and build it like this: > do_compile () { > $CC ldconfig.c -std=gnu99 -DLIBDIR=\"${nonarch_libdir}\" > -DSLIBDIR=\"${nonarch_base_libdir}\" chroot_canon.c xmalloc.c > xstrdup.c cache.c readlib.c -I. dl-cache.c -o ldconfig > } OK, after testing this I have seen that the paths are adjusted by the native class so this won't work. But another approach using something like this LDCONFIG_SLIBIDR=${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/usr/lib', '/lib', d)} $CC ldconfig.c -std=gnu99 -DSLIBDIR=\"${LDCONFIG_SLIBIDR}\" chroot_canon.c xmalloc.c xstrdup.c cache.c readlib.c -I. dl-cache.c -o ldconfig doesn't work either because usrmerge isn't in the DISTRO_FEATURES in case of native, at least it seems so. DISTRO_FEATURES_NATIVE:append = " usrmerge" fixes this but I have no idea if this is the right approach. > > > >> > >> > >> Thanks, > >> Hannes
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#191505): https://lists.openembedded.org/g/openembedded-core/message/191505 Mute This Topic: https://lists.openembedded.org/mt/102778802/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-