From: Max Krummenacher <max.oss.09@gmail.com>
To: Gary Thomas <gary@mlbassoc.com>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Shared library question
Date: Mon, 27 Feb 2017 21:11:21 +0100 [thread overview]
Message-ID: <1488226281.2083.7.camel@gmail.com> (raw)
In-Reply-To: <10426572-3dbf-9403-f73b-ecbcb3a02157@mlbassoc.com>
Hi
Am Montag, den 27.02.2017, 15:03 +0100 schrieb Gary Thomas:
> 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@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@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...
When linking a shared object file you have to pass the linker a soname which adds compatible version
information into the share object file.
Have a look here:
http://git.yoctoproject.org/cgit/cgit.cgi/meta-fsl-arm/commit/recipes-bsp?id=7ff327a4e3e8e19d1e3f848
865b6b27ba9f6250b
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html
Alternatively you can drop the libprussdrv.so.1 and libprussdrv.so.1.0, and force with FILES... the
libprussdrv.so into the not -dev package.
Probably you would also want to INSANE_SKIP_${PN} = "dev-so".
Max
>
> 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
> ------------------------------------------------------------
next prev parent reply other threads:[~2017-02-27 20:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-27 14:03 Shared library question Gary Thomas
2017-02-27 20:11 ` Max Krummenacher [this message]
2017-02-28 5:13 ` Gary Thomas
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=1488226281.2083.7.camel@gmail.com \
--to=max.oss.09@gmail.com \
--cc=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.