glibc: make glibc-dev depend on kernel headers
PATCH 1/1 glibc: make glibc-dev depend on kernel headers
The linux kernel headers are necessary for glibc-dev, so we need to use RDEPENDS instead of DEV_PKG_DEPENDENCY which specifies RRECOMMENDS.
Currently, in case of NO_RECOMMENDATIONS set to "1", linux kernel headers are not pulled in by glibc-dev, causing error like below when compiling.
fatal error: linux/errno.h: No such file or directory
The problem could be reproduced by setting NO_RECOMMENDATIONS to "1" and then running:
bitbake core-image-minimal -c populate_sdk
bitbake core-image-minimal -c testsdk
--- meta/recipes-core/glibc/glibc-package.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-package.inc +1 -1
@@ -40,7 +40,7 @@ FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o" FILES:libsotruss = "${libdir}/audit/sotruss-lib.so" FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" -DEV_PKG_DEPENDENCY = "linux-libc-headers-dev" +RDEPENDS:${PN}-dev = "linux-libc-headers-dev" FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdir}/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \ ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd"
Signature · 1 line
2.37.0
Quoted 8 lines · Chen Qi
The linux kernel headers are necessary for glibc-dev, so we need to use RDEPENDS instead of
DEV_PKG_DEPENDENCYwhich specifies RRECOMMENDS.Currently, in case of
NO_RECOMMENDATIONSset to "1", linux kernel headers are not pulled in by glibc-dev, causing error like below when compiling.
Quoted 8 lines
fatal error:
linux/errno.h: No such file or directoryThe problem could be reproduced by setting
NO_RECOMMENDATIONSto "1" and then running:bitbake core-image-minimal -c
populate_sdk
bitbake core-image-minimal -c testsdk
Are there any build time implications of changing it from a recommendation to runtime dependency ?
Quoted 39 lines
Signed-off-by Chen Qi <[email protected]>--- meta/recipes-core/glibc/glibc-package.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-core/glibc/glibc-package.inc +0
-0@@ -40,7 +40,7 @@ FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map${libdir}/libc_pic/*.o"
FILES:libsotruss = "${libdir}/audit/sotruss-lib.so"FILES_SOLIBSDEV= "${libdir}/lib*${SOLIBSDEV}" FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a
${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"meta/recipes-core/glibc/glibc-package.inc +1
-1-DEV_PKG_DEPENDENCY = "linux-libc-headers-dev" +RDEPENDS:${PN}-dev = "linux-libc-headers-dev" FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd${systemd_system_unitdir}/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \ ${sysconfdir}/nscd.conf${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd" --
2.37.0-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#168376):
https://lists.openembedded.org/g/openembedded-core/message/168376
Mute This Topic: https://lists.openembedded.org/mt/92519738/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Hi Khem,
I’d say no. There should no build time impact except for the do_rootfs behavior change when switching on NO_RECOMMENDATIONS. Also, we’ve been using ‘RDEPENDS’ for glibc-dev until the recent ‘-dev’ package change.
Regards,
Qi
From: Khem Raj <[email protected]>
Sent: Thursday, July 21, 2022 10:59 AM
To: Chen, Qi <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] glibc: make glibc-dev depend on kernel headers
On Wed, Jul 20, 2022 at 10:52 PM Chen Qi <[email protected]<mailto:[email protected]>> wrote:
The linux kernel headers are necessary for glibc-dev, so
we need to use RDEPENDS instead of DEV_PKG_DEPENDENCY which
specifies RRECOMMENDS.
Currently, in case of NO_RECOMMENDATIONS set to "1", linux kernel headers are not pulled in by glibc-dev, causing error like below when compiling.
fatal error: linux/errno.h: No such file or directory
The problem could be reproduced by setting NO_RECOMMENDATIONS to "1" and then running:
bitbake core-image-minimal -c populate_sdk
bitbake core-image-minimal -c testsdk
Are there any build time implications of changing it from a recommendation to runtime dependency ?
--- meta/recipes-core/glibc/glibc-package.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-package.inc +1 -1
@@ -40,7 +40,7 @@ FILES:${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o" FILES:libsotruss = "${libdir}/audit/sotruss-lib.so" FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" -DEV_PKG_DEPENDENCY = "linux-libc-headers-dev" +RDEPENDS:${PN}-dev = "linux-libc-headers-dev" FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdir}/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \ ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd"
--
2.37.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#168376): https://lists.openembedded.org/g/openembedded-core/message/168376<https://urldefense.com/v3/__https:/lists.openembedded.org/g/openembedded-core/message/168376__;!!AjveYdw8EvQ!aSNfAAIGZIdOJpxtWdjuL9SLPy2pUNC44byO8XjaCG4j_6qVypE2xmp5cCx-XBhGYjaZAT2BlpQcYUzOaA$>
Mute This Topic: https://lists.openembedded.org/mt/92519738/1997914<https://urldefense.com/v3/__https:/lists.openembedded.org/mt/92519738/1997914__;!!AjveYdw8EvQ!aSNfAAIGZIdOJpxtWdjuL9SLPy2pUNC44byO8XjaCG4j_6qVypE2xmp5cCx-XBhGYjaZAT2BlpTpMNsMaQ$>
Group Owner: [email protected]<mailto:openembedded-core%[email protected]>
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub<https://urldefense.com/v3/__https:/lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!aSNfAAIGZIdOJpxtWdjuL9SLPy2pUNC44byO8XjaCG4j_6qVypE2xmp5cCx-XBhGYjaZAT2BlpRfgS8B-Q$> [[email protected]<mailto:[email protected]>]
-=-=-=-=-=-=-=-=-=-=-=-