iMX8 validation image build failure

I attempted to do a validation build this morning, and the build failed before it even started. This is the first time this has happened; we’ve done many successful builds of this type.

Following the steps on Build Apalis iMX8/Colibri iMX8X OpenEmbedded/Yocto Project Bring-up Image (with no exceptions this time :wink: ), this is the output I get from the ‘bitbake’ step:

$ bitbake fsl-image-validation-imx
ERROR: Unable to parse /home/rdepew/workspace/imx8_clean2/imx-yocto-bsp/sources/poky/bitbake/lib/bb/data_smart.py
Traceback (most recent call last):
  File "/home/rdepew/workspace/imx8_clean2/imx-yocto-bsp/sources/poky/bitbake/lib/bb/data_smart.py", line 400, in DataSmart.expandWithRefs(s="${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR}", varname='PATH[:=]'):
                 except Exception as exc:
    >                raise ExpansionError(varname, s, exc) from exc
     
bb.data_smart.ExpansionError: Failure expanding variable PATH[:=], expression was ${@os.path.dirname(bb.utils.which(d.getVar('PATH'),'bitbake'))}:${HOSTTOOLS_DIR} which triggered exception TypeError: getVar() missing 1 required positional argument: 'expand'

Here is my PATH variable:

$ echo $PATH
/home/rdepew/workspace/imx8_clean2/imx-yocto-bsp/sources/poky/scripts:/home/rdepew/workspace/imx8_clean2/imx-yocto-bsp/sources/poky/bitbake/bin:/home/rdepew/bin:/home/rdepew/workspace/imx8_clean1/imx-yocto-bsp/sources/poky/scripts:/home/rdepew/workspace/imx8_clean1/imx-yocto-bsp/sources/poky/bitbake/bin:/home/rdepew/workspace/imx8_clean1/sources/poky/scripts:/home/rdepew/workspace/imx8_clean1/sources/poky/bitbake/bin:/home/rdepew/workspace/clean1/poky/scripts:/home/rdepew/workspace/clean1/poky/bitbake/bin:/home/rdepew/bin:/home/rdepew/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/xt:/home/rdepew/altera_lite/16.0/quartus/bin

I’ve never seen this failure before, and I’m not sure what’s causing it.

It was probably operator error. The PATH variable looks rather cluttered, due to a large number of build variations we’ve been trying. After a reboot, PATH is much cleaner, and bitbake is working just fine.

$ echo $PATH
/home/rdepew/workspace/imx8_clean2/imx-yocto-bsp/sources/poky/scripts:/home/rdepew/workspace/imx8_clean2/imx-yocto-bsp/sources/poky/bitbake/bin:/home/rdepew/bin:/home/rdepew/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/xt:/home/rdepew/altera_lite/16.0/quartus/bin

What exact distro flavor/version are you using on your build machine?

Hi

What is the output of the following command executed in your build directory?

repo forall -c 'basename $(pwd); git rev-parse HEAD'

Also in your PATH you have paths pointing into workspace/imx8_clean2 and workspace/imx8_clean1. This looks like you did in the source the fsl-setup-release.sh from two different installations in the same environment.
What happens if you start a new terminal (PATH should now not contain any reference to a bitbake installation), source the fsl-setup-release.sh and then start bitbake?

Max

The repo tool:

repo init -u git://github.com/toradex/imx-manifest.git -b toradex-linux-morty -m toradex-4.9.51-8qm_beta2_bring_up.xml

The machine and distro:

MACHINE=apalis-imx8 DISTRO=fsl-imx-x11 

The bitbake recipe:

bitbake fsl-image-validation-imx

Answering the second question first:

Also in your PATH you have paths pointing into workspace/imx8_clean2 and workspace/imx8_clean1. This looks like you did in the source the fsl-setup-release.sh from two different installations in the same environment.
What happens if you start a new terminal (PATH should now not contain any reference to a bitbake installation), source the fsl-setup-release.sh and then start bitbake?

Yes, my PATH had become rather cluttered. I may have done the ‘source fsl-setup-release.sh’ command in one environment (imx8_clean1) and then inadvertently tried a build in the other environment (imx8_clean2).

I had to reboot my workstation for other reasons. After the reboot and a new ‘source fsl-setup-release.sh’, the PATH was more orderly, as shown in the above comment, and bitbake executed successfully.

Answering the first question last:

What is the output of the following command executed in your build directory?
repo forall -c ‘basename $(pwd); git rev-parse HEAD’

$ repo forall -c 'basename `pwd`; git rev-parse HEAD'
base
0b9b4db05ec6a5d96f3a6292f6c94aa963238b11
meta-browser
678706cb43fb8576ff7b88bfb612993b8542724d
meta-freescale
05681fdf8298bb441c15135eae424c7601b07e98
meta-freescale-3rdparty
e55167c3c2770c07a475342f99cc2a3a23fbfa0c
meta-freescale-distro
cd5c7a2539f40004f74126e9fdf08254fd9a6390
meta-fsl-bsp-release
28c1b2adfb6445a64a42d082299203ec2035ea9f
meta-openembedded
b40116cf457b88a2db14b86fda9627fb34d56ae6
meta-qt5
ff073f04109900fc07bf81e2f1df63c626caf342
poky
ef888dd58f431866db2472753643f3f848fece21

good to hear that it now works.

Max