[oe] [meta-oe][PATCH v2] libeigen: allow empty packages

Martin Jansa martin.jansa at gmail.com
Thu Oct 4 08:33:49 UTC 2018


> If there's another way to solve this, I'm all ears. BTW, ceres-solver
recipe itself has ALLOW_EMPTY_${PN} = "1" already. I believe the reason is
the same as here.

Use bitbake -g my-image-dev to find out what package is depending on
libeigen package and fix it there. Are you sure it's (only) from
ceres-solver? Isn't libeigen listed in my-image-dev as well?

Adding ALLOW_EMPTY here is just hiding the issue somewhere else. It makes
sense when the package might be empty based on some configuration (e.g.
PACKAGECONFIGs), but in general ALLOW_EMPTY is bad idea. It also allows end
user to do "opkg install libeigen" and assuming he got something useful
when it installs something, which isn't true he just wasted few bytes of
storage for completely empty package.

And when you're there you can remove ALLOW_EMPTY from ceres-solver as well
:).

Cheers,

On Thu, Oct 4, 2018 at 9:04 AM Vyacheslav Yurkov <uvv.mail at gmail.com> wrote:

> Hi Martin,
> Thanks for your comment. I did see discussion in the mailing list that
> RDEPENDS_${PN}-dev is supposed to solve it, but it doesn't. To be fare, I
> tried it again now:
> - bitbake libeigen -c cleanall
> - bitbake ceres-solver -c cleanall
> - reverted my ALLOW_EMPTY_${PN} = "1" change
> - bitbake my-image
>
> After last step I got:
> ERROR: my-image-dev-1.0-r0 do_rootfs: libeigen not found in the feeds (x86
> corei7-64 core2-64 x86_64 noarch any all) in
> /home/uvv/projects/yocto-x86/build/tmp/deploy/rpm.
> ERROR: my-image-dev-1.0-r0 do_rootfs: This is often caused by an empty
> package declared in a recipe's PACKAGES variable. (Empty packages are not
> constructed unless ALLOW_EMPTY_<pkg> = '1' is used.)
> ERROR: my-image-dev-1.0-r0 do_rootfs: Function failed: do_rootfs
>
> If there's another way to solve this, I'm all ears. BTW, ceres-solver
> recipe itself has ALLOW_EMPTY_${PN} = "1" already. I believe the reason is
> the same as here.
>
> Regards,
> Vyacheslav
>
> On Wed, Oct 3, 2018 at 8:35 AM Martin Jansa <martin.jansa at gmail.com>
> wrote:
>
>> On Wed, Oct 03, 2018 at 08:24:22AM +0200, Vyacheslav Yurkov wrote:
>> > libeigen is header-only library.
>> > All headers go into dev package, therefore the main package is empty.
>> > Dependency on the dev package doesn't work, so you have to allow
>> > empty package for build to succeed for recipes that depend on libeigen
>> > (e.g. ceres-solver). Otherwise an error occurs that empty packages
>> > are not allowed.
>>
>> I still don't understand what the issue is, there is already
>> RDEPENDS_${PN}-dev = "" and similar for ${PN}-dbg.
>>
>> Creating empty libeigen package to satisfy dependency from ceres-solver
>> doesn't really fix anything (just installs useless empty package on
>> target).
>>
>> > Signed-off-by: Vyacheslav Yurkov <uvv.mail at gmail.com>
>> > ---
>> >  meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
>> b/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
>> > index 31a42a9d6..a59320655 100644
>> > --- a/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
>> > +++ b/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
>> > @@ -18,3 +18,4 @@ FILES_${PN}-dev = "${includedir}
>> ${datadir}/eigen3/cmake ${datadir}/cmake/Module
>> >  # ${PN} is empty so we need to tweak -dev and -dbg package dependencies
>> >  RDEPENDS_${PN}-dev = ""
>> >  RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})"
>> > +ALLOW_EMPTY_${PN} = "1"
>> > --
>> > 2.17.0
>> >
>> > --
>> > _______________________________________________
>> > Openembedded-devel mailing list
>> > Openembedded-devel at lists.openembedded.org
>> > http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>>
>> --
>> Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
>>
>
>



More information about the Openembedded-devel mailing list