[FS#659] uboot-kirkwood (at least) fails to build if swig is installed but python headers are not available
LEDE Bugs
lede-bugs at lists.infradead.org
Mon Mar 27 20:25:03 PDT 2017
A new Flyspray task has been opened. Details are below.
User who did this - Nathaniel Wesley Filardo (nwf)
Attached to Project - LEDE Project
Summary - uboot-kirkwood (at least) fails to build if swig is installed but python headers are not available
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Very Low
Reported Version - Trunk
Due in Version - Undecided
Due Date - Undecided
Details - Building LEDE head (reboot-3906-g2a2dfb2be7) on a machine without python development headers but with swig in $PATH yields
HOSTLD tools/dumpimage
HOSTCC tools/mkimage.o
HOSTLD tools/mkimage
swig -python -o tools/libfdt_wrap.c lib/libfdt/libfdt.swig
LDFLAGS="" python ./lib/libfdt/setup.py \
"-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -include ./include/libfdt_env.h -idirafterinclude -idirafter./arch/arm/include -I./lib/libfdt -I./tools -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES -D_GNU_SOURCE " lib/libfdt/fdt.c lib/libfdt/fdt_ro.c lib/libfdt/fdt_rw.c lib/libfdt/fdt_strerror.c lib/libfdt/fdt_wip.c lib/libfdt/fdt_region.c lib/libfdt/fdt_sw.c tools/libfdt_wrap.c
tools/libfdt_wrap.c:130:21: fatal error: Python.h: No such file or directory
# include
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
tools/Makefile:123: recipe for target 'tools/_libfdt.so' failed
make[5]: *** [tools/_libfdt.so] Error 1
Makefile:1229: recipe for target 'tools' failed
make[4]: *** [tools] Error 2
make[4]: Leaving directory '/tank/openwrt/scratch/builder-nwftest/build_dir/target-arm_xscale_musl_eabi/u-boot-pogo_v4/u-boot-2017.03'
As I don't believe there are any in-tree consumers of the python libfdt bindings, adding the following patch file, which just removes the test for swig and therefore acts as if it is never present, should do the right thing:
$ cat package/boot/uboot-kirkwood/patches/201-no-python-fdt.patch
--- u-boot-2017.03/tools/Makefile.orig 2017-03-28 03:11:34.081325904 +0000
+++ u-boot-2017.03/tools/Makefile 2017-03-28 03:13:09.225349051 +0000
@@ -112,10 +112,6 @@
fit_info-objs := $(dumpimage-mkimage-objs) fit_info.o
fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o
-# Build a libfdt Python module if swig is available
-# Use 'sudo apt-get install swig libpython-dev' to enable this
-hostprogs-y += \
- $(if $(shell which swig 2> /dev/null),_libfdt.so)
_libfdt.so-sharedobjs += $(LIBFDT_OBJS)
libfdt:
More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=659
More information about the lede-bugs
mailing list