Kbd-2.2.0-r0 do_compile: oe_runmake failed with Raspberry Pi 4

So the problem is that the compiler has a flag called -Werror=format-security set in meta/conf/distro/include/security_flags.inc

To fix this compilation error just set the variable: SECURITY_STRINGFORMAT in your layer.conf to:

SECURITY_STRINGFORMAT = “”