# Kbd-2.2.0-r0 do\_compile: oe\_runmake failed with Raspberry Pi 4

**URL:** <https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321>\
**Category:** General Discussions\
**Tags:** yocto, raspberry-pi-4\
**Created:** [November 22, 2021, 8:46am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321 "2021-11-22T08:46:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 22, 2021, 8:46am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/1 "2021-11-22T08:46:00Z")

</div>

Hello,

I am trying to compile a system image using **Yocto Project** with the **meta-mender** layer for Rasperry Pi 4.

Currently, I have cloned the following:

```auto
git clone -b dunfell git://git.yoctoproject.org/poky
git clone -b dunfell https://github.com/openembedded/meta-openembedded.git
git clone -b dunfell git://git.yoctoproject.org/meta-raspberrypi
git clone -b dunfell git://github.com/mendersoftware/meta-mender

```

Also, I have the following layers:

```auto
layer path priority
==========================================================================
meta /home/lakshanthad/mender-cm4/layers/poky/meta 5
meta-poky /home/lakshanthad/mender-cm4/layers/poky/meta-poky 5
meta-yocto-bsp /home/lakshanthad/mender-cm4/layers/poky/meta-yocto-bsp 5
meta-raspberrypi /home/lakshanthad/mender-cm4/layers/meta-raspberrypi 9
meta-oe /home/lakshanthad/mender-cm4/layers/meta-openembedded/meta-oe 6
meta-python /home/lakshanthad/mender-cm4/layers/meta-openembedded/meta-python 7
meta-mender-core /home/lakshanthad/mender-cm4/layers/meta-mender/meta-mender-core 6
meta-mender-raspberrypi /home/lakshanthad/mender-cm4/layers/meta-mender/meta-mender-raspberrypi 10

```

Then I have the following inside **local.conf** :

```auto
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"

```

When I try to compile as follows:

```auto
MACHINE=raspberrypi4-64 bitbake core-image-base

```

It has the following error during compilation:

```auto

ERROR: kbd-2.2.0-r0 do_compile: oe_runmake failed
ERROR: kbd-2.2.0-r0 do_compile: Execution of '/home/lakshanthad/mender-cm4/build/tmp/work/aarch64-poky-linux/kbd/2.2.0-r0/temp/run.do_compile.3354411' failed with exit code 1

```

Here is the complete log:

> **[log.txt](https://onedrive.live.com/redir?resid=6D9FAA4A08B266E6%21211927&authkey=%21AAzxk3l_tIvs23I&ithint=file%2ctxt&e=AXAz7z)**
>
> Text Document

Would really appreciate if someone could help.

Best Regards,  
Lakshantha

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [November 22, 2021, 8:59am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/2 "2021-11-22T08:59:06Z")

</div>

I don’t think this is related to Mender, `kbd` is not a recipe we use. Try compiling without the Mender layers first. If the error is still there you should probably ask on the OpenEmbedded or Raspberry Pi mailing lists.

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 22, 2021, 9:00am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/3 "2021-11-22T09:00:30Z")

</div>

It compiles successfully without mender layer.

The error happens only when I add **meta-mender-core** and **meta-mender-raspberrypi** layers and add **INHERIT += “mender-full”** to **local.conf**

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [November 22, 2021, 9:26am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/4 "2021-11-22T09:26:15Z")

</div>

Does it succeed without Mender also if you run this?

```bash
bitbake kbd

```

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 22, 2021, 9:48am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/5 "2021-11-22T09:48:12Z")

</div>

I just removed mender layer and ran **bitbake kbd**. Then it does not have an error.

Here are my further findings:

1. Included mender layer with **meta-mender-core** and **meta-mender-raspberrypi** with no change to **local.conf** and then ran **bitbake kbd**. No error.

2. Included mender layer with **meta-mender-core** and **meta-mender-raspberrypi**. Included **INHERIT += “mender-full”** inside **local.conf** and ran **bitbake kbd**. Has error.

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 22, 2021, 10:16am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/6 "2021-11-22T10:16:07Z")

</div>

I carried on further testing and found out that if I remove **mender-systemd** , **bitbake kbd** runs successfully.

```auto
INHERIT += "mender-full"
MENDER_FEATURES_DISABLE_append = " mender-systemd"

```

