Skip to contentSkip to conversation

glibc: make glibc-dev depend on kernel headers

PATCH In review Chen Qi 2 participants 3 messages Jul 21, 2022

lore
Share & tools
lore

Chen Qi

author
#0 lore raw

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
index 278e1b7cc1..7f9e7503a1 100644
@@ -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
#1 lore raw
Quoted 8 lines · Chen Qi

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.

Quoted 8 lines

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 ?

Quoted 39 lines
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/glibc/glibc-package.inc +0 -0
index 278e1b7cc1..7f9e7503a1 100644
@@ -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]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw

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
index 278e1b7cc1..7f9e7503a1 100644
@@ -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]>]
-=-=-=-=-=-=-=-=-=-=-=-