[U-Boot-Users] Error building 1.0

I am trying to build u-boot-1.0.0 for the dbau1x00 platform with gcc-2.95.4 and get the following error:
mipsel-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xbfc00000 -I/home/eokerson/AMD/u-boot-1.0.0/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/mipsel-linux/2.95.4/include -pipe -DCONFIG_MIPS -D__MIPS__ -EB -mabicalls -Wall -Wstrict-prototypes -c -o vsprintf.o vsprintf.c vsprintf.c: In function `vsprintf': vsprintf.c:194: `__PTRDIFF_TYPE__' undeclared (first use in this function) vsprintf.c:194: (Each undeclared identifier is reported only once vsprintf.c:194: for each function it appears in.) vsprintf.c:194: parse error before `args' vsprintf.c:194: parse error before `args' vsprintf.c:194: warning: left-hand operand of comma expression has no effect vsprintf.c:210: parse error before `args' vsprintf.c:210: parse error before `args' vsprintf.c:210: warning: left-hand operand of comma expression has no effect vsprintf.c:231: parse error before `args' vsprintf.c:231: parse error before `args' vsprintf.c:231: warning: left-hand operand of comma expression has no effect vsprintf.c:237: parse error before `args' vsprintf.c:237: parse error before `args' vsprintf.c:237: warning: left-hand operand of comma expression has no effect vsprintf.c:258: parse error before `args' vsprintf.c:258: parse error before `args' vsprintf.c:258: warning: left-hand operand of comma expression has no effect vsprintf.c:265: parse error before `args' vsprintf.c:265: parse error before `args' vsprintf.c:265: warning: left-hand operand of comma expression has no effect vsprintf.c:268: parse error before `args' vsprintf.c:268: parse error before `args' vsprintf.c:268: warning: left-hand operand of comma expression has no effect vsprintf.c:303: parse error before `args' vsprintf.c:303: parse error before `args' vsprintf.c:303: warning: left-hand operand of comma expression has no effect vsprintf.c:305: parse error before `args' vsprintf.c:305: parse error before `args' vsprintf.c:305: warning: left-hand operand of comma expression has no effect vsprintf.c:309: parse error before `args' vsprintf.c:309: parse error before `args' vsprintf.c:309: warning: left-hand operand of comma expression has no effect vsprintf.c:311: parse error before `args' vsprintf.c:311: parse error before `args' vsprintf.c:311: warning: left-hand operand of comma expression has no effect make[1]: *** [vsprintf.o] Error 1 make[1]: Leaving directory `/home/eokerson/AMD/u-boot-1.0.0/lib_generic' make: *** [subdirs] Error 1
Any suggestions on how to fix this would be greatly appreciated.
Ed Okerson

I tried the ELDK from www.denx.de and it compiles fine. With hardhat crosscompiler, I get the same error.
/Thomas
Ed Okerson wrote:
I am trying to build u-boot-1.0.0 for the dbau1x00 platform with gcc-2.95.4 and get the following error:
mipsel-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xbfc00000 -I/home/eokerson/AMD/u-boot-1.0.0/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/mipsel-linux/2.95.4/include -pipe -DCONFIG_MIPS -D__MIPS__ -EB -mabicalls -Wall -Wstrict-prototypes -c -o vsprintf.o vsprintf.c vsprintf.c: In function `vsprintf': vsprintf.c:194: `__PTRDIFF_TYPE__' undeclared (first use in this function) vsprintf.c:194: (Each undeclared identifier is reported only once vsprintf.c:194: for each function it appears in.) vsprintf.c:194: parse error before `args' vsprintf.c:194: parse error before `args' vsprintf.c:194: warning: left-hand operand of comma expression has no effect vsprintf.c:210: parse error before `args' vsprintf.c:210: parse error before `args' vsprintf.c:210: warning: left-hand operand of comma expression has no effect vsprintf.c:231: parse error before `args' vsprintf.c:231: parse error before `args' vsprintf.c:231: warning: left-hand operand of comma expression has no effect vsprintf.c:237: parse error before `args' vsprintf.c:237: parse error before `args' vsprintf.c:237: warning: left-hand operand of comma expression has no effect vsprintf.c:258: parse error before `args' vsprintf.c:258: parse error before `args' vsprintf.c:258: warning: left-hand operand of comma expression has no effect vsprintf.c:265: parse error before `args' vsprintf.c:265: parse error before `args' vsprintf.c:265: warning: left-hand operand of comma expression has no effect vsprintf.c:268: parse error before `args' vsprintf.c:268: parse error before `args' vsprintf.c:268: warning: left-hand operand of comma expression has no effect vsprintf.c:303: parse error before `args' vsprintf.c:303: parse error before `args' vsprintf.c:303: warning: left-hand operand of comma expression has no effect vsprintf.c:305: parse error before `args' vsprintf.c:305: parse error before `args' vsprintf.c:305: warning: left-hand operand of comma expression has no effect vsprintf.c:309: parse error before `args' vsprintf.c:309: parse error before `args' vsprintf.c:309: warning: left-hand operand of comma expression has no effect vsprintf.c:311: parse error before `args' vsprintf.c:311: parse error before `args' vsprintf.c:311: warning: left-hand operand of comma expression has no effect make[1]: *** [vsprintf.o] Error 1 make[1]: Leaving directory `/home/eokerson/AMD/u-boot-1.0.0/lib_generic' make: *** [subdirs] Error 1
Any suggestions on how to fix this would be greatly appreciated.
Ed Okerson
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

