Skip to contentSkip to conversation

build failure in tools - missing CFG_ENV_SIZE ?

U-Boot-Users Andre Schwarz 3 participants 11 messages Jun 5, 2008 – Jun 6, 2008

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 10 lines · In message <[email protected]> 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

Quoted 1 line

Can someome help me out please ?

Sorry, I cannot reproduce the problem.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Virtue is a relative term.
	-- Spock, "Friday's Child", stardate 3499.1
#2 lore raw

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

Quoted 26 lines · Wolfgang Denk
Quoted 10 lines · In message <[email protected]> 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

Quoted 10 lines
Quoted 2 lines

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

#3 lore raw
Quoted 8 lines · In message <[email protected]> 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?

Quoted 1 line

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

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The C-shell doesn't parse. It adhoculates.
    - Casper.Dik at Holland.Sun.COM in <[email protected]>
#4 lore raw
Quoted 11 lines · Wolfgang Denk
Quoted 8 lines · In message <[email protected]> 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)

Quoted 4 lines

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.

Quoted 7 lines
Quoted 2 lines

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.

Quoted 5 lines

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

#5 lore raw

Hi Andre,

u-boot-users-bounces at lists.sourceforge.net wrote on :

Quoted 10 lines
Quoted 9 lines · Wolfgang Denk
Quoted 7 lines · In message <[email protected]> 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 at tq-sewsrv-4:~/git/u-boot_denx> echo $CROSS_COMPILE ppc_82xx-
mkr at 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 at 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

#6 lore raw

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

Quoted 45 lines · Martin Krause

Hi Andre,

u-boot-users-bounces at lists.sourceforge.net wrote on :

Quoted 5 lines
Quoted 3 lines · Wolfgang Denk

In message <[email protected]> you wrote:

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

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 at tq-sewsrv-4:~/git/u-boot_denx> echo $CROSS_COMPILE ppc_82xx-
mkr at 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 at 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

Quoted 7 lines

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

#10 lore raw
In reply to Andre Schwarz
Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 4 lines

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.

Quoted 4 lines
Quoted 3 lines

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

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The light at the end of the tunnel is usually a "No Exit" sign.
#7 lore raw
In reply to Martin Krause

Hello,

Quoted 5 lines · in message <[email protected]> you…

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.

lib_generic/md5.c +2 -0
index 78ef475..a9aae46 100644
@@ -27,6 +27,8 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#else
+#include <string.h>
 #endif /* USE_HOSTCC */
 #include <watchdog.h>
 #include <linux/types.h>
lib_generic/sha1.c +2 -0
index c8ef4d2..a192e5f 100644
@@ -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

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Any technology distinguishable from magic is insufficiently advanced.
#8 lore raw

Hello,

wd at denx.de wrote on Friday, June 06, 2008 2:28 PM:

Quoted 26 lines
Quoted 4 lines

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.

lib_generic/md5.c +2 -0
index 78ef475..a9aae46 100644
@@ -27,6 +27,8 @@
 
 #ifndef USE_HOSTCC
 #include <common.h>
+#else
+#include <string.h>
 #endif /* USE_HOSTCC */
 #include <watchdog.h>
 #include <linux/types.h>
lib_generic/sha1.c +0 -0
index c8ef4d2..a192e5f 100644

lib_generic/sha1.c line 38

Quoted 8 lines
lib_generic/sha1.c +2 -0
@@ -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 at 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 at 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

#9 lore raw
Quoted 2 lines · In message <[email protected]> you…

This helped, thanks! With your patch I get a clean build:

Good. So I will pull in that patch.

Quoted 2 lines

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

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I read part of it all the way through.