Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#659 - uboot-kirkwood (at least) fails to build if swig is installed but python headers are not available #5656

Open
openwrt-bot opened this issue Mar 28, 2017 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

nwf:

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:
@openwrt-bot
Copy link
Author

nwf:

Sorry, the git commit mentioned has some of my (unrelated) patches atop it. Upstream is reboot-3883-g2ebfdabfbd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant