uboot build fails with dtc >1.4.5
Using dtc >1.4.5 (in Arch Linux official repo, but due to hit Debian repos at some point..), build_uboot.sh ultimately fails.
If I roll back to 1.4.5 it works fine, but 1.4.6 and 1.4.7 fail.
The actual failure output is quite long, this is just the first few and last few lines:
In file included from tools/../include/libfdt.h:54,
from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/fit_image.c:17:
/usr/include/libfdt_env.h:71:30: error: conflicting types for ‘fdt64_t’
typedef uint64_t FDT_BITWISE fdt64_t;
^~~~~~~
In file included from <command-line>:
././include/libfdt_env.h:19:16: note: previous declaration of ‘fdt64_t’ was here
typedef __be64 fdt64_t;
^~~~~~~
In file included from ././include/libfdt_env.h:12,
from <command-line>:
/usr/include/libfdt_env.h:91:24: error: expected ‘)’ before ‘x’
static inline uint32_t fdt32_to_cpu(fdt32_t x)
^~~~~~~~~~~~
././include/compiler.h:71:9: error: expected ‘)’ before ‘&’ token
((((x) & 0xff000000) >> 24) | \
^
././include/compiler.h:71:23: error: expected ‘)’ before ‘>>’ token
((((x) & 0xff000000) >> 24) | \
^~
././include/compiler.h:71:30: error: expected ‘)’ before ‘|’ token
((((x) & 0xff000000) >> 24) | \
^
................
In file included from include/image.h:55,
from tools/fit_common.h:12,
from tools/fit_image.c:18:
/usr/include/libfdt.h:1606:19: error: redefinition of ‘fdt_setprop_u64’
static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char *name,
^~~~~~~~~~~~~~~
In file included from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/fit_image.c:17:
tools/../include/libfdt.h:1502:19: note: previous definition of ‘fdt_setprop_u64’ was here
static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char *name,
^~~~~~~~~~~~~~~
In file included from include/image.h:55,
from tools/fit_common.h:12,
from tools/fit_image.c:18:
/usr/include/libfdt.h:1618:19: error: redefinition of ‘fdt_setprop_cell’
static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
^~~~~~~~~~~~~~~~
In file included from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/fit_image.c:17:
tools/../include/libfdt.h:1514:19: note: previous definition of ‘fdt_setprop_cell’ was here
static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char *name,
^~~~~~~~~~~~~~~~
In file included from include/image.h:55,
from tools/fit_common.h:12,
from tools/fit_image.c:18:
/usr/include/libfdt.h:1743:19: error: redefinition of ‘fdt_appendprop_u32’
static inline int fdt_appendprop_u32(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~
In file included from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/fit_image.c:17:
tools/../include/libfdt.h:1609:19: note: previous definition of ‘fdt_appendprop_u32’ was here
static inline int fdt_appendprop_u32(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~
In file included from include/image.h:55,
from tools/fit_common.h:12,
from tools/fit_image.c:18:
/usr/include/libfdt.h:1778:19: error: redefinition of ‘fdt_appendprop_u64’
static inline int fdt_appendprop_u64(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~
In file included from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/fit_image.c:17:
tools/../include/libfdt.h:1644:19: note: previous definition of ‘fdt_appendprop_u64’ was here
static inline int fdt_appendprop_u64(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~
In file included from include/image.h:55,
from tools/fit_common.h:12,
from tools/fit_image.c:18:
/usr/include/libfdt.h:1790:19: error: redefinition of ‘fdt_appendprop_cell’
static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~~
In file included from tools/fdt_host.h:11,
from tools/imagetool.h:24,
from tools/fit_image.c:17:
tools/../include/libfdt.h:1656:19: note: previous definition of ‘fdt_appendprop_cell’ was here
static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
^~~~~~~~~~~~~~~~~~~
make[1]: *** [scripts/Makefile.host:116: tools/fit_image.o] Error 1
make: *** [Makefile:1257: tools] Error 2