[U-Boot] [BUG] powerpc: tqm5200: does not compile with current HEAD

Heiko Schocher hs at denx.de
Mon Jan 23 10:08:26 CET 2017


Hello,

building powerpc based tqm5200 board fails with current HEAD
(at least on fedora host):

pollux:u-boot-tqm5200 hs [master] $ ./tools/buildman/buildman TQM5200S
boards.cfg is up to date. Nothing to do.
Building current source for 2 boards (2 threads, 4 jobs per thread)
    powerpc:  +   TQM5200S
+In file included from /usr/include/python2.7/pyconfig.h:6:0,
+                 from /usr/include/python2.7/Python.h:8,
+                 from tools/libfdt_wrap.c:147:
+/usr/include/python2.7/pyconfig-64.h:1202:0: Warnung: »_POSIX_C_SOURCE« redefiniert
+ #define _POSIX_C_SOURCE 200112L
+
+In file included from /usr/include/stdint.h:25:0,
+                 from /usr/lib/gcc/x86_64-redhat-linux/6.3.1/include/stdint.h:9,
+                 from include/compiler.h:19,
+                 from include/libfdt_env.h:12,
+                 from <Kommandozeile>:0:
+/usr/include/features.h:225:0: Anmerkung: dies ist die Stelle der vorherigen Definition
+ # define _POSIX_C_SOURCE 200809L
+/usr/include/python2.7/pyconfig-64.h:1224:0: Warnung: »_XOPEN_SOURCE« redefiniert
+ #define _XOPEN_SOURCE 600
+/usr/include/features.h:166:0: Anmerkung: dies ist die Stelle der vorherigen Definition
+ # define _XOPEN_SOURCE 700
+gcc: Fehler: nicht erkannte Kommandozeilenoption »-melf32ppclinux«
+error: command 'gcc' failed with exit status 1
+make[2]: *** [tools/_libfdt.so] Fehler 1
+make[1]: *** [tools] Fehler 2
+make: *** [sub-make] Fehler 2
[...]

Also no chance using ELDK ...

reverting patch:
1905c8fc711a: build: Always build the libfdt python module

and I can again build the TQM5200 board...

Hmm.. first I wonder, why do we need at all such things like SWIG
for a U-Boot build... ? Is this really needed?

Here the Code in tools/Makefile:
# Build a libfdt Python module if swig is available
# Use 'sudo apt-get install swig libpython-dev' to enable this
hostprogs-$(CONFIG_SPL_OF_PLATDATA) += \
         $(if $(shell which swig 2> /dev/null),_libfdt.so)
_libfdt.so-sharedobjs += $(LIBFDT_OBJS)
libfdt:
[...]

Comment says we need swig *and* libpython-dev ... but the check is only
for "swig" ... What is when there is no "libpython-dev" ?

Like on fedora:
# dnf install libpython-dev Last metadata expiration check: 1:50:58 ago on Mon Jan 23 07:49:26 2017.
No package libpython-dev available.
Error: Unable to find a match.

Ok, the following patch applied to mainline, and current HEAD of U-Boot
builds again for the tqm5200 board on my fedora host:

diff --git a/tools/Makefile b/tools/Makefile
index a609d05..a8a5599 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -112,7 +112,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),_libfdt.so)
+       $(if $(shell which swig libpython-dev 2> /dev/null),_libfdt.so)
  _libfdt.so-sharedobjs += $(LIBFDT_OBJS)
  libfdt:

Any comments? Ideas?

bye,
Heiko
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list