I guess I should have mentioned that I tried with the hardhat as well. I am not familiar with ELDK, I guess it's time to learn! While playing last night I found that if I put:
#define __PTRDIFF_TYPE__ long int
before the include of stdarg.h the file compiles fine. I tried to include stddef.h (where that define normally lives) but that caused all kinds of other errors. This is definately not a good fix, but I think the error is probably in the gcc headers.
Ed Okerson
On Tue, 11 Nov 2003, Thomas Lange wrote:
I tried the ELDK from www.denx.de and it compiles fine. With hardhat crosscompiler, I get the same error.
/Thomas
Ed Okerson wrote:
I am trying to build u-boot-1.0.0 for the dbau1x00 platform with gcc-2.95.4 and get the following error:
mipsel-linux-gcc -g -Os -D__KERNEL__ -DTEXT_BASE=0xbfc00000 -I/home/eokerson/AMD/u-boot-1.0.0/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/mipsel-linux/2.95.4/include -pipe -DCONFIG_MIPS -D__MIPS__ -EB -mabicalls -Wall -Wstrict-prototypes -c -o vsprintf.o vsprintf.c vsprintf.c: In function `vsprintf': vsprintf.c:194: `__PTRDIFF_TYPE__' undeclared (first use in this function) vsprintf.c:194: (Each undeclared identifier is reported only once vsprintf.c:194: for each function it appears in.) vsprintf.c:194: parse error before `args' vsprintf.c:194: parse error before `args' vsprintf.c:194: warning: left-hand operand of comma expression has no effect vsprintf.c:210: parse error before `args' vsprintf.c:210: parse error before `args' vsprintf.c:210: warning: left-hand operand of comma expression has no effect vsprintf.c:231: parse error before `args' vsprintf.c:231: parse error before `args' vsprintf.c:231: warning: left-hand operand of comma expression has no effect vsprintf.c:237: parse error before `args' vsprintf.c:237: parse error before `args' vsprintf.c:237: warning: left-hand operand of comma expression has no effect vsprintf.c:258: parse error before `args' vsprintf.c:258: parse error before `args' vsprintf.c:258: warning: left-hand operand of comma expression has no effect vsprintf.c:265: parse error before `args' vsprintf.c:265: parse error before `args' vsprintf.c:265: warning: left-hand operand of comma expression has no effect vsprintf.c:268: parse error before `args' vsprintf.c:268: parse error before `args' vsprintf.c:268: warning: left-hand operand of comma expression has no effect vsprintf.c:303: parse error before `args' vsprintf.c:303: parse error before `args' vsprintf.c:303: warning: left-hand operand of comma expression has no effect vsprintf.c:305: parse error before `args' vsprintf.c:305: parse error before `args' vsprintf.c:305: warning: left-hand operand of comma expression has no effect vsprintf.c:309: parse error before `args' vsprintf.c:309: parse error before `args' vsprintf.c:309: warning: left-hand operand of comma expression has no effect vsprintf.c:311: parse error before `args' vsprintf.c:311: parse error before `args' vsprintf.c:311: warning: left-hand operand of comma expression has no effect make[1]: *** [vsprintf.o] Error 1 make[1]: Leaving directory `/home/eokerson/AMD/u-boot-1.0.0/lib_generic' make: *** [subdirs] Error 1
Any suggestions on how to fix this would be greatly appreciated.
Ed Okerson
This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

In message Pine.LNX.4.44.0311110959290.9075-100000@dallas.texasconnect.net you wrote:
I guess I should have mentioned that I tried with the hardhat as well. I am not familiar with ELDK, I guess it's time to learn! While playing last night I found that if I put:
#define __PTRDIFF_TYPE__ long int
before the include of stdarg.h the file compiles fine. I tried to include stddef.h (where that define normally lives) but that caused all kinds of other errors. This is definately not a good fix, but I think the error is probably in the gcc headers.
U-Boot takes some care not to include any headers from the build host, the remaining headers are provided by the (cross) compiler. Normally, __PTRDIFF_TYPE__ gets defined by the stddef.h header file which belongs to the C compiler (normally to be found in ".../lib/gcc-lib/ppc-linux/?version?/include/stddef.h").
With the ELDK this contains:
#ifndef __PTRDIFF_TYPE__ #define __PTRDIFF_TYPE__ long int #endif
Check what your compiler defines there....
Best regards,
Wolfgang Denk
participants (3)
-
Ed Okerson
-
Thomas Lange
-
Wolfgang Denk