libeigen: allow empty packages
PATCH v2 1/1 libeigen: allow empty packages
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.
--- meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +1 -0
@@ -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"
Signature · 1 line
2.17.0
Quoted 6 lines · Vyacheslav Yurkov
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).
Quoted 22 lines
Signed-off-by Vyacheslav Yurkov <[email protected]>--- meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb | 1 + 1 file changed, 1 insertion(+)meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +1
-0@@ -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"Signature · 7 lines
2.17.0 -- _______________________________________________ Openembedded-devel mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
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
Quoted 43 lines · Martin Jansa
Quoted 6 lines · Vyacheslav Yurkov
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).
Review
Quoted 6 lines
Signed-off-by Vyacheslav Yurkov <[email protected]>--- meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0b/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb FILES_${PN}-dev = "${includedir}
Quoted 4 lines
index
31a42a9d6..a59320655100644meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +0
-0@@ -18,3 +18,4 @@ FILES_${PN}-dev = "${includedir}${datadir}/eigen3/cmake ${datadir}/cmake/Module
Quoted 7 lines
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +1
-1# ${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
Quoted 5 lines
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 1 line
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,
Quoted 73 lines · Vyacheslav Yurkov
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-imageAfter last step I got:
ERROR: my-image-dev-1.0-r0do_rootfs: libeigen not found in the feeds (x86 corei7-64 core2-64x86_64noarch any all) in/home/uvv/projects/yocto-x86/build/tmp/deploy/rpm.
ERROR: my-image-dev-1.0-r0do_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-r0do_rootfs: Function failed:do_rootfsIf 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,
VyacheslavQuoted 43 lines · Martin Jansa
Quoted 6 lines · Vyacheslav Yurkov
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).
Review
Quoted 6 lines
Signed-off-by Vyacheslav Yurkov <[email protected]>--- meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0b/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb FILES_${PN}-dev = "${includedir}
Quoted 4 lines
index
31a42a9d6..a59320655100644meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +0
-0@@ -18,3 +18,4 @@ FILES_${PN}-dev = "${includedir}${datadir}/eigen3/cmake ${datadir}/cmake/Module
Quoted 7 lines
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +1
-1# ${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
Quoted 5 lines
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 8 lines · Martin Jansa
Quoted 1 line
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?
That makes sense. Indeed it was. I removed it from the image and it worked well! Thanks for the hint. Now the only dependency on libeigen is ceres-solver.
Adding ALLOW_EMPTY here is just hiding the issue somewhere else. It makes
Quoted 6 lines
sense when the package might be empty based on some configuration (e.g. PACKAGECONFIGs), but in general
ALLOW_EMPTYis 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.
I have a bit different use case. I don't use package manager :) But the point of having it in the image was to automatically put libeigen into generated SDK. I checked it again, and SDK still generates properly with libeigen-dev included.
Quoted 3 lines
And when you're there you can remove
ALLOW_EMPTYfrom ceres-solver as well :).
I will check if RDEPENDS_${PN}-dev works with ceres-solver as well. If it does, then the patch from me will come ;)
Thanks again,
Vyacheslav
Quoted 80 lines
Cheers,
Quoted 74 lines · Vyacheslav Yurkov
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-imageAfter last step I got:
ERROR: my-image-dev-1.0-r0do_rootfs: libeigen not found in the feeds (x86 corei7-64 core2-64x86_64noarch any all) in/home/uvv/projects/yocto-x86/build/tmp/deploy/rpm.
ERROR: my-image-dev-1.0-r0do_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-r0do_rootfs: Function failed:do_rootfsIf 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,
VyacheslavQuoted 44 lines · Martin Jansa
Quoted 6 lines · Vyacheslav Yurkov
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).
Review
Quoted 6 lines
Signed-off-by Vyacheslav Yurkov <[email protected]>--- meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0b/meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb FILES_${PN}-dev = "${includedir}
Quoted 4 lines
index
31a42a9d6..a59320655100644meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +0
-0@@ -18,3 +18,4 @@ FILES_${PN}-dev = "${includedir}${datadir}/eigen3/cmake ${datadir}/cmake/Module
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb FILES_${PN}-dev = "${includedir} · line 18
Quoted 1 line
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +0
-0# ${PN} is empty so we need to tweak -dev and -dbg packagedependencies
Quoted 11 lines
meta-oe/recipes-support/libeigen/libeigen_3.3.4.bb +1
-1RDEPENDS_${PN}-dev = "" RRECOMMENDS_${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" +ALLOW_EMPTY_${PN} = "1" --2.17.0
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel--
Martin 'JaMa' Jansa jabber: [email protected]