a minor oddity i stumbled over digging into the proper installation
of shared libraries ... building core-image-minimal for qemuarm64 and,
for the most part, recipes from oe-core that install shared libs put
all three artifacts (real name, so name and linker name) under
/usr/lib, as in:

  ./libtirpc/1.3.2-r0/image/usr/lib/libtirpc.so
  ./libtirpc/1.3.2-r0/image/usr/lib/libtirpc.so.3
  ./libtirpc/1.3.2-r0/image/usr/lib/libtirpc.so.3.0.0

however, the *occasional* recipe chooses to -- for whatever reason --
distinguish between libdir and base_libdir. for example, here's the
result of installing tcp-wrappers' shared libs in its ${D} directory:

  ./tcp-wrappers/7.6-r10/image/lib/libwrap.so.0.7.6
  ./tcp-wrappers/7.6-r10/image/lib/libwrap.so.0
  ./tcp-wrappers/7.6-r10/image/usr/lib/libwrap.so

this is due to the following manual override in tcp-wrappers_7.6.bb:

  do_install () {
        oe_libinstall -a libwrap ${D}${libdir}
        oe_libinstall -C shared -so libwrap ${D}${base_libdir}

        if [ "${libdir}" != "${base_libdir}" ] ; then
                rel_lib_prefix=`echo ${libdir} | sed 's,\(^/\|\)[^/][^/]*,..,g'`
                libname=`readlink ${D}${base_libdir}/libwrap.so | xargs 
basename`
                ln -s ${rel_lib_prefix}${base_libdir}/${libname} 
${D}${libdir}/libwrap.so
                rm -f ${D}${base_libdir}/libwrap.so
        fi
        ...

so this recipe -- after doing the *default* shared lib installation
via oe_libinstall() -- conditionally chooses to override that.

  another recipe that is even odder is libcap-ng:

  ./libcap-ng/0.8.2-r0/image/lib/libcap-ng.so.0.0.0
  ./libcap-ng/0.8.2-r0/image/lib/libcap-ng.so.0
  ./libcap-ng/0.8.2-r0/image/usr/lib/libcap-ng.so
  ./libcap-ng/0.8.2-r0/image/usr/lib/libdrop_ambient.so.0
  ./libcap-ng/0.8.2-r0/image/usr/lib/libdrop_ambient.so
  ./libcap-ng/0.8.2-r0/image/usr/lib/libdrop_ambient.so.0.0.0

which seems odd since it does that override for *one* of the shared
libs that it generates, but not the other:

  do_install:append() {
        # Moving libcap-ng to base_libdir
        if [ ! ${D}${libdir} -ef ${D}${base_libdir} ]; then
                mkdir -p ${D}/${base_libdir}/
                mv -f ${D}${libdir}/libcap-ng.so.* ${D}${base_libdir}/
                relpath=${@os.path.relpath("${base_libdir}", "${libdir}")}
                ln -sf ${relpath}/libcap-ng.so.0.0.0 ${D}${libdir}/libcap-ng.so
        fi
  }

given that almost all other recipes seem happy to just stuff all that
under /usr/lib, what is the rationale for the above occasional
difference? it pretty clearly doesn't affect functionality; it just
looks strange.

rday
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#155698): 
https://lists.openembedded.org/g/openembedded-core/message/155698
Mute This Topic: https://lists.openembedded.org/mt/85398874/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to