Yocto not packaging symlink to shared object

I’m trying to install libft4222 on my target image. libft4222 is a dependency for another recipe I’m using to add an application to the target image.

I’ve taken the example from the yocto manual for versioned libraries and adjusted it accordingly to download the relevant sources:

SUMMARY = "FTDI FT4222H Library"
SECTION = "libs"
LICENSE_FLAGS = "ftdi"
LICENSE = "CLOSED"

# Sources available in a .tgz file in .zip archive
# at https://ftdichip.com/wp-content/uploads/2021/01/libft4222-linux-1.4.4.44.zip
# Found on https://ftdichip.com/software-examples/ft4222h-software-examples/

SRC_URI = "https://www.ftdichip.com/Support/SoftwareExamples/libft4222-linux-${PV}.tgz"
SRC_URI[sha256sum] = "b92ca18e4d8d6aafed31b5f74d0822fae071de7ac6b88e5fe9427e14e1dc9b11"

S = "${WORKDIR}"

ARCH_DIR:x86-64 = "build-x86_64"
ARCH_DIR:i586 = "build-i386"
ARCH_DIR:i686 = "build-i386"
ARCH_DIR:raspberrypi4 = "build-arm-v7-hf"

do_install () {
        install -m 0755 -d ${D}${libdir}
        oe_soinstall ${S}/${ARCH_DIR}/libft4222.so.${PV} ${D}${libdir}
        install -d ${D}${includedir}
        install -m 0755 ${S}/*.h ${D}${includedir}
}

SOLIBS = "${libdir}/libft4222.so.${PV}"
FILES:${PN} += "${libdir}/*.so ${libdir}/*.so.${PV}"

In my application recipe I added libft4222 as DEPENDS as well as RDEPENDS dependency. My application builds properly and is added to the image rootfs, but libft4222 only installs the versioned .so file libft4222.so.${PV} and omits the symlink libft4222.so.

I need to have the symlink deployed as well, I tried by manually installing the library and symlink instead of oe_soinstall as well:

install -m 0755 ${S}/${ARCH_DIR}/libft4222.so.${PV} ${D}${libdir}
ln -r -s ${D}${libdir}/libft4222.so.${PV} ${D}${libdir}/libft4222.so

But this leads to the same behaviour.

In my local.conf file I added both recipes to the build:

IMAGE_INSTALL:append = " libft4222 application-recipe"

In the working directory I see both files being generated under libft4222/${PV}/image/usr/lib/ but only the versioned file is added to rootfs. What am I missing here?

I’m using yocto Kirkstone and libft4222 verion 1.4.4.44

Leave a Comment