ERROR: core-image-apd-devel-1.0-r0 do_rootfs: Could not invoke dnf

HI Experts,

My question:-
ERROR: core-image-apd-devel-1.0-r0 do_rootfs: Could not invoke dnf.
How to fix this dnf errors ??

I had downloaded meta-mender zeus branch and cross compiled with my yocto build environment which is in zeus version. Now getting error as could not invoke dnf. command.

In my build/conf/bblayers.conf, added following layers :-
** /home/user/ara-project-10nov/meta-mender/meta-mender-core/
/home/user/ara-project-10nov/meta-mender/meta-mender-demo/
/home/user/ara-project-10nov/meta-mender/meta-mender-qemu/ **

Kindly help me in resolving this error.

Thanks
Giri

Hello @girishb, welcome to Mender Hub.

Can you share a bit more detail about your system? What MACHINE are you building for? Are you intentionally using rpm-based packaging?

What happens if you add the following to local.conf?

PACKAGE_CLASSES = "package_ipk"

Drew

Hello @drewmoseley ,
Thank you.

My End Goal :-
To connect

mender client based yocto image with my sample client application embedded in yocto image

to mender server.
( Here mender client yocto image with my client application will be built for qemux86-64 architecture machine and will be running image in qemu emulator. From qemu emulator my sample client application should connect to mender-server .)

PreRequistes ## :-

** My native machine - Intel x86 laptop with Ubuntu 16.04 *
** MACHINE = qemux86-64 ( need to generate image for qemu and load image in qemu )*

  • yocto-layers vesrion zeus
  • meta-mender version zeus
    ** I want to use generated yocto mender client image with my sample client application on QEMU x86 emulator, wherein my sample client applciation with bin/exe when ranned need to connect to Mender Server.

About Intentionally RPM :-
Generating yocto image for Ubuntu 16.04 linuxOS not for red-hat, fedora, centOS

########################
I hope you have understood till here clearly.
########################

=========================
Build Configuration :-

Build Configuration:
BB_VERSION = “1.44.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “x86_64-poky-linux”
MACHINE = “qemux86-64”
DISTRO = “apd”
DISTRO_VERSION = “R20-11”
TUNE_FEATURES = “m64 core2”
TARGET_FPU = “”
meta
meta-poky
meta-yocto-bsp = “HEAD:d88d62c20d7d8da85f02edb170dae0280624ad7e”
meta-mender-core
meta-mender-qemu = “zeus:49714b7628cb3171d793dd4c03ca38839ee21392”
meta-oe
meta-python
meta-multimedia
meta-networking = “HEAD:2b5dd1eb81cd08bc065bc76125f2856e9383e98b”
meta-opendds = “zeus:f82677dd242fd4f7c453ffa64ddeb7dbbce28dbe”
meta-ara = “master:f5fba46be8f2e611768bc41f5e0c60fadba4d24e”

=============================

After adding PACKAGE_CLASSES = “package_ipk” to local.conf

my laptop gets restarted… i again ranned the bitbake core-image-apd-devel again and again for 30+ times. it happens to be same after 35% ################### build progress laptop gets restarted.

Do i need to keep this PACKAGE_CLASSES = “package_ipk” in local.conf ??

Girib

Wow. I can’t imagine what would cause the laptop to restart by any kind of Yocto build much less that simple setting of PACKAGE_CLASSES.

My initial thought is that maybe you have bad RAM or a marginal disk that is causing issues. Certainly Yocto should not behave like that.
Drew

Oh, and no you can remove the PACKAGE_CLASSES setting. That was just an experiment.

Drew,
yes I have RAM of size 16 GB and disk space of size 300 GB. I think this should be increased.

Can you tell me what i have to do next to resolve issue on dnf and make my build working

Giri

@drewmoseley ,

can you tell me like after removing PACKAGE_CLASSES setting, how to resolve dnf issue.

Giri

Hello Experts,

can anyone kindly tell me how to fix issue on dnf. command not found ???

Giri

Hi @girishb I’m wondering if you have bad RAM, not just insufficient RAM. The reboot issue you described when building with ipk packages is suspicious.

The first thing I would recommend is to do an absolute bare minimum Yocto build and make sure that works. Remove all the Mender settings from bblayers.conf, local.conf and auto.conf (if it exists), and try to build first core-image-minimal, and then core-image-base. If those build then try to build your core-image-apd-devel image without Mender. Let me know how those build tests go.

I really don’t know why dnf would not be building. You can try to run bitbake dnf-native before running your bitbake core-image-apd-devel. If there is a race condition in the recipes such that dnf is being called before it has been built then doing it in this order may work around it.

Drew

Hi @drewmoseley , i got another error now as
ERROR: core-image-apd-devel-1.0-r0 do_rootfs: Unable to install packages.
after building image with PACKAGE_CLASSES ipk in local.conf settings.

i followed bitbake dnf-native and then bitbake core-image-apd-devel.

I haven’t started building from first without mender configuraions in bbalyers and local.conf

can you tell me i am in right direction or i need to start newly without mender and build only my yocto image and then further adding meta-mender in bblayers.conf and local.conf

Giri

@drewmoseley , this message about starting build newly without mender.

stage 1) bitbake core-image-minimal got successfully build
stage 2) bitbake core-image-base build got failed. below are logs

For stage 2, in my case yocto-layers do not have recipe with name core-image-base.bb in order to execute bitbake core-image-base . The above error logs may due to this if i am not wrong. Drew, please correct me further to proceed

Stage 3) I have ranned bitbake core-image-apd-minimal got successfull and
bitbake core-image-apd-devel got successful without any mender related stuff.

Stage 4) Now started modifying bblayers.conf and local.conf with mender settings till now used. Again here same error unable to install packages Command '/home/user/ara-project-10nov/build/tmp/work/qemux86_64-poky-linux/core-image-apd-minimal/1.0-r0/recipe-sysroot-native/usr/bin/opkg

Giri

That error indicates that your configuration has disallowed any GPLv3 code from being included. It’s failing because evidently core-image-base has a GPLv3 dependency.

I don’t know what the core-image-apd recipes are so I can’t help much but it does seem specific to those recipes. Is that a publicly available recipe? My guess is that is in your private layer and that something in that layer is causing this issue. Can you do a standard qemux86_64 build without your private layer?

Drew

@drewmoseley , before i start following the above thread , I was getting an error as unable to install packages Command '/home/user/ara-project-10nov/build/tmp/work/qemux86_64-poky-linux/core-image-apd-minimal/1.0-r0/recipe-sysroot-native/usr/bin/opkg

this error occured with PACKAGE ipk settings followed by bitbake dnf-native and bitbake core-image-apd-devel, as shown below image.

@drewmoseley , can i know when you will be available what are your timings that you can reply, as this is blocking me

Giri

Hi @girishb

As I indicated, I suspect this is something in your meta-ara layer. I don’t have any visibility into that so I cannot help much.

If you have timing-sensitive issues, you may need to consider a consulting services agreement to get better response times.

Drew