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

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

Hi Heiko,
On 23 January 2017 at 02:08, Heiko Schocher hs@denx.de wrote:
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?
I hit the same thing and fixed it with a local revert. I've just sent it as a patch.
Regards, Simon

On Mon, Jan 23, 2017 at 05:56:44AM -0700, Simon Glass wrote:
Hi Heiko,
On 23 January 2017 at 02:08, Heiko Schocher hs@denx.de wrote:
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)
Please note you can't use 'which' on a package name :)
_libfdt.so-sharedobjs += $(LIBFDT_OBJS) libfdt:
Any comments? Ideas?
I hit the same thing and fixed it with a local revert. I've just sent it as a patch.
I think we need to figure out why this is failing. Doing a revert just means that neither of your machines can build for configs/chromebit_mickey_defconfig configs/chromebook_jerry_defconfig configs/chromebook_minnie_defconfig configs/firefly-rk3288_defconfig configs/sandbox_spl_defconfig
as for those boards this would still become hostprogs-y.

Hi Tom,
On 23 January 2017 at 06:17, Tom Rini trini@konsulko.com wrote:
On Mon, Jan 23, 2017 at 05:56:44AM -0700, Simon Glass wrote:
Hi Heiko,
On 23 January 2017 at 02:08, Heiko Schocher hs@denx.de wrote:
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)
Please note you can't use 'which' on a package name :)
_libfdt.so-sharedobjs += $(LIBFDT_OBJS) libfdt:
Any comments? Ideas?
I hit the same thing and fixed it with a local revert. I've just sent it as a patch.
I think we need to figure out why this is failing. Doing a revert just means that neither of your machines can build for configs/chromebit_mickey_defconfig configs/chromebook_jerry_defconfig configs/chromebook_minnie_defconfig configs/firefly-rk3288_defconfig configs/sandbox_spl_defconfig
as for those boards this would still become hostprogs-y.
In my case I only have problems with powerpc. Maybe we can continue the discussion on the revert, and hopefully someone has an idea on what is going on.
Regards, Simon
participants (3)
-
Heiko Schocher
-
Simon Glass
-
Tom Rini