Skip to contentSkip to conversation

Shared library questions

DISCUSSION Gary Thomas 1 participant 1 message Nov 4, 2014

lore
Share & tools
lore
#0 lore raw

Sorry if this is a bit off topic, but I'm having issues with how [some of my] shared libraries are being packaged and used.

I have a library recipe which uses this line to pack up it's shared libraries:

    oe_libinstall -C lib -so libflx_fes ${D}${libdir}

This yields this in it's install image:

    $ ls -l tmp/work/ppc603e-amltd-linux/flx-fes-lib/1.2.1-r0/image/usr/lib
    total 20
    lrwxrwxrwx 1 gthomas gthomas    19 Nov  3 12:53 libflx_fes.so -> libflx_fes.so.1.2.1
    lrwxrwxrwx 1 gthomas gthomas    19 Nov  3 12:53 libflx_fes.so.1 -> libflx_fes.so.1.2.1
    -rwxr-xr-x 3 gthomas gthomas 17238 Nov  3 12:53 libflx_fes.so.1.2.1

This all looks good to me. This is then packaged as:

    tmp/work/ppc603e-amltd-linux/flx-fes-lib/1.2.1-r0/packages-split/flx-fes-lib-dev/usr/lib:
    total 0
    lrwxrwxrwx 1 gthomas gthomas 19 Nov  3 13:00 libflx_fes.so -> libflx_fes.so.1.2.1

    tmp/work/ppc603e-amltd-linux/flx-fes-lib/1.2.1-r0/packages-split/flx-fes-lib/usr/lib:
    total 12
    lrwxrwxrwx 1 gthomas gthomas   19 Nov  3 13:00 libflx_fes.so.1 -> libflx_fes.so.1.2.1
    -rwxr-xr-x 2 gthomas gthomas 8296 Nov  3 13:00 libflx_fes.so.1.2.1

So the libflx_fes.so ends up in the -dev package and the rest in the -lib package.

I then have another package that depends on flx-fes-lib. It uses the library via this link line:

    powerpc-amltd-linux-gcc  -m32 -mhard-float -mcpu=603e \
      --sysroot=/home/local/efacec-latest_2014-10-15/map8001-ppc8379-v2/tmp/sysroots/map8001-ppc8379-revF \
      -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -L../lib/ \
      -o ../bin/flx_redundancy_supervision redundancy_supervision.o redundancy_supervision_ctrl.o
      -lpacket_lib -lsupervision_lib -lflx_fes -lrt

The weird thing is that this ends up with the program depending on the libflx_fes.so, not the versioned library libflx_fes.so.1

    # ldd /usr/sbin/flx_redundancy_daemon
        linux-vdso32.so.1 (0x00100000)
        libpacket_lib.so.0 => /usr/lib/libpacket_lib.so.0 (0x0ffdd000)
        libsupervision_lib.so.0 => /usr/lib/libsupervision_lib.so.0 (0x0ffb8000)
        libflx_fes.so => not found
        librt.so.1 => /lib/librt.so.1 (0x0ff90000)
        libc.so.6 => /lib/libc.so.6 (0x0fe18000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0fdde000)
        /lib/ld.so.1 (0x48000000)

I also get a warning from bitbake:
WARNING: QA Issue: flx-redundancy-supervision requires libflx_fes.so, but no providers in its RDEPENDS [file-rdeps]

Can someone explain why this is happening and how I fix it?

Sadly, I can't share these recipes or the code (they are available to me only under NDA). If needed, I could try to replicate the issue with something I can share.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------