Skip to contentSkip to conversation

meta-toolchain, gdb-cross-canadian_9.2 fails due to "no usable python" #toolchain

DISCUSSION [email protected] 2 participants 3 messages Mar 5, 2021

lore
Share & tools
lore
#0 lore raw

Hi,
I have been trying to build meta-toolchain however it fails to compile during gdb-cross-canadian. Follows the relevant output:

| checking for libmpfr... no
| configure: WARNING: MPFR is missing or unusable; some features may be unavailable.
| checking whether to use python... /home/.../workspace/gatesgarth/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/9.2-r0/python
| checking for python... no
| configure: error: no usable python found at /home/.../workspace/gatesgarth/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/9.2-r0/python
| make[1]: *** [Makefile:8866: configure-gdb] Error 1

My host is Ubuntu 20.04, and I'm using yocto/poky gatesgarth as base. Target core-image-minimal builds without issue, only meta-toolchain fails. Normally I can get a good idea why something is failing from the logs, but this time I'm really left clueless. Any help would be appreciated.

BR,
Miguel

#1 lore raw
Quoted 11 lines · On Fri, Mar 5, 2021 at 4:01 AM <[email protected]> wrote:

Hi,
I have been trying to build meta-toolchain however it fails to compile during gdb-cross-canadian. Follows the relevant output:

| checking for libmpfr... no
| configure: WARNING: MPFR is missing or unusable; some features may be unavailable.
| checking whether to use python... /home/.../workspace/gatesgarth/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/9.2-r0/python
| checking for python... no
| configure: error: no usable python found at /home/.../workspace/gatesgarth/build/tmp/work/x86_64-nativesdk-pokysdk-linux/gdb-cross-canadian-arm/9.2-r0/python
| make[1]: *** [Makefile:8866: configure-gdb] Error 1

there will be a file called config.log created in gdb build dir which will have further information as to why it thing python interpreter is not usable

Quoted 7 lines

My host is Ubuntu 20.04, and I'm using yocto/poky gatesgarth as base. Target core-image-minimal builds without issue, only meta-toolchain fails. Normally I can get a good idea why something is failing from the logs, but this time I'm really left clueless. Any help would be appreciated.

BR,
Miguel

#2 lore raw

Thanks for the tip Raj, it got me into the right track. The error was that "Python.h" missing, but the interesting bit was the path where it was looking for it. It was searching for it within:
(...)./recipe-sysroot/opt/my-image/my-distro-version/sysroots/(...)
while in the filesystem it existed at
(...)./recipe-sysroot/opt/my-image/3.2.1/sysroots/(...)

From that I deduced that somehow it was picking conflicting values for DISTRO_VERSION, executing the follow commands confirmed my suspicion bitbake -e gdb-cross-canadian-arm | grep "^DISTRO"; -> DISTRO_VERSION="my-distro-version"
bitbake -e nativesdk-python3| grep "^DISTRO"; -> DISTRO_VERSION="3.2.1"

After digging a bit more I figured why it was happening, "my-distro-version" was defined through an override:
MACHINEOVERRIDES="machine"
DISTRO_VERSION_machine="my-distro-version"

However for nativesdk recipes MACHINEOVERRIDES is empty so it picked up DISTRO_VERSION as defined in poky.conf file, "3.2.1".

Dropping the override and having both DISTRO_VERSION equal solved the issue. Thanks!