[yocto] Shared library question

Gary Thomas gary at mlbassoc.com
Mon Feb 27 06:03:14 PST 2017


I trying to create a package am335x-pru-support which creates a
shared library used by another package pru-examples.  The library
files installed with am335x-pru-support are (from <BUILD>/image)
-rwxr-xr-x 4 gthomas gthomas 17074 Feb 27 13:40 usr/lib/libprussdrv.a
lrwxrwxrwx 1 gthomas gthomas    16 Feb 27 13:40 usr/lib/libprussdrv.so -> libprussdrv.so.1
lrwxrwxrwx 1 gthomas gthomas    18 Feb 27 13:40 usr/lib/libprussdrv.so.1 -> libprussdrv.so.1.0
-rwxr-xr-x 1 gthomas gthomas 22092 Feb 27 13:40 usr/lib/libprussdrv.so.1.0
-rw-r--r-- 4 gthomas gthomas 8074 Feb 27 13:40 usr/include/pruss/prussdrv.h
-rw-r--r-- 4 gthomas gthomas 4286 Feb 27 13:40 usr/include/pruss/pruss_intc_mapping.h

These files are split by the packager as:
gthomas at europa:packages-split$ find am335x-pru-support | sort
am335x-pru-support
am335x-pru-support/usr
am335x-pru-support/usr/lib
am335x-pru-support/usr/lib/libprussdrv.so.1
am335x-pru-support/usr/lib/libprussdrv.so.1.0
gthomas at europa:packages-split$ find am335x-pru-support-dev | sort
am335x-pru-support-dev
am335x-pru-support-dev/usr
am335x-pru-support-dev/usr/include
am335x-pru-support-dev/usr/include/pruss
am335x-pru-support-dev/usr/include/pruss/prussdrv.h
am335x-pru-support-dev/usr/include/pruss/pruss_intc_mapping.h
am335x-pru-support-dev/usr/lib
am335x-pru-support-dev/usr/lib/libprussdrv.so

These files get staged correctly to pru-examples recipe-specific-sysroot
and I can build and link against them, using DEPENDS="am335x-pru-support".
The problem is that when my build (target recipe) uses
   $(CC) my_target_program.c $(LDFLAGS) -lprussdrv
it gets satisfied by /usr/lib/libprussdrv.so and not /usr/lib/libprussdrv.so.1
This in turn appears to keep the pru-examples package from having
a runtime dependency against the am335x-pru-support package and the
necessary library file does not end up on my target.

I've tried to work through this, following many recipes as examples,
e.g. meta/recipes-multimedia/libogg (pattern for am335x-pru-support)
and meta/recipes-multimedia/flac (pattern for pru-examples).  The
libogg/flac combo works correctly, mine does not :-(

Any pointers on what I might be doing wrong?  I'm so close to getting
this stuff going, it's just the packaging that's going to claim the
last hairs from my head...

Thanks

n.b. I'm happy to share any of the recipes, I just left them out for brevity.

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



More information about the yocto mailing list