Skip to contentSkip to conversation

powerpc: tqm5200: does not compile with current HEAD

U-Boot Heiko Schocher 3 participants 4 messages Jan 23, 2017

lore
Share & tools
lore
#0 lore raw

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:

tools/Makefile +1 -1
index a609d05..a8a5599 100644
@@ -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

Signature · 2 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
#1 lore raw

Hi Heiko,

Quoted 83 lines · Heiko Schocher

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

(quoted diff) +4 -0
+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

(quoted diff) +3 -0
+
+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,

(quoted diff) +4 -0
+                 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

(quoted diff) +5 -0
+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:

tools/Makefile +0 -0
index a609d05..a8a5599 100644
@@ -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 += \

tools/Makefile +1 -1
-       $(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:
Quoted 1 line

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

#2 lore raw
Quoted 72 lines · Simon Glass

Hi Heiko,

Quoted 69 lines · Heiko Schocher

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

(quoted diff) +4 -0
+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

(quoted diff) +3 -0
+
+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,

(quoted diff) +4 -0
+                 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

(quoted diff) +5 -0
+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:

Quoted 11 lines

tools/Makefile fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o · line 115

Quoted 11 lines
tools/Makefile +0 -0
index a609d05..a8a5599 100644
@@ -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 += \

tools/Makefile +1 -1
-       $(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 :)

Quoted 7 lines
Quoted 4 lines

_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.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170123/78f3d7b6/attachment.sig>
#3 lore raw

Hi Tom,

Quoted 103 lines · Tom Rini
Quoted 72 lines · Simon Glass

Hi Heiko,

Quoted 69 lines · Heiko Schocher

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

(quoted diff) +4 -0
+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

(quoted diff) +3 -0
+
+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,

(quoted diff) +4 -0
+                 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

(quoted diff) +5 -0
+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:

Quoted 11 lines

tools/Makefile fit_check_sign-objs := $(dumpimage-mkimage-objs) fit_check_sign.o · line 115

Quoted 11 lines
tools/Makefile +0 -0
index a609d05..a8a5599 100644
@@ -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 += \

tools/Makefile +1 -1
-       $(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 :)

Quoted 7 lines
Quoted 4 lines

_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

Quoted 1 line

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