[U-Boot] mkenvimage.c:119:35: error: ‘PLAIN_VERSION’ undeclared
Ed Swarthout
ed.swarthout at nxp.com
Tue May 29 23:51:42 UTC 2018
I'm not sure why mkenvimage.c is expecting the system include path to have u-boot's version.h, but it is causing the subject error message if it contains someone elses. See:
$ echo '#error Should not include /usr/local/include/version.h' > /usr/local/include/version.h
$ make O=/home/ed/bsp/build/uboot_sand sandbox_defconfig
$ make O=/home/ed/bsp/build/uboot_sand
make[1]: Entering directory '/f/deb/files/bsp/build/uboot_sand'
CHK include/config/uboot.release
Using /f/deb/files/bsp/git/u-boot as source for U-Boot
GEN ./Makefile
CHK include/generated/version_autogenerated.h
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CHK include/generated/generic-asm-offsets.h
HOSTCC tools/mkenvimage.o
In file included from /f/deb/files/bsp/git/u-boot/tools/mkenvimage.c:25:0:
/usr/local/include/version.h:1:2: error: #error Should not include /usr/local/include/version.h
#error Should not include /usr/local/include/version.h
^
/f/deb/files/bsp/git/u-boot/tools/mkenvimage.c: In function ‘main’:
/f/deb/files/bsp/git/u-boot/tools/mkenvimage.c:119:35: error: ‘PLAIN_VERSION’ undeclared (first use in this function)
printf("%s version %s\n", prg, PLAIN_VERSION);
^
/f/deb/files/bsp/git/u-boot/tools/mkenvimage.c:119:35: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.host:114: recipe for target 'tools/mkenvimage.o' failed
make[2]: *** [tools/mkenvimage.o] Error 1
/f/deb/files/bsp/git/u-boot/Makefile:1372: recipe for target 'tools' failed
make[1]: *** [tools] Error 2
make[1]: Leaving directory '/f/deb/files/bsp/build/uboot_sand'
Makefile:148: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
This has been here for awhile and is in current master.
I'm not sure why it was done this way, so I'm hesitate to provide a fix.
Ed Swarthout
More information about the U-Boot
mailing list