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

@drewmoseley
@girishb

actually i am new to yoctoproject and i have build many images for raspberry pi & im7xd 1gb emmc & beabglebone black also but now i am adding some extra modules to my raspberry pi4 image.

i also got the same do rootfs error. while building rpi-basic-image for raspberry pi4

nabeel@nabeel-VirtualBox:~/yoctoproject/build$ bitbake rpi-basic-image
Loading cache: 100% |###############################################################################################################################################################| Time: 0:00:00
Loaded 3305 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “aarch64-poky-linux”
MACHINE = “raspberrypi4-64”
DISTRO = “poky”
DISTRO_VERSION = “3.1.29”
TUNE_FEATURES = “aarch64 cortexa72 crc crypto”
TARGET_FPU = “”
meta
meta-poky
meta-yocto-bsp = “dunfell:aeac1034661725b5c83e79f76238429fb236b090”
meta-raspberrypi = “dunfell:2081e1bb9a44025db7297bfd5d024977d42191ed”
meta-oe
meta-python
meta-networking
meta-multimedia = “dunfell:300be975359fdb3a3b2bf7c6fe15dea7acac575d”
meta-blog = “:”

Initialising tasks: 100% |##########################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 364 Found 360 Missed 4 Current 881 (98% match, 99% complete)
NOTE: Executing Tasks
ERROR: rpi-basic-image-1.0-r0 do_rootfs: Could not invoke dnf. Command ‘/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/rootfs --setopt=logdir=/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/temp --repofrompath=oe-repo,/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/oe-rootfs-repo --nogpgcheck install kernel-modules packagegroup-core-boot packagegroup-core-ssh-dropbear psplash-raspberrypi python-autobahn run-postinsts’ returned 1:
DNF version: 4.2.2
cachedir: /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Wed 08 Nov 2023 02:59:54 PM UTC.
No module defaults found
No match for argument: python-autobahn
Error: Unable to find a match