Also, the compilation succeeds with **mender-systemd** disabled.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 22, 2021, 10:48am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/7 "2021-11-22T10:48:21Z")

</div>

I think kbd is a dependency of systemd itself

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 22, 2021, 11:31am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/8 "2021-11-22T11:31:38Z")

</div>

Any possible solution for this issue?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 22, 2021, 12:13pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/9 "2021-11-22T12:13:09Z")

</div>

I would report the issue upstream

[https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/](https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/)

[http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/kbd/kbd?h=dunfell](http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-core/kbd/kbd?h=dunfell)

and for now maybe an option your end could be to drop in a .bbappend file into your yocto layer for the kbd recipe that overrides the make compile flag format-security back to a warning so you can move forward.

[https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-CFLAGS](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#var-CFLAGS)

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 22, 2021, 12:15pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/10 "2021-11-22T12:15:06Z")

</div>

or if feeling adventurous create your own patch for the offending source code (and submit upstream after testing)

[https://wiki.yoctoproject.org/wiki/TipsAndTricks/Patching\_the\_source\_for\_a\_recipe](https://wiki.yoctoproject.org/wiki/TipsAndTricks/Patching_the_source_for_a_recipe)

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 22, 2021, 5:57pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/11 "2021-11-22T17:57:32Z")

</div>

Thank you for your response @dellgreen .

Do you think the issue is still with kbd itself?

kbd problem arises only when **mender-systemd** is enabled. With **mender-systemd** disabled, it compiles successfully.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 22, 2021, 7:57pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/12 "2021-11-22T19:57:43Z")

</div>

Without mender are you still running systemd, or are you using init as your init Daemon?

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 23, 2021, 5:25am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/13 "2021-11-23T05:25:55Z")

</div>

Without mender, it is using init

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 23, 2021, 5:33am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/14 "2021-11-23T05:33:27Z")

</div>

When I use **mender-systemd** , does it first install init daemon as systemd and then install mender as systemd?

I tried adding the following to **local.conf** , just to use systemd as init daemon without any mender layer:

```auto
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"

```

And then it has the KBD error.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 23, 2021, 10:21am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/15 "2021-11-23T10:21:35Z")

</div>

yes if you add **mender-systemd** then I would expect it to have systemd as a dependency and it will get pulled into your build. So as mentioned above you will need to report/patch/override kbd yocto recipe to move forward.

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 23, 2021, 12:35pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/16 "2021-11-23T12:35:41Z")

</div>

It feels like the problem is with kbd itself.

I found an old version of **kbd-2.2.0.tar.xz** in my Yocto project **downloads** directory, where I was able to successfully compile before about 2 weeks ago.

Now I replaced that file in my new project and it worked. It’s weird that the upstream has no new commits during the past few weeks.

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 23, 2021, 2:07pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/17 "2021-11-23T14:07:50Z")

</div>

I guess I would use a diff tool to compare the contents of both working and non-working kbd source tar archives, to see if there is any difference if both files checksums are different.

After that, had your yocto layer that contains the kbd recipe changed in the last few weeks, maybe different compiler flags?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 23, 2021, 4:33pm UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/18 "2021-11-23T16:33:27Z")

</div>

Also do the classic yocto full clean build to ensure you don’t have a dirty build causing the issue

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [November 24, 2021, 9:51am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/19 "2021-11-24T09:51:07Z")

</div>

Hello @dellgreen ,

Thank you very much for the pointers. Doing a full clean has caused the KBD error to dissappear!

I have just figured what I have been doing wrong. Here are my findings:

Test 1:

1. Used poky, meta-openembedded, meta-raspberrypi and compile
2. Added systemd and compile again
3. KBD error

Test 2:

1. Used poky, meta-openembedded, meta-raspberrypi and compile
2. Added systemd and compile again
3. KBD error
4. Clean the build and compile again
5. No KBD error

Test 3:

1. Used poky, meta-openembedded, meta-raspberrypi, added systemd and compile
2. No KBD error

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 24, 2021, 10:24am UTC](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321/20 "2021-11-24T10:24:25Z")

</div>

Ok glad you have it working now.

[Next page](https://hub.mender.io/t/kbd-2-2-0-r0-do-compile-oe-runmake-failed-with-raspberry-pi-4/4321.md?page=2)
