1

Ubuntu 22.04.2 LTS. I'm trying to execute bitbake <image> from a Jenkins job. Build fails with Error:

ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Your Python 3 is not a full install. Please install the module distutils.sysconfig (see the Getting Started guide for further information). 

I tried to install distutils module (tried approaches from here) but got dependency issues that was not able to fix, so as alternative solution I want to disable the sanity check

This is how sanity.conf looks currently:

# Sanity checks for common user misconfigurations # # See sanity.bbclass # # Expert users can confirm their sanity with "touch conf/sanity.conf" BB_MIN_VERSION = "1.46.0" SANITY_ABIFILE = "${TMPDIR}/abi_version" SANITY_VERSION ?= "1" LOCALCONF_VERSION ?= "1" LAYER_CONF_VERSION ?= "7" SITE_CONF_VERSION ?= "1" INHERIT += "sanity" 

So how to update sanity.conf to disable sanity checker?

6
  • The thing is, you can hack your way past this error message, but these checks are doing very basic checks - if they fail, your system most likely will not be able to build a usable image, and possibly it will just lead to a new error. E.g. this error indicates that your system will fail building glib, at least. If you want to experiment, you can comment out these lines to get a bit further. But generally solving those dependency issues you mentioned would be more beneficial. Commented Oct 16, 2023 at 10:30
  • 1
    Like @skandigraun said, if you insist just do INHERIT:remove = "sanity" Commented Oct 16, 2023 at 11:11
  • @TalelBELHADJSALEM I've added sed -i -e 's/INHERIT += "sanity"/INHERIT:remove = "sanity"/g' /path/to/conf/sanity.conf (line for lines replacement) to Jenkins job config and at least build is started with no errors. You can add your comment as answer Commented Oct 16, 2023 at 12:32
  • Do not modify Poky directly, check point 5 of doc, check my answer. Commented Oct 16, 2023 at 14:03
  • @TalelBELHADJSALEM in #5 of doc there is something about next release... however I'm making a checkout to a project and doing build within the Jenkins job and the workspace cleaned before each build, so not sure how it might harm... Commented Oct 16, 2023 at 14:17

1 Answer 1

5

As detailed in the comments, it is not recommended to disable sanity checks unless you are ready to face errors and fix them on your own.

In your local.conf or any other suitable .conf file in your environment, add:

INHERIT:remove = "sanity" 
Sign up to request clarification or add additional context in comments.

1 Comment

This used to get overwritten as soon as I triggered a build. I created a conf/sanity.conf file and added this line. It worked. Thanks very much for the suggestion...

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.