diff mbox series

[1/3] busybox: Remove PN from rdeps of PN-dev

Message ID 20190212054754.2801-1-raj.khem@gmail.com
State New
Headers show
Series [1/3] busybox: Remove PN from rdeps of PN-dev | expand

Commit Message

Khem Raj Feb. 12, 2019, 5:47 a.m. UTC
PN-dev is empty and causes dependency loops during SDK build

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-core/busybox/busybox.inc | 1 +
 1 file changed, 1 insertion(+)

-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Ross Burton Feb. 12, 2019, 3:58 p.m. UTC | #1
Would a neater solution be to PACKAGES_remove = ${PN}-dev?

Ross

On Tue, 12 Feb 2019 at 05:48, Khem Raj <raj.khem@gmail.com> wrote:
>

> PN-dev is empty and causes dependency loops during SDK build

>

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  meta/recipes-core/busybox/busybox.inc | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc

> index 24c15e4aee..2444afabd5 100644

> --- a/meta/recipes-core/busybox/busybox.inc

> +++ b/meta/recipes-core/busybox/busybox.inc

> @@ -21,6 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"

>  EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"

>

>  PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"

> +RDEPENDS_${PN}-dev = ""

>

>  FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"

>  FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"

> --

> 2.20.1

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Richard Purdie Feb. 12, 2019, 5:26 p.m. UTC | #2
On Mon, 2019-02-11 at 21:47 -0800, Khem Raj wrote:
> PN-dev is empty and causes dependency loops during SDK build

> 

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  meta/recipes-core/busybox/busybox.inc | 1 +

>  1 file changed, 1 insertion(+)


I commented on this elsewhere but for completeness, this is a
workaround, not a fix. The problem is that the PROVIDES in target-sdk-
provides-dummy.bb are clearly missing something.

This means that the SDK tries to exclude "/bin/sh" and similar target
dependencies from the SDK rootfs which leads to excluding busybox and
then fails to do so. If busybox is installed, busybox-dev gets pulled
in and the problems start.

The real fix is to figure out the missing target-sdk-provides-dummy
provides.

If someone could share a way to reproduce the failure that would be a
good start.

Cheers,

Richard

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 12, 2019, 6:59 p.m. UTC | #3
On Tue, Feb 12, 2019 at 9:26 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>

> On Mon, 2019-02-11 at 21:47 -0800, Khem Raj wrote:

> > PN-dev is empty and causes dependency loops during SDK build

> >

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > ---

> >  meta/recipes-core/busybox/busybox.inc | 1 +

> >  1 file changed, 1 insertion(+)

>

> I commented on this elsewhere but for completeness, this is a

> workaround, not a fix. The problem is that the PROVIDES in target-sdk-

> provides-dummy.bb are clearly missing something.

>

> This means that the SDK tries to exclude "/bin/sh" and similar target

> dependencies from the SDK rootfs which leads to excluding busybox and

> then fails to do so. If busybox is installed, busybox-dev gets pulled

> in and the problems start.

>

> The real fix is to figure out the missing target-sdk-provides-dummy

> provides.

>

> If someone could share a way to reproduce the failure that would be a

> good start.

>


Use oe-core+bitbake ( nodisro ) settings and then
bitbake -cpopulate_sdk core-image-minimal

and you see

WARNING: core-image-minimal-1.0-r0 do_populate_sdk: Unable to install
packages. Command
'/mnt/a/yoe/build/tmp/work/sama5d27_som1_ek_sd-yoe-linux-musleabi/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/opkg
--volatile-cache -f
/mnt/a/yoe/build/tmp/work/sama5d27_som1_ek_sd-yoe-linux-musleabi/core-image-minimal/1.0-r0/opkg.conf
-t /mnt/a/yoe/build/tmp/work/sama5d27_som1_ek_sd-yoe-linux-musleabi/core-image-minimal/1.0-r0/temp/ipktemp/
-o /mnt/a/yoe/build/tmp/work/sama5d27_som1_ek_sd-yoe-linux-musleabi/core-image-minimal/1.0-r0/sdk/image/opt/yoe-musl-sysvinit-wayland/2.6/sysroots/cortexa5t2hf-neon-vfpv4-yoe-linux-musleabi
 --force_postinstall --prefer-arch-to-version   install libgcc-s-src
eudev-dbg update-rc.d-dev libcxx-dbg base-passwd-dev
sysvinit-inittab-dbg libz-dev modutils-initscripts-dbg initscripts-dev
opkg-utils-dbg musl-utils-dev libgcc-s-dbg init-ifupdown-dbg
packagegroup-core-standalone-sdk-target-dbg sysvinit-inittab-dev
busybox-dev gcc-runtime-dbg netbase-dbg kmod-dbg base-passwd-src
base-passwd-dbg initscripts-dbg eudev-dev sysvinit-dbg
run-postinsts-dbg target-sdk-provides-dummy-dbg base-files-dbg
musl-utils-dbg libz-dbg base-files-dev
packagegroup-core-standalone-sdk-target-dev musl-utils-src
compiler-rt-dbg dt-overlay-at91-dev busybox-dbg util-linux-dbg
kmod-dev util-linux-dev dt-overlay-at91-dbg packagegroup-core-boot-dev
sysvinit-src target-sdk-provides-dummy-dev sysvinit-dev
init-ifupdown-dev packagegroup-core-boot-dbg update-rc.d-dbg musl-src
modutils-initscripts-dev netbase-dev run-postinsts-dev' returned 1:
Collected errors:
 * Solver encountered 1 problem(s):
 * Problem 1/1:
 *   - package busybox-dev-1.29.3-r0.4.cortexa5t2hf-neon-vfpv4
