[U-Boot-Users] build failure in tools - missing CFG_ENV_SIZE ?

All,
after getting a clean u-boot clone (1.3.3 today) I get a compile error in "tools" subdir.
I've tried 2 different boards making a "TQM5200_config" and "MPC8349ITX_config" - just to make sure ...
"make CROSS_COMPILE=ppc_6xx- "
cross-compiler is gcc 4.0 as shipped with ELDK 4.1.
Am I missing something ?
Since environment.c includes config.h which pulls in board config everything should be fine.
Can someome help me out please ?
---- make[1]: Entering directory `/home/u-boot.git/tools' gcc -g -idirafter /home/u-boot.git/include -idirafter /home/u-boot.git/include2 -idirafter /home/u-boot.git/include -DTEXT_BASE=0xFC000000 -DUSE_HOSTCC -c -o environment.o environment.c In file included from environment.c:30: /home/u-boot.git/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function) make[1]: *** [environment.o] Error 1 make[1]: Leaving directory `/home/u-boot.git/tools' make: *** [tools] Error 2
regards, Andre Schwarz
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

In message 484808EB.8060904@matrix-vision.de you wrote:
after getting a clean u-boot clone (1.3.3 today) I get a compile error in "tools" subdir.
I've tried 2 different boards making a "TQM5200_config" and "MPC8349ITX_config" - just to make sure ...
"make CROSS_COMPILE=3Dppc_6xx- "
cross-compiler is gcc 4.0 as shipped with ELDK 4.1.
Hm. Let's see:
-> MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... text data bss dec hex filename 326532 32456 315024 674012 a48dc ./u-boot Configuring for MPC8349ITX board... text data bss dec hex filename 217741 15388 223684 456813 6f86d ./u-boot
That's U-Boot 1.3.3-00117-g8155efb
Can someome help me out please ?
Sorry, I cannot reproduce the problem.
Best regards,
Wolfgang Denk

Wolfgang,
thanks for your verification. Trying to do it your way gives :
nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... In file included from environment.c:30: /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function) make[1]: *** [environment.o] Error 1 make: *** [tools] Error 2 ppc_6xx-size: './u-boot': No such file Configuring for MPC8349ITX board... In file included from environment.c:30: /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function) make[1]: *** [environment.o] Error 1 make: *** [tools] Error 2 ppc_6xx-size: './u-boot': No such file
Obviously it's a problem regarding include mechanism. Changing line 28 in common/environment.c ( <config.h> -> "../include/config.h") gives positive result :
nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... text data bss dec hex filename 326532 32464 315024 674020 a48e4 ./u-boot Configuring for MPC8349ITX board... text data bss dec hex filename 217741 15388 223684 456813 6f86d ./u-boot
Unfortunately I'm not a Makefile expert ... do you have any ideas ?
regards, Andre
Wolfgang Denk schrieb:
In message 484808EB.8060904@matrix-vision.de you wrote:
after getting a clean u-boot clone (1.3.3 today) I get a compile error in "tools" subdir.
I've tried 2 different boards making a "TQM5200_config" and "MPC8349ITX_config" - just to make sure ...
"make CROSS_COMPILE=3Dppc_6xx- "
cross-compiler is gcc 4.0 as shipped with ELDK 4.1.
Hm. Let's see:
-> MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... text data bss dec hex filename 326532 32456 315024 674012 a48dc ./u-boot Configuring for MPC8349ITX board... text data bss dec hex filename 217741 15388 223684 456813 6f86d ./u-boot
That's U-Boot 1.3.3-00117-g8155efb
Can someome help me out please ?
Sorry, I cannot reproduce the problem.
Best regards,
Wolfgang Denk
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

In message 4848ECB5.7020703@matrix-vision.de you wrote:
thanks for your verification. Trying to do it your way gives :
nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... In file included from environment.c:30: /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function)
So what exactly is the difference between your source tree and toolchain and mine?
Unfortunately I'm not a Makefile expert ... do you have any ideas ?
I don't see why or which changes would be necessary as it's working fine here...
Best regards,
Wolfgang Denk