ERROR: Logfile of failure stored in: /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/rpi-basic-image/1.0-r0/temp/log.do_rootfs.32305
ERROR: Task (/home/nabeel/yoctoproject/source/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb:do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 3838 tasks of which 3837 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/nabeel/yoctoproject/source/meta-raspberrypi/recipes-core/images/rpi-basic-image.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

please help me if there is any recipe mistake or i have been doing something wrong.

I’m not sure you want to be building rpi-basic-image. I think that was obsoleted some time ago. I normally just use core-image-base or some other standard poky image.

In this case your build is failing to find the python-autobahn recipe. In my kirkstone sources I have a python3-autobahn recipe. My guess is even in dunfell that recipe name changed.

But if you use core-image-base I suspect it will not include the missing recipe.

Drew

So when i use core-image-base with python3-autobahn the error goes following:

nabeel@nabeel-VirtualBox:~/yoctoproject/build$ bitbake core-image-base
Parsing recipes: 100% |############################################################################################################################################| Time: 0:00:34
Parsing of 2205 .bb files complete (0 cached, 2205 parsed). 3305 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “aarch64-poky-linux”
MACHINE = “raspberrypi4-64”
DISTRO = “poky”
DISTRO_VERSION = “3.1.29”
TUNE_FEATURES = “aarch64 cortexa72 crc crypto”
TARGET_FPU = “”
meta
meta-poky
meta-yocto-bsp = “dunfell:aeac1034661725b5c83e79f76238429fb236b090”
meta-raspberrypi = “dunfell:2081e1bb9a44025db7297bfd5d024977d42191ed”
meta-oe
meta-python
meta-networking
meta-multimedia = “dunfell:300be975359fdb3a3b2bf7c6fe15dea7acac575d”
meta-blog = “:”

Initialising tasks: 100% |#########################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 417 Found 415 Missed 2 Current 1237 (99% match, 99% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 4912 tasks of which 4908 didn’t need to be rerun and all succeeded.
nabeel@nabeel-VirtualBox:~/yoctoproject/build$ bitbake core-image-base
Parsing recipes: 100% |############################################################################################################################################| Time: 0:00:34
Parsing of 2205 .bb files complete (0 cached, 2205 parsed). 3305 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES ‘python3-autobahn’ (but /home/nabeel/yoctoproject/source/poky/meta/recipes-core/images/core-image-base.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target ‘python3-autobahn’ is unbuildable, removing…
Missing or unbuildable dependency chain was: [‘python3-autobahn’]
ERROR: Required build target ‘core-image-base’ has no buildable providers.
Missing or unbuildable dependency chain was: [‘core-image-base’, ‘python3-autobahn’]

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

But when i use core-image-base with python-autobahn the error goes following:

nabeel@nabeel-VirtualBox:~/yoctoproject/build$ bitbake core-image-base
Parsing recipes: 100% |############################################################################################################################################| Time: 0:00:40
Parsing of 2205 .bb files complete (0 cached, 2205 parsed). 3305 targets, 137 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “aarch64-poky-linux”
MACHINE = “raspberrypi4-64”
DISTRO = “poky”
DISTRO_VERSION = “3.1.29”
TUNE_FEATURES = “aarch64 cortexa72 crc crypto”
TARGET_FPU = “”
meta
meta-poky
meta-yocto-bsp = “dunfell:aeac1034661725b5c83e79f76238429fb236b090”
meta-raspberrypi = “dunfell:2081e1bb9a44025db7297bfd5d024977d42191ed”
meta-oe
meta-python
meta-networking
meta-multimedia = “dunfell:300be975359fdb3a3b2bf7c6fe15dea7acac575d”
meta-blog = “:”

Initialising tasks: 100% |#########################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 420 Found 416 Missed 4 Current 1241 (99% match, 99% complete)
NOTE: Executing Tasks
ERROR: core-image-base-1.0-r0 do_rootfs: Could not invoke dnf. Command ‘/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=info -y -c /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/rootfs/etc/yum.repos.d --installroot=/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/rootfs --setopt=logdir=/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/temp --repofrompath=oe-repo,/home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/oe-rootfs-repo --nogpgcheck install packagegroup-base-extended packagegroup-core-boot psplash-raspberrypi python-autobahn run-postinsts locale-base-en-us locale-base-en-gb’ returned 1:
DNF version: 4.2.2
cachedir: /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/rootfs/var/cache/dnf
Added oe-repo repo from /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/oe-rootfs-repo
repo: using cache for: oe-repo
not found other for:
not found modules for:
not found deltainfo for:
not found updateinfo for:
oe-repo: using metadata from Thu 09 Nov 2023 03:20:03 AM UTC.
No module defaults found
No match for argument: python-autobahn
Error: Unable to find a match

ERROR: Logfile of failure stored in: /home/nabeel/yoctoproject/build/tmp/work/raspberrypi4_64-poky-linux/core-image-base/1.0-r0/temp/log.do_rootfs.31570
ERROR: Task (/home/nabeel/yoctoproject/source/poky/meta/recipes-core/images/core-image-base.bb:do_rootfs) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 4918 tasks of which 4914 didn’t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/nabeel/yoctoproject/source/poky/meta/recipes-core/images/core-image-base.bb:do_rootfs
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

i have included IMAGE_INSTALL_append = “python-autobahn” in local.conf
so how do i include this autobahn in my raspberry pi image while building
if you have any other idea or any other link for regarding including autobahn in raspberrypi image.

Hi nabeel , tell me the solution for this error. Even I got the same error while building the image for Raspberrypi4 .

Might be the recipe has not been cooked properly you have to share your recipe file as well to understand the problem better way.

Although I think popt native is a library for parsing command line options. You can clone recipe from open embedded layer index directly for dunfell branch & built the image. OpenEmbedded Layer Index - popt

Please share the recipe & share the file where you did IMAGE_INSTALL_APPEND = popt_native 1.16.

Please how did you solve this problem because I have the same, but I don’t understand what the problem is?