diff options
author | Ye Li <ye.li@nxp.com> | 2017-10-30 21:33:27 -0500 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2017-10-31 01:34:17 -0500 |
commit | 81d6bd62f17522b07fb17e65d27aa7ed3f57e059 (patch) | |
tree | cd2f622d5dad16d2e1bcb447ba3d30fe0d51152e | |
parent | c7f3b583a30bd53dbf89d6e69847276fd0fe5ab3 (diff) |
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 <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ddb7c3d2730050d257d2d69dd84b88bfc798242b)
-rw-r--r-- | tools/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
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: |