From 81d6bd62f17522b07fb17e65d27aa7ed3f57e059 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 30 Oct 2017 21:33:27 -0500 Subject: MLK-16729 tools: fix build break when libpython3-dev is installed The u-boot meets break, when host build server has installed swig and libpython3-dev, but no libpython-dev installed. tools/libfdt_wrap.c:147:21: fatal error: Python.h: No such file or directory The root cause is tools/makefile checks the Python.h before building a libfdt Python module. Since the u-boot is using "python" command not "python3", we should change to check the Python.h under python2.x directory not every python directory (like python3.x). Otherwise when a python3 develop package is installed, the script will get the file and start to build libfdt if swig is installed as well. Signed-off-by: Ye Li Acked-by: Peng Fan (cherry picked from commit ddb7c3d2730050d257d2d69dd84b88bfc798242b) --- tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index c1e46bbff0..1247999164 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -115,7 +115,7 @@ 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), $(if $(wildcard /usr/include/python*/Python.h),_libfdt.so)) + $(if $(shell which swig 2> /dev/null), $(if $(wildcard /usr/include/python2*/Python.h),_libfdt.so)) _libfdt.so-sharedobjs += $(LIBFDT_OBJS) libfdt: -- cgit v1.2.3