Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem compiling programs vith va_list stuff.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
spinlock
n00b
n00b


Joined: 24 Jan 2003
Posts: 6

PostPosted: Fri Jan 24, 2003 4:09 am    Post subject: Problem compiling programs vith va_list stuff. Reply with quote

Hello, since today I have a problem to compile sources that use va_list stuff (kernel is one).

It seems that have a problem to locate stdarg.h file header, with contains va_list's base data struct.

This is an example of erros message compiling linux-2.4.20 (xfs-sources):

Quote:

main linux-2.4.20-xfs_pre5 # make bzImage
scripts/split-include include/linux/autoconf.h include/config
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-xfs_pre5/include -Wall -Wstrict-prototypes -Wno-trigraphs -O3 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -Os -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
. scripts/mkversion > .tmpversion
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-xfs_pre5/include -Wall -Wstrict-prototypes -Wno-trigraphs -O3 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -Os -DUTS_MACHINE='"i386"' -DKBUILD_BASENAME=version -c -o init/version.o init/version.c
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-xfs_pre5/include -Wall -Wstrict-prototypes -Wno-trigraphs -O3 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -Os -DKBUILD_BASENAME=do_mounts -c -o init/do_mounts.o init/do_mounts.c
make CFLAGS="-D__KERNEL__ -I/usr/src/linux-2.4.20-xfs_pre5/include -Wall -Wstrict-prototypes -Wno-trigraphs -O3 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -Os " -C kernel
make[1]: Entering directory `/usr/src/linux-2.4.20-xfs_pre5/kernel'
make all_targets
make[2]: Entering directory `/usr/src/linux-2.4.20-xfs_pre5/kernel'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.20-xfs_pre5/include -Wall -Wstrict-prototypes -Wno-trigraphs -O3 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -Os -nostdinc -iwithprefix include -DKBUILD_BASENAME=sched -fno-omit-frame-pointer -c -o sched.o sched.c
In file included from /usr/src/linux-2.4.20-xfs_pre5/include/linux/wait.h:13,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/fs.h:12,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/sched.h:9,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/mm.h:4,
from sched.c:23:
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:10:20: stdarg.h: No such file or directory
In file included from /usr/src/linux-2.4.20-xfs_pre5/include/linux/wait.h:13,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/fs.h:12,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/capability.h:17,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/binfmts.h:5,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/sched.h:9,
from /usr/src/linux-2.4.20-xfs_pre5/include/linux/mm.h:4,
from sched.c:23:
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:74: parse error before "va_list"
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:74: warning: function declaration isn't a prototype
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:77: parse error before "va_list"
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:77: warning: function declaration isn't a prototype
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:81: parse error before "va_list"
/usr/src/linux-2.4.20-xfs_pre5/include/linux/kernel.h:81: warning: function declaration isn't a prototype
make[2]: *** [sched.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.20-xfs_pre5/kernel'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.20-xfs_pre5/kernel'
make: *** [_dir_kernel] Error 2



Looking for stdarg.h file from my hard disk i found some files with this name on:

Quote:

main linux-2.4.20-xfs_pre5 # find / -name "stdarg.h"
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include/stdarg.h
/var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/gcc/ginclude/stdarg.h
/var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/libstdc++-v3/include/c_compatibility/stdarg.h
/var/tmp/portage/gcc-3.2.1-r6/work/gcc-3.2.1/libstdc++-v3/include/c_shadow/stdarg.h
/var/tmp/portage/gcc-3.2.1-r6/work/build/gcc/include/stdarg.h


I tried to link one of this files on /usr/include but it doesn work, i tried linking it to kernel source include directory but it fails too with same messaje....

I dont know where is the problem. Thz for help and escuse my poor english :(
Back to top
View user's profile Send private message
spinlock
n00b
n00b


Joined: 24 Jan 2003
Posts: 6

PostPosted: Fri Jan 24, 2003 5:10 am    Post subject: Reply with quote

It worked now adding "-I/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1/include" on KENREL_CFLAG in kernel main Makefile :-)
_________________
---------------------------
Albert Puigsech Galicia
---------------------------
Back to top
View user's profile Send private message
shaniac
n00b
n00b


Joined: 27 Jun 2002
Posts: 23

PostPosted: Fri Feb 14, 2003 2:46 am    Post subject: Thank you very much. Reply with quote

I just bought a new motherboard, and I need to compile a kernel, and I couldn't!
Now I can.
Thank you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum