All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Yocto Project <yocto@yoctoproject.org>
Subject: Shared library questions
Date: Tue, 04 Nov 2014 06:08:48 -0700	[thread overview]
Message-ID: <5458CFE0.8080803@mlbassoc.com> (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.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


                 reply	other threads:[~2014-11-04 13:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5458CFE0.8080803@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.