libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory

Michael Glembotzki


I have backported the following recipes from honister to dunfell:

u-boot-fslc and also my image that use the u-boot-fslc can be built easily.
$ bitbake u-boot-fslc
$ bitbake <MY_IMAGE_NAME>

When I build the SDK, u-boot-fslc fails to compile outside of Yocto. My SDK is still missing things.
$ bitbake <MY_IMAGE_NAME> -c populate_sdk

$ . /opt/poky/2.0.5-dev/environment-setup-aarch64-poky-linux
$ make imx8mp_evk_defconfig
$ make -j16
scripts/dtc/pylibfdt/libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory
  154 | # include <Python.h>
      |           ^~~~~~~~~~

With a quick fix setting PYTHON3=/usr/bin/python3 in the u-boot Makefile still throws an error:
aarch64-poky-linux-ld.bfd: cannot find -lgcc
make: *** [Makefile:1801: u-boot] Error 1

Which DEPENDS do I have to add where to compile u-boot-fslc incl. binman?

Best regards

Join { to automatically receive all group messages.