public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Nishanth Menon <menon.nishanth@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] U-Boot V2: error: unable to open 'stdarg.h'
Date: Wed, 30 Apr 2008 21:57:23 -0500	[thread overview]
Message-ID: <48193193.30508@gmail.com> (raw)

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

             reply	other threads:[~2008-05-01  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-01  2:57 Nishanth Menon [this message]
2008-05-01 10:47 ` [U-Boot-Users] U-Boot V2: error: unable to open 'stdarg.h' Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48193193.30508@gmail.com \
    --to=menon.nishanth@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox