LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux 2.6.10.x+ compile issues (https://www.linuxquestions.org/questions/linux-software-2/linux-2-6-10-x-compile-issues-339498/)

VeryFrustrated 07-03-2005 12:01 AM

Linux 2.6.10.x+ compile issues
 
Ok, problem is quite simple, I just can't solve it :( 2.6.9 worked perfectly. With no changes, 2.6.10+ does not compile. Always some kind of include or Error 2 in make. I only have the exact error text from 2.6.12.2, but it's pretty much the same as all of them.



CC arch/i386/kernel/asm-offsets.s
In file included from include/asm/system.h:5,
from include/asm/processor.h:18,
from include/asm/thread_info.h:17,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/kernel.h:10:20: stdarg.h: No such file or directory
In file included from include/asm/system.h:5,
from include/asm/processor.h:18,
from include/asm/thread_info.h:17,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:45,
from include/linux/sched.h:7,
from arch/i386/kernel/asm-offsets.c:7:
include/linux/kernel.h:94: error: syntax error before "va_list"
include/linux/kernel.h:98: error: syntax error before "va_list"
include/linux/kernel.h:102: error: syntax error before "va_list"
include/linux/kernel.h:107: error: syntax error before "va_list"
include/linux/kernel.h:119: error: syntax error before "va_list"
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [arch/i386/kernel/asm-offsets.s] Error 2


i've grabbed updated and current kernel-headers, current source, mutiple packages, checked config options, updated system, and since 2.6.9 nothing has worked. System is debian sarge atm, upgraded from testing, which had the same problem.

I'm out of ideas. Nothing works. Any ideas? or maybe i'll just stick to 2.6.9 forever.

foo_bar_foo 07-03-2005 05:19 PM

your compiler is broken
did you move its files around or something ?

VeryFrustrated 07-05-2005 08:04 PM

Nope. 2.6.9 still compiles perfectly, in fact, while nothing post 2.6.9 does. If something got moved, it's something apt did that affects only 2.6.10+. Everything else works. That's what puzzles me the most, how whatever happened only breaks 2.6.10+. All versions correct, everything updated properly, and I'm most puzzled. I'm pretty sure i'm missing something that changed in the kernel, but I've not had the mountain of time i'd need to figure what. Given my current schedule, i'll work it out by the time 2.8 or 3.0 is released, so I'm not too worried about it. Just hopeing someone had a useful idea.

foo_bar_foo 07-05-2005 11:00 PM

Re: Linux 2.6.10.x+ compile issues
 
Quote:

Originally posted by VeryFrustrated

include/linux/kernel.h:10:20: stdarg.h: No such file or directory

above is the error
i let you follow my reasoning

the entire includes section in include/linux/kernel.h is the same for all those versions earlier or later.

my point is this stdarg.h is not a kernel file but rather a gcc file mine is
/usr/lib/gcc/i686-pc-linux-gnu/3.4.1/include/stdarg.h

since the path to these files is hard coded into gcc must be a gcc thing
so i look at kernel Makefiles to see if they call gcc differently and no they are the same as well

so something in your gcc setup has gone wrong

you can most likely get the kernel to compile by adding (make actual path correct for gcc version) -I/usr/lib/gcc-lib/i486-lib/x.x.x to the variable CPPFLAGS in the kernel Makefile
but that's a terrible hack and really you should fix your compiler

debian has a very comlex compilers settup it's been a long time for me but i remember multiple versions of gcc with the actual base compiler just called gcc
and other are add on ?? and their header files in
/usr/lib/gcc-lib/i486-lib/x.x.x
i think i even remember add on compilers headers in subdirs to the base or something

now like i said earlier these header locations are hard coded into the gcc executable but as relative to the position of the executable itself so
gcc -v can tell you where it's files are
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
take away specs and add include and there you should find stdarg.h
but just having it there is not enough -- it needs to be the right set of files

so i think we might be able to diagnose unless the debian packages are just broken or you keep a mixed system and apt has gotten confused

so show us
ls -l /usr/bin | grep gcc
and
ls -R /usr/lib/gcc-lib/
and the output from
which gcc
and
gcc -v
and from
echo $CC
to start with if you feel like it


All times are GMT -5. The time now is 08:02 AM.