Wolfgang Denk schrieb:
In message 4848ECB5.7020703@matrix-vision.de you wrote:
thanks for your verification. Trying to do it your way gives :
nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... In file included from environment.c:30: /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function)
So what exactly is the difference between your source tree and toolchain and mine?
I'm running ELDK 4.1 and latest u-boot from git.
Unfortunately I'm not a Makefile expert ... do you have any ideas ?
I don't see why or which changes would be necessary as it's working fine here...
How am I supposed to know if you do not ? :-( I'll stick to the local change of the #include statement.
Best regards,
Wolfgang Denk
cheers, Andre
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

Hi Andre,
u-boot-users-bounces@lists.sourceforge.net wrote on :
Wolfgang Denk schrieb:
In message 4848ECB5.7020703@matrix-vision.de you wrote:
thanks for your verification. Trying to do it your way gives :
nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... In file included from environment.c:30: /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function)
I'm also able to build (top of) U-Boot for the TQM5200 with ELDK4.1:
mkr@tq-sewsrv-4:~/git/u-boot_denx> echo $CROSS_COMPILE ppc_82xx- mkr@tq-sewsrv-4:~/git/u-boot_denx> ./MAKEALL TQM5200 Configuring for TQM5200 board... md5.c: In function `MD5Update': md5.c:95: warning: implicit declaration of function `memmove' md5.c: In function `MD5Final': md5.c:143: warning: implicit declaration of function `memset' sha1.c: In function `sha1_update': sha1.c:249: warning: implicit declaration of function `memcpy' sha1.c: In function `sha1_hmac': sha1.c:360: warning: implicit declaration of function `memset' text data bss dec hex filename 326532 32456 315024 674012 a48dc ./u-boot mkr@tq-sewsrv-4:~/git/u-boot_denx>
I don't know, why I get the warnings (they appeared first several weeks ago, and I get it for every build, since then). But since the resulting U-Boot runs fine, there was no pressure (and no time) to dig for the reason of the warnings ...
Best Regards, Martin Krause
-- TQ-Systems GmbH Muehlstrasse 2, Gut Delling, D-82229 Seefeld Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913 Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl http://www.tq-group.com

Martin,
thanks for the info. The misbehaviour surely has its cause on my system setup.
I simply don't know why ... it's driving me mad.
Just wanted to port another board from my local v1.3.1 and submit a patch during this merge window. But the e1000 driver isn't working anymore. Making a diff gives "files are identical".
There's something utterly wrong ... time to go home and prepare for soccer :-(
cheers, Andre
Martin Krause schrieb:
Hi Andre,
u-boot-users-bounces@lists.sourceforge.net wrote on :
Wolfgang Denk schrieb:
In message 4848ECB5.7020703@matrix-vision.de you wrote:
thanks for your verification. Trying to do it your way gives :
nova u-boot-clean # CROSS_COMPILE=ppc_6xx- sh MAKEALL TQM5200 MPC8349ITX Configuring for TQM5200 board... In file included from environment.c:30: /home/u-boot-clean/include/environment.h:107: error: 'CFG_ENV_SIZE' undeclared here (not in a function)
I'm also able to build (top of) U-Boot for the TQM5200 with ELDK4.1:
mkr@tq-sewsrv-4:~/git/u-boot_denx> echo $CROSS_COMPILE ppc_82xx- mkr@tq-sewsrv-4:~/git/u-boot_denx> ./MAKEALL TQM5200 Configuring for TQM5200 board... md5.c: In function `MD5Update': md5.c:95: warning: implicit declaration of function `memmove' md5.c: In function `MD5Final': md5.c:143: warning: implicit declaration of function `memset' sha1.c: In function `sha1_update': sha1.c:249: warning: implicit declaration of function `memcpy' sha1.c: In function `sha1_hmac': sha1.c:360: warning: implicit declaration of function `memset' text data bss dec hex filename 326532 32456 315024 674012 a48dc ./u-boot mkr@tq-sewsrv-4:~/git/u-boot_denx>
I don't know, why I get the warnings (they appeared first several weeks ago, and I get it for every build, since then). But since the resulting U-Boot runs fine, there was no pressure (and no time) to dig for the reason of the warnings ...
Best Regards, Martin Krause
-- TQ-Systems GmbH Muehlstrasse 2, Gut Delling, D-82229 Seefeld Amtsgericht Muenchen, HRB 105 018, UST-IdNr. DE 811 607 913 Geschaeftsfuehrer: Dipl.-Ing. (FH) Detlef Schneider, Dipl.-Ing. (FH) Ruediger Stahl http://www.tq-group.com
MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090 Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

Hello,
in message 47F3F98010FF784EBEE6526EAAB078D10635DFDE@tq-mailsrv.tq-net.de you wrote:
I don't know, why I get the warnings (they appeared first several weeks ago, and I get it for every build, since then). But since the resulting U-Boot runs fine, there was no pressure (and no time) to dig for the reason of the warnings ...
Can you please check if this patch fixes the warnings? Thanks in advance.
diff --git a/lib_generic/md5.c b/lib_generic/md5.c index 78ef475..a9aae46 100644 --- a/lib_generic/md5.c +++ b/lib_generic/md5.c @@ -27,6 +27,8 @@
#ifndef USE_HOSTCC #include <common.h> +#else +#include <string.h> #endif /* USE_HOSTCC */ #include <watchdog.h> #include <linux/types.h> diff --git a/lib_generic/sha1.c b/lib_generic/sha1.c index c8ef4d2..a192e5f 100644 --- a/lib_generic/sha1.c +++ b/lib_generic/sha1.c @@ -31,6 +31,8 @@
#ifndef USE_HOSTCC #include <common.h> +#else +#include <string.h> #endif /* USE_HOSTCC */ #include <watchdog.h> #include <linux/string.h>
Viele Grüße,
Wolfgang Denk

Hello,
wd@denx.de wrote on Friday, June 06, 2008 2:28 PM:
I don't know, why I get the warnings (they appeared first several weeks ago, and I get it for every build, since then). But since the resulting U-Boot runs fine, there was no pressure (and no time) to dig for the reason of the warnings ...
Can you please check if this patch fixes the warnings? Thanks in advance.
diff --git a/lib_generic/md5.c b/lib_generic/md5.c index 78ef475..a9aae46 100644 --- a/lib_generic/md5.c +++ b/lib_generic/md5.c @@ -27,6 +27,8 @@
#ifndef USE_HOSTCC #include <common.h> +#else +#include <string.h> #endif /* USE_HOSTCC */ #include <watchdog.h> #include <linux/types.h> diff --git a/lib_generic/sha1.c b/lib_generic/sha1.c index c8ef4d2..a192e5f 100644 --- a/lib_generic/sha1.c +++ b/lib_generic/sha1.c @@ -31,6 +31,8 @@
#ifndef USE_HOSTCC #include <common.h> +#else +#include <string.h> #endif /* USE_HOSTCC */ #include <watchdog.h> #include <linux/string.h>
This helped, thanks! With your patch I get a clean build:
mkr@tq-sewsrv-4:~/git/u-boot_denx> ./MAKEALL TQM5200 Configuring for TQM5200 board... text data bss dec hex filename 326532 32464 315024 674020 a48e4 ./u-boot mkr@tq-sewsrv-4:~/git/u-boot_denx>
But why did I get the warning without the patch and you not (both build with ELDK4.1 and top-of-U-Boot)?
Best Regards, Martin Krause

In message 47F3F98010FF784EBEE6526EAAB078D10635DFDF@tq-mailsrv.tq-net.de you wrote:
This helped, thanks! With your patch I get a clean build:
Good. So I will pull in that patch.
But why did I get the warning without the patch and you not (both build with ELDK4.1 and top-of-U-Boot)?
My build environment was Fedora 6 with gcc version 4.1.2; you most probably use a nother Linux distro and other tools.
Best regards,
Wolfgang Denk

In message 48492149.5020604@matrix-vision.de you wrote:
So what exactly is the difference between your source tree and toolchain and mine?
I'm running ELDK 4.1 and latest u-boot from git.
Me too. Also tried ELDK 4.0 and 4.2, with the same results.
I don't see why or which changes would be necessary as it's working fine here...
How am I supposed to know if you do not ? :-(
I guess it must be some local changes in your environment.
Best regards,
Wolfgang Denk
participants (3)
-
Andre Schwarz
-
Martin Krause
-
Wolfgang Denk