requires busybox = 1.29.3-r0.4, but none of the providers can be
installed
 *
 * Solution 1:
 *   - allow deinstallation of
target-sdk-provides-dummy-1.0-r0.3.sdk-provides-dummy-target

 *   - do not ask to install a package providing target-sdk-provides-dummy-dev

 * Solution 2:
 *   - do not ask to install a package providing busybox-dev


> Cheers,

>

> Richard

>

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 12, 2019, 7:04 p.m. UTC | #4
On Tue, Feb 12, 2019 at 7:59 AM Burton, Ross <ross.burton@intel.com> wrote:
>

> Would a neater solution be to PACKAGES_remove = ${PN}-dev?

>


That was first thing I tried too. It does not fix the problem

> Ross

>

> On Tue, 12 Feb 2019 at 05:48, Khem Raj <raj.khem@gmail.com> wrote:

> >

> > PN-dev is empty and causes dependency loops during SDK build

> >

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > ---

> >  meta/recipes-core/busybox/busybox.inc | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc

> > index 24c15e4aee..2444afabd5 100644

> > --- a/meta/recipes-core/busybox/busybox.inc

> > +++ b/meta/recipes-core/busybox/busybox.inc

> > @@ -21,6 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"

> >  EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"

> >

> >  PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"

> > +RDEPENDS_${PN}-dev = ""

> >

> >  FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"

> >  FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"

> > --

> > 2.20.1

> >

> > --

> > _______________________________________________

> > Openembedded-core mailing list

> > Openembedded-core@lists.openembedded.org

> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 15, 2019, 3:01 p.m. UTC | #5
Richard/Ross

Are you able to reproduce the problem and have
alternative solution?

On Tue, Feb 12, 2019 at 11:04 AM Khem Raj <raj.khem@gmail.com> wrote:
>

> On Tue, Feb 12, 2019 at 7:59 AM Burton, Ross <ross.burton@intel.com> wrote:

> >

> > Would a neater solution be to PACKAGES_remove = ${PN}-dev?

> >

>

> That was first thing I tried too. It does not fix the problem

>

> > Ross

> >

> > On Tue, 12 Feb 2019 at 05:48, Khem Raj <raj.khem@gmail.com> wrote:

> > >

> > > PN-dev is empty and causes dependency loops during SDK build

> > >

> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > > ---

> > >  meta/recipes-core/busybox/busybox.inc | 1 +

> > >  1 file changed, 1 insertion(+)

> > >

> > > diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc

> > > index 24c15e4aee..2444afabd5 100644

> > > --- a/meta/recipes-core/busybox/busybox.inc

> > > +++ b/meta/recipes-core/busybox/busybox.inc

> > > @@ -21,6 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}"

> > >  EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"

> > >

> > >  PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"

> > > +RDEPENDS_${PN}-dev = ""

> > >

> > >  FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"

> > >  FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"

> > > --

> > > 2.20.1

> > >

> > > --

> > > _______________________________________________

> > > Openembedded-core mailing list

> > > Openembedded-core@lists.openembedded.org

> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Richard Purdie Feb. 15, 2019, 4:04 p.m. UTC | #6
On Fri, 2019-02-15 at 07:01 -0800, Khem Raj wrote:
> Richard/Ross

> 

> Are you able to reproduce the problem and have

> alternative solution?


Your reproduction steps needed "use ipk", then yes, I could. I've sent
out a patch which addresses the problem.

Cheers,

Richard

	

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Feb. 15, 2019, 7:43 p.m. UTC | #7
On Fri, Feb 15, 2019 at 8:04 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>

> On Fri, 2019-02-15 at 07:01 -0800, Khem Raj wrote:

> > Richard/Ross

> >

> > Are you able to reproduce the problem and have

> > alternative solution?

>

> Your reproduction steps needed "use ipk", then yes, I could. I've sent

> out a patch which addresses the problem.


Thanks yes ipk was implied with oe-core+bitbake :)
I will test https://patchwork.openembedded.org/patch/158751/
and see if my SDK is good with out busybox hack

>

> Cheers,

>

> Richard

>

>

>

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 24c15e4aee..2444afabd5 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -21,6 +21,7 @@  export EXTRA_LDFLAGS = "${LDFLAGS}"
 EXTRA_OEMAKE = "CC='${CC}' LD='${CCLD}' V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} SKIP_STRIP=y HOSTCC='${BUILD_CC}' HOSTCPP='${BUILD_CPP}'"
 
 PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock"
+RDEPENDS_${PN}-dev = ""
 
 FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www"
 FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog"