
Dear Jerry Van Baren,
In message 48B4B62E.5000301@gmail.com you wrote:
... tools/fdt_ro.c: In function 'fdt_path_offset': tools/fdt_ro.c:158: warning: implicit declaration of function 'fdt_getprop_namelen' tools/fdt_ro.c:158: warning: assignment makes pointer from integer without a cast tools/fdt_ro.c: At top level: tools/fdt_ro.c:281: error: conflicting types for 'fdt_getprop_namelen' tools/fdt_ro.c:158: error: previous implicit declaration of 'fdt_getprop_namelen' was here ...
...
??? I'm not seeing this, even with a fresh pull from the u-boot repository.
The function is declared in include/libfdt.h, properly in my copy.
The problem comes from tools/fdt_host.h which includes:
/* Make sure to include u-boot version of libfdt include files */ #include "../include/fdt.h" #include "../include/libfdt.h" #include "../include/fdt_support.h"
However, the actual compiler run looks like this:
make[1]: Entering directory `/home/wd/git/u-boot/work/tools' ln -s /home/wd/git/u-boot/work/tools/../libfdt/fdt.c /work/wd/tmp-ppc/tools/fdt.c ln -s /home/wd/git/u-boot/work/tools/../libfdt/fdt_ro.c /work/wd/tmp-ppc/tools/fdt_ro.c gcc -g -Wall -idirafter /home/wd/git/u-boot/work/include -idirafter /work/wd/tmp-ppc/include2 -idirafter /work/wd/tmp-ppc/include -DTEXT_BASE=0xFFFA0000 -DUSE_HOSTCC -O -c -o /work/wd/tmp-ppc/tools/fdt_ro.o /work/wd/tmp-ppc/tools/fdt_ro.c
and causes this:
... # 1 "/work/wd/tmp-ppc/tools/fdt_host.h" 1 # 24 "/work/wd/tmp-ppc/tools/fdt_host.h" # 1 "/usr/local/include/../include/fdt.h" 1 3 ... # 25 "/work/wd/tmp-ppc/tools/fdt_host.h" 2 # 1 "/usr/local/include/../include/libfdt.h" 1 3 # 54 "/usr/local/include/../include/libfdt.h" 3 ...
i. e. it includes the WRONG versions of the header files - not these from the U-Boot code, but from the host system.
The problem is the "-idirafter":
`-idirafter DIR' Search DIR for header files, but do it _after_ all directories specified with `-I' and the standard system directories have been exhausted. DIR is treated as a system include directory.
Hm... not sure how to fix this.
Best regards,
Wolfgang Denk