diff mbox series

glibc: make glibc-dev depend on kernel headers

Message ID 20220721025231.1690-1-Qi.Chen@windriver.com
State New
Headers show
Series glibc: make glibc-dev depend on kernel headers | expand

Commit Message

ChenQi July 21, 2022, 2:52 a.m. UTC
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

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj July 21, 2022, 2:59 a.m. UTC | #1
On Wed, Jul 20, 2022 at 10:52 PM Chen Qi <Qi.Chen@windriver.com> 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 ?


> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  meta/recipes-core/glibc/glibc-package.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-package.inc
> b/meta/recipes-core/glibc/glibc-package.inc
> index 278e1b7cc1..7f9e7503a1 100644
> --- a/meta/recipes-core/glibc/glibc-package.inc
> +++ b/meta/recipes-core/glibc/glibc-package.inc
> @@ -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
> Mute This Topic: https://lists.openembedded.org/mt/92519738/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
ChenQi July 21, 2022, 3:06 a.m. UTC | #2
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 <raj.khem@gmail.com>
Sent: Thursday, July 21, 2022 10:59 AM
To: Chen, Qi <Qi.Chen@windriver.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] glibc: make glibc-dev depend on kernel headers



On Wed, Jul 20, 2022 at 10:52 PM Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>> 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 ?


Signed-off-by: Chen Qi <Qi.Chen@windriver.com<mailto:Qi.Chen@windriver.com>>
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 278e1b7cc1..7f9e7503a1 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -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: openembedded-core+owner@lists.openembedded.org<mailto:openembedded-core%2Bowner@lists.openembedded.org>
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$> [raj.khem@gmail.com<mailto:raj.khem@gmail.com>]
-=-=-=-=-=-=-=-=-=-=-=-
diff mbox series

Patch

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 278e1b7cc1..7f9e7503a1 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -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"