All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jeremy A. Puhlman" <jpuhlman@mvista.com>
To: yocto@yoctoproject.org
Subject: Re: Packaging an externally built library?
Date: Fri, 23 Oct 2015 15:22:53 -0700	[thread overview]
Message-ID: <562AB33D.9020203@mvista.com> (raw)
In-Reply-To: <167A17EDB344B047B2D335D8E4C5A2FAA4DE5771@EX2010-CO-02.AERO.BALL.com>

[-- Attachment #1: Type: text/plain, Size: 2139 bytes --]

> FILES_${PN} += " ${libdir}/*.so"
>
> If I look through the packaging logs it looks like it attampts to 
> create a bunch of different packages (cdp-fsw, cdp-fsw-dbg, 
> cdp-fsw-dev, cdp-fsw-doc, cdp-fsw-locale) but most of them end up 
> being empty except cdp-fsw-dev.  Then if I look through the RPMs there 
> is no cdp-fsw there is only a cdp-fsw-dev and cdp-fsw-dbg.
>
> Then when do_rootfs is executed it fails because it can’t find a 
> package provider for cdp-fsw.
>
> Why is it automatically creating a <xxxx>-dev package? Can I override 
> this?
>

Because the package list has PN at the end by default:
PACKAGES="${@bb.utils.contains('PTEST_ENABLED', '1', '${PN}-ptest', '', 
d)} ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale 
${PACKAGE_BEFORE_PN} ${PN}"
and
${PN}-dev lists ${libdir}/*.so
"${includedir} ${FILES_SOLIBSDEV} ${libdir}/*.la ${libdir}/*.o 
${libdir}/pkgconfig ${datadir}/pkgconfig ${datadir}/aclocal 
${base_libdir}/*.o ${libdir}/${BPN}/*.la ${base_libdir}/*.la"
As part of its files list.

When the packages-split directory is created, it processes the packages 
list in order extracting the files for each package. When ${PN} is 
processes "*.so" files have already been pulled
in to the ${PN}-dev package.

Normally in linux *.so files are symlinks to the actual versioned 
libraries only used for linking. You can fix the binary libraries to 
conform more correctly. If the library is using soname you will likely 
need to do this
anyways to run applications linked against it. To get the soname you 
would do:
<cross prefix>-objdump -x libz.so.1  | grep SONAME
if it gives you something like:
SONAME               libz.so.1

You would need to install the library with the name returned from 
objdump, then create a .so symlink to that library. The versioned 
library would get picked up in ${PN}.

If it is not using soname and the linked applications are really only 
looking for lib<libname>.so, then you can redefine PACKAGES to include 
just ${PN} or a subset of the normally defined
packages.

-- 
Jeremy A. Puhlman
jpuhlman@mvista.com

[-- Attachment #2: Type: text/html, Size: 3520 bytes --]

      parent reply	other threads:[~2015-10-23 22:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 22:05 Packaging an externally built library? Smith, Daniel W
2015-10-23 22:18 ` Burton, Ross
2015-10-23 22:22 ` Jeremy A. Puhlman [this message]

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=562AB33D.9020203@mvista.com \
    --to=jpuhlman@mvista.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.