
Hi Simon,
With the EOL of python2 soon I've been looking at the Fedora U-Boot builds to see what it would take to move over to python3. There's a couple of issues building the bundled pylibfdt, the first is the Makefile hard codes python2, the second is that the generated libfdt_wrap.c doesn't seem to find the python3 version of Python.h (errors below).
It seems upstream now supports building pylibfdt with dtc 1.5.0 but I couldn't quite work out how this fits into the U-Boot bundled version. Is there plans to be able to support pylibfdt with python3?
Regards, Peter
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -o scripts/dtc/dtc scripts/dtc/dtc.o scripts/dtc/flattree.o scripts/dtc/fstree.o scripts/dtc/data.o scripts/dtc/livetree.o scripts/dtc/treesource.o scripts/dtc/srcpos.o scripts/dtc/checks.o scripts/dtc/util.o scripts/dtc/dtc-lexer.lex.o scripts/dtc/dtc-parser.tab.o BUILDSTDERR: set -e; : ' CHK include/generated/generic-asm-offsets.h'; mkdir -p include/generated/; (set -e; echo "#ifndef __GENERIC_ASM_OFFSETS_H__"; echo "#define __GENERIC_ASM_OFFSETS_H__"; echo "/*"; echo " * DO NOT MODIFY."; echo " *"; echo " * This file was generated by Kbuild"; escripts/dtc/pylibfdt/libfdt_wrap.c:154:11: fatal error: Python.h: No such file or directory BUILDSTDERR: 154 | # include <Python.h> BUILDSTDERR: | ^~~~~~~~~~ BUILDSTDERR: compilation terminated. BUILDSTDERR: error: command 'gcc' failed with exit status 1 BUILDSTDERR: make[4]: *** [/builddir/build/BUILD/u-boot-2019.07-rc4/scripts/dtc/pylibfdt/Makefile:27: scripts/dtc/pylibfdt/_libfdt.so] Error 1 BUILDSTDERR: make[3]: *** [/builddir/build/BUILD/u-boot-2019.07-rc4/scripts/Makefile.build:432: scripts/dtc/pylibfdt] Error 2 BUILDSTDERR: make[2]: *** [/builddir/build/BUILD/u-boot-2019.07-rc4/scripts/Makefile.build:432: scripts/dtc] Error 2 BUILDSTDERR: make[1]: *** [/builddir/build/BUILD/u-boot-2019.07-rc4/Makefile:528: scripts] Error 2 BUILDSTDERR: make: *** [Makefile:148: sub-make] Error 2 BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.Ca2SD2 (%build)