* [U-Boot-Users] U-Boot V2: error: unable to open 'stdarg.h'
@ 2008-05-01 2:57 Nishanth Menon
2008-05-01 10:47 ` Nishanth Menon
0 siblings, 1 reply; 2+ messages in thread
From: Nishanth Menon @ 2008-05-01 2:57 UTC (permalink / raw)
To: u-boot
Hi Folks,
Been stumped with the sandbox a bit on getting sparse to check code,
with the issue being very similar to the thread here:
http://lkml.org/lkml/2005/5/17/222 though was unable to trace the thread
to a conclusion to the specific problem itself. other than pointing at a
bug in kbuild system as per http://lkml.org/lkml/2005/5/18/293. But
U-boot version of kbuild does really seem to do "gcc
--print-file-name=include"
Commands:
make sandbox_defconfig
make V=1 C=2
<snip>
sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise
-nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include
-Wp,-MD,common/.hush.o.d -nostdinc -isystem
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/include -D__KERNEL__ -D__U_BOOT__
-Iinclude -include include/linux/autoconf.h -fno-builtin -ffreestanding
-nostdinc -Wall -pipe -fno-strict-aliasing -P -fno-common -Os
-Dmalloc=u_boot_malloc -Dfree=u_boot_free -Drealloc=u_boot_realloc
-Dread=u_boot_read -Dwrite=u_boot_write -Dopen=u_boot_open
-Dclose=u_boot_close -Dlseek=u_boot_lseek -Dperror=u_boot_perror
-Derrno=u_boot_errno -Dgetc=u_boot_getc -Dputc=u_boot_putc
-Dfgetc=u_boot_fgetc -Dfputc=u_boot_fputc -Dfgets=u_boot_fgets
-Dfputs=u_boot_fputs -Dsetenv=u_boot_setenv -Dgetenv=u_boot_getenv
-Dprintf=u_boot_printf -Dglob=u_boot_glob -Dglobfree=u_boot_globfree -g
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hush)"
-D"KBUILD_MODNAME=KBUILD_STR(hush)" common/hush.c ;
include/stdio.h:4:11: error: unable to open 'stdarg.h'
make[1]: *** [common/hush.o] Error 1
make: *** [common] Error 2
Strace says:
<snip>
open("include/stdio.h", O_RDONLY) = 4
read(4, "#ifndef __STDIO_H\n#define __STDI"..., 8192) = 1151
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fcfa8604000
mmap(NULL, 32768, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7fcfa85fc000
read(4, "", 8192) = 0
close(4) = 0
open("include/stdarg.h", O_RDONLY) = -1 ENOENT (No such file or
directory)
write(2, "include/stdio.h:4:11: error: una"..., 55include/stdio.h:4:11:
error: unable to open 'stdarg.h'
If I do a 'ln -s /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include/stdarg.h
include/' it goes thru this specific issue. the next issue is that it
compiles on a 32bit FC5, but fails on 64bit Ubuntu8.04.
Version of U-Boot V2: latest in git.
machine, gcc and sparse versions:
uname -a: Linux xxxxx 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC
2008 x86_64 GNU/Linux
gcc --version: gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Sparse: tried with 2 of them:
[1] http://kernel.org/pub/software/devel/sparse/dist/sparse-0.4.1.tar.gz
[2]
http://www.codemonkey.org.uk/projects/git-snapshots/sparse/sparse-2008-05-01.tar.gz
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 2+ messages in thread
* [U-Boot-Users] U-Boot V2: error: unable to open 'stdarg.h'
2008-05-01 2:57 [U-Boot-Users] U-Boot V2: error: unable to open 'stdarg.h' Nishanth Menon
@ 2008-05-01 10:47 ` Nishanth Menon
0 siblings, 0 replies; 2+ messages in thread
From: Nishanth Menon @ 2008-05-01 10:47 UTC (permalink / raw)
To: u-boot
Nishanth Menon said the following on 04/30/2008 09:57 PM:
> Commands:
> make sandbox_defconfig
> make V=1 C=2
> <snip>
> sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise
> -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> -Wp,-MD,common/.hush.o.d -nostdinc -isystem
> /usr/lib/gcc/x86_64-linux-gnu/4.2.3/include -D__KERNEL__ -D__U_BOOT__
> -Iinclude -include include/linux/autoconf.h -fno-builtin -ffreestanding
> -nostdinc -Wall -pipe -fno-strict-aliasing -P -fno-common -Os
>
^^^^^^
> -Dmalloc=u_boot_malloc -Dfree=u_boot_free -Drealloc=u_boot_realloc
> -Dread=u_boot_read -Dwrite=u_boot_write -Dopen=u_boot_open
> -Dclose=u_boot_close -Dlseek=u_boot_lseek -Dperror=u_boot_perror
> -Derrno=u_boot_errno -Dgetc=u_boot_getc -Dputc=u_boot_putc
> -Dfgetc=u_boot_fgetc -Dfputc=u_boot_fputc -Dfgets=u_boot_fgets
> -Dfputs=u_boot_fputs -Dsetenv=u_boot_setenv -Dgetenv=u_boot_getenv
> -Dprintf=u_boot_printf -Dglob=u_boot_glob -Dglobfree=u_boot_globfree -g
> -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
> -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hush)"
> -D"KBUILD_MODNAME=KBUILD_STR(hush)" common/hush.c ;
> include/stdio.h:4:11: error: unable to open 'stdarg.h'
> make[1]: *** [common/hush.o] Error 1
> make: *** [common] Error 2
Just an update: two -nostdinc and one additional -isystem was removed
from the command line as marked above:
sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise
-Wp,-MD,common/.hush.o.d -nostdinc -isystem
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/include -D__KERNEL__ -D__U_BOOT__
-Iinclude -include include/linux/autoconf.h -fno-builtin -ffreestanding
-Wall -pipe -fno-strict-aliasing -P -fno-common -Os
-Dmalloc=u_boot_malloc -Dfree=u_boot_free -Drealloc=u_boot_realloc
-Dread=u_boot_read -Dwrite=u_boot_write -Dopen=u_boot_open
-Dclose=u_boot_close -Dlseek=u_boot_lseek -Dperror=u_boot_perror
-Derrno=u_boot_errno -Dgetc=u_boot_getc -Dputc=u_boot_putc
-Dfgetc=u_boot_fgetc -Dfputc=u_boot_fputc -Dfgets=u_boot_fgets
-Dfputs=u_boot_fputs -Dsetenv=u_boot_setenv -Dgetenv=u_boot_getenv
-Dprintf=u_boot_printf -Dglob=u_boot_glob -Dglobfree=u_boot_globfree -g
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(hush)"
-D"KBUILD_MODNAME=KBUILD_STR(hush)" common/hush.c ;
include/elf.h:374:5: warning: undefined preprocessor identifier 'ELF_CLASS'
include/glob.h:172:5: warning: undefined preprocessor identifier
'_FILE_OFFSET_BITS'
include/glob.h:185:5: warning: undefined preprocessor identifier
'_FILE_OFFSET_BITS'
common/hush.c:350:6: warning: symbol 'simple_itoa' was not declared.
Should it be static?
common/hush.c:898:13: warning: Using plain integer as NULL pointer
common/hush.c:898:27: warning: Using plain integer as NULL pointer
common/hush.c:1604:1: warning: symbol '__u_boot_cmd_sh' was not
declared. Should it be static?
common/hush.c:1634:1: warning: symbol '__u_boot_cmd_source' was not
declared. Should it be static?
Compiles fine. removing two nostdinc definition does not make sense
other than thinking as a gcc/sparse issue.. does anyone have some more
information on this?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-01 10:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-01 2:57 [U-Boot-Users] U-Boot V2: error: unable to open 'stdarg.h' Nishanth Menon
2008-05-01 10:47 ` Nishanth Menon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox