2003-02-16 16:52:48

by Rahul Vaidya

[permalink] [raw]
Subject: linux 2.5.53 not compiling

When I tried to "make bzImage" the 2.5.53 it gave me the following error

In file included from include/linux/spinlock.h:13,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/proc_fs.h:5,
from init/main.c:15:
include/linux/kernel.h:10:20: stdarg.h: No such file or directory

I am using gcc-3.2. And I did make menuconfig with default settings.

Please CC the Reply to my mail-id [email protected]

Tahnk you

--
Rahul Vaidya
Dept. of Computer Science and Automation
Indian Institute of Science
Bangalore

Room G46,
Hostel ph: 3942451


2003-02-16 16:58:27

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Sun, 16 Feb 2003, Rahul Vaidya wrote:

> When I tried to "make bzImage" the 2.5.53 it gave me the following error
>
> In file included from include/linux/spinlock.h:13,
> from include/linux/mmzone.h:8,
> from include/linux/gfp.h:4,
> from include/linux/slab.h:14,
> from include/linux/proc_fs.h:5,
> from init/main.c:15:
> include/linux/kernel.h:10:20: stdarg.h: No such file or directory
>
> I am using gcc-3.2. And I did make menuconfig with default settings.
>
> Please CC the Reply to my mail-id [email protected]

Could you try updating to 2.5.61, it is available at http://www.kernel.org with
mirrors at http://www.xx.kernel.org where xx is the country code of the mirror.

Zwane
--
function.linuxpower.ca

2003-02-16 17:00:59

by Russell King

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Sun, Feb 16, 2003 at 10:32:16PM +0530, Rahul Vaidya wrote:
> When I tried to "make bzImage" the 2.5.53 it gave me the following error
>
> In file included from include/linux/spinlock.h:13,
> from include/linux/mmzone.h:8,
> from include/linux/gfp.h:4,
> from include/linux/slab.h:14,
> from include/linux/proc_fs.h:5,
> from init/main.c:15:
> include/linux/kernel.h:10:20: stdarg.h: No such file or directory
>
> I am using gcc-3.2. And I did make menuconfig with default settings.

What does:

gcc -v -iwithprefix include -E - < /dev/null

tell you?

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2003-02-16 17:18:00

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

>>>Could you try updating to 2.5.61,

I am getting the same error even for 2.5.61

Please cc any replies to [email protected]

>
> > When I tried to "make bzImage" the 2.5.53 it gave me the following error
> >
> > In file included from include/linux/spinlock.h:13,
> > from include/linux/mmzone.h:8,
> > from include/linux/gfp.h:4,
> > from include/linux/slab.h:14,
> > from include/linux/proc_fs.h:5,
> > from init/main.c:15:
> > include/linux/kernel.h:10:20: stdarg.h: No such file or directory
> >
> > I am using gcc-3.2. And I did make menuconfig with default settings.
> >
> > Please CC the Reply to my mail-id [email protected]
>
> Could you try updating to 2.5.61, it is available at http://www.kernel.org with
> mirrors at http://www.xx.kernel.org where xx is the country code of the mirror.
>
> Zwane
> --
> function.linuxpower.ca
>

2003-02-16 17:34:19

by Russell King

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

Please copy replies back to lkml.

On Sun, Feb 16, 2003 at 10:43:01PM +0530, Rahul Vaidya wrote:
> the command is giving me the following:
>
> Reading specs from
> /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
> Thread model: posix
> gcc version 3.2
> /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/cpp0 -lang-c -v
> -iprefix /usr/local/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.2/
^^^^^^^^^^

It looks like gcc 3.2 thinks its compiler prefix is in a place where it
is not. I'd suggest you report this to the gcc people; at a guess, it
may be due to gcc getting confused during its configuration:

../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
^^^

> -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0
> -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux
> -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix
> -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1
> -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__
> -D__tune_pentiumpro__ -iwithprefix include -
>
> ignoring nonexistent directory "/usr/local/lib/gcc-lib/
> i686-pc-linux-gnu/3.2/include"
> GNU CPP version 3.2 (cpplib) (i386 Linux/ELF)
> ignoring nonexistent directory "/usr/local/lib/gcc-lib/
> i686-pc-linux-gnu/3.2/include"
> ignoring nonexistent directory "/usr/local/lib/gcc-lib/
> i686-pc-linux-gnu/3.2/../../../../i686-pc-linux-gnu/include"
> ignoring nonexistent directory "/usr/local/gcc-3.2/
> i686-pc-linux-gnu/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /usr/local/include
> /usr/local/gcc-3.2/include
> /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/include
> /usr/include
> End of search list.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2003-02-16 17:31:22

by John Levon

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Sun, Feb 16, 2003 at 10:57:50PM +0530, Rahul Vaidya wrote:

> I am getting the same error even for 2.5.61
>
> Please cc any replies to [email protected]

Have you made a softlink for gcc ? Apparently that doesn't work well
with recent gcc versions finding the headers...

john

2003-02-16 17:36:46

by Russell King

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Sun, Feb 16, 2003 at 05:41:18PM +0000, John Levon wrote:
> On Sun, Feb 16, 2003 at 10:57:50PM +0530, Rahul Vaidya wrote:
>
> > I am getting the same error even for 2.5.61
> >
> > Please cc any replies to [email protected]
>
> Have you made a softlink for gcc ? Apparently that doesn't work well
> with recent gcc versions finding the headers...

It looks like buggy gcc configuration scripts - some parts of the compiler
seems to believe its internal headers are one place, whereas other parts
believe they're elsewhere.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2003-02-16 18:01:27

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

Is there any way (for me) to change the configurations of gcc?


On Sun, 16 Feb 2003, Russell King wrote:

> On Sun, Feb 16, 2003 at 05:41:18PM +0000, John Levon wrote:
> > On Sun, Feb 16, 2003 at 10:57:50PM +0530, Rahul Vaidya wrote:
> >
> > > I am getting the same error even for 2.5.61
> > >
> > > Please cc any replies to [email protected]
> >
> > Have you made a softlink for gcc ? Apparently that doesn't work well
> > with recent gcc versions finding the headers...
>
> It looks like buggy gcc configuration scripts - some parts of the compiler
> seems to believe its internal headers are one place, whereas other parts
> believe they're elsewhere.
>
> --
> Russell King ([email protected]) The developer of ARM Linux
> http://www.arm.linux.org.uk/personal/aboutme.html
>
>

2003-02-16 18:00:33

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling



>> Have you made a softlink for gcc ? Apparently that doesn't work well
>> with recent gcc versions finding the headers...
>>
>> john

The gcc I was using is a softlink. So I aliased it to the actual file and
again tried "make bzImage". It dint work :(

2003-02-16 18:12:38

by Daniel Jacobowitz

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Sun, Feb 16, 2003 at 05:41:18PM +0000, John Levon wrote:
> On Sun, Feb 16, 2003 at 10:57:50PM +0530, Rahul Vaidya wrote:
>
> > I am getting the same error even for 2.5.61
> >
> > Please cc any replies to [email protected]
>
> Have you made a softlink for gcc ? Apparently that doesn't work well
> with recent gcc versions finding the headers...

That bug only exists in GCCs about a week old, it didn't matter to 3.2.
It can cause quirkiness, though.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer

2003-02-16 18:15:24

by Daniel Jacobowitz

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Sun, Feb 16, 2003 at 05:44:11PM +0000, Russell King wrote:
> Please copy replies back to lkml.
>
> On Sun, Feb 16, 2003 at 10:43:01PM +0530, Rahul Vaidya wrote:
> > the command is giving me the following:
> >
> > Reading specs from
> > /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> > Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
> > Thread model: posix
> > gcc version 3.2
> > /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/cpp0 -lang-c -v
> > -iprefix /usr/local/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.2/
> ^^^^^^^^^^
>
> It looks like gcc 3.2 thinks its compiler prefix is in a place where it
> is not. I'd suggest you report this to the gcc people; at a guess, it
> may be due to gcc getting confused during its configuration:
>
> ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
> ^^^

No, that doesn't affect the search path. It's detecting a GCC in
/usr/local and assuming the installation was moved. Rahul, what does
it say when you run it from its real location?

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer

2003-02-17 03:23:47

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

The command ./gcc -v -iwithprefix include -E - < /dev/null
from the directory containing the actual gcc file.

Reading specs from ./../lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
Thread model: posix
gcc version 3.2
./../lib/gcc-lib/i686-pc-linux-gnu/3.2/cpp0 -lang-c -v -iprefix
./../lib/gcc-lib/i686-pc-linux-gnu/3.2/ -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=0
-D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux
-D__ELF__ -D__
unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix
-D__NO_INLI
NE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386
-D__i386__ -D
__tune_i686__ -D__tune_pentiumpro__ -iwithprefix include -
GNU CPP version 3.2 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "../i686-pc-linux-gnu/include"
ignoring nonexistent directory
"/usr/local/gcc-3.2/i686-pc-linux-gnu/include"
ignoring duplicate directory
"../lib/gcc-lib/i686-pc-linux-gnu/3.2/include"
ignoring duplicate directory
"/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3
.2/include"
#include "..." search starts here:
#include <...> search starts here:
../lib/gcc-lib/i686-pc-linux-gnu/3.2/include
/usr/local/include
/usr/local/gcc-3.2/include
/usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"

Please CC to [email protected]
--
Rahul Vaidya
Hostel Room G46,
Ph.3942451

"Life can only be understood going backwards,
but it must be lived going forwards"
-Kierkegaard

On Sun, 16 Feb 2003, Daniel Jacobowitz wrote:

> On Sun, Feb 16, 2003 at 05:44:11PM +0000, Russell King wrote:
> > Please copy replies back to lkml.
> >
> > On Sun, Feb 16, 2003 at 10:43:01PM +0530, Rahul Vaidya wrote:
> > > the command is giving me the following:
> > >
> > > Reading specs from
> > > /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> > > Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
> > > Thread model: posix
> > > gcc version 3.2
> > > /usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/cpp0 -lang-c -v
> > > -iprefix /usr/local/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.2/
> > ^^^^^^^^^^
> >
> > It looks like gcc 3.2 thinks its compiler prefix is in a place where it
> > is not. I'd suggest you report this to the gcc people; at a guess, it
> > may be due to gcc getting confused during its configuration:
> >
> > ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
> > ^^^
>
> No, that doesn't affect the search path. It's detecting a GCC in
> /usr/local and assuming the installation was moved. Rahul, what does
> it say when you run it from its real location?
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>

2003-02-17 03:37:17

by Daniel Jacobowitz

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Mon, Feb 17, 2003 at 09:03:30AM +0530, Rahul Vaidya wrote:
> The command ./gcc -v -iwithprefix include -E - < /dev/null
> from the directory containing the actual gcc file.
>
> Reading specs from ./../lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2

> ../lib/gcc-lib/i686-pc-linux-gnu/3.2/include

And isn't that the right directory? Try building a kernel this way.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer

2003-02-17 03:44:28

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling


I tried compiling using the actual gcc, I got the following error.

gcc -Wp,-MD,init/.vermagic.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
-pipe -mpreferred-stack-boundary=2 -march=i686
-Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc
-iwithprefix include -DKBUILD_BASENAME=vermagic
-DKBUILD_MODNAME=vermagic -c -o init/.tmp_vermagic.o init/vermagic.c
In file included from include/linux/cache.h:4,
from include/asm/processor.h:18,
from include/asm/thread_info.h:13,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:44,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from init/vermagic.c:2:
include/linux/kernel.h:10:20: stdarg.h: No such file or directory
In file included from include/linux/cache.h:4,
from include/asm/processor.h:18,
from include/asm/thread_info.h:13,
from include/linux/thread_info.h:21,
from include/linux/spinlock.h:12,
from include/linux/capability.h:44,
from include/linux/sched.h:7,
from include/linux/module.h:10,
from init/vermagic.c:2:
include/linux/kernel.h:73: parse error before "va_list"
include/linux/kernel.h:73: warning: function declaration isn't a prototype
include/linux/kernel.h:76: parse error before "va_list"
include/linux/kernel.h:76: warning: function declaration isn't a prototype
include/linux/kernel.h:80: parse error before "va_list"
include/linux/kernel.h:80: warning: function declaration isn't a prototype
make[1]: *** [init/vermagic.o] Error 1
make: *** [init/vermagic.o] Error 2


--
Rahul Vaidya
Hostel Room G46,
Ph.3942451

"Life can only be understood going backwards,
but it must be lived going forwards"
-Kierkegaard

On Sun, 16 Feb 2003, Daniel Jacobowitz wrote:

> On Mon, Feb 17, 2003 at 09:03:30AM +0530, Rahul Vaidya wrote:
> > The command ./gcc -v -iwithprefix include -E - < /dev/null
> > from the directory containing the actual gcc file.
> >
> > Reading specs from ./../lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
> > Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
>
> > ../lib/gcc-lib/i686-pc-linux-gnu/3.2/include
>
> And isn't that the right directory? Try building a kernel this way.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>

2003-02-17 03:48:27

by Daniel Jacobowitz

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Mon, Feb 17, 2003 at 09:24:21AM +0530, Rahul Vaidya wrote:
>
> I tried compiling using the actual gcc, I got the following error.
>
> gcc -Wp,-MD,init/.vermagic.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=i686
> -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc
> -iwithprefix include -DKBUILD_BASENAME=vermagic
> -DKBUILD_MODNAME=vermagic -c -o init/.tmp_vermagic.o init/vermagic.c

That's just using the one in your path again. Is it the right one?
What does running that exact command with -v from the kernel source dir
give you?

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer

2003-02-17 03:53:44

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

>From my kernel source directory: I have aliased gcc to my actual gcc
file..not the softlinked one..

Reading specs from
/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr/local/gcc-3.2
Thread model: posix
gcc version 3.2
/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/cpp0 -lang-c -v
-D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0
-D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__
-D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix
-D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386
-D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ -iwithprefix
include -
GNU CPP version 3.2 (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory
"/usr/local/gcc-3.2/i686-pc-linux-gnu/include"
ignoring duplicate directory
"/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/gcc-3.2/lib/gcc-lib/i686-pc-linux-gnu/3.2/include
/usr/local/include
/usr/local/gcc-3.2/include
/usr/include
End of search list.
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "<stdin>"


--
Rahul Vaidya
Hostel Room G46,
Ph.3942451

"Life can only be understood going backwards,
but it must be lived going forwards"
-Kierkegaard

On Sun, 16 Feb 2003, Daniel Jacobowitz wrote:

> On Mon, Feb 17, 2003 at 09:24:21AM +0530, Rahul Vaidya wrote:
> >
> > I tried compiling using the actual gcc, I got the following error.
> >
> > gcc -Wp,-MD,init/.vermagic.o.d -D__KERNEL__ -Iinclude -Wall
> > -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> > -pipe -mpreferred-stack-boundary=2 -march=i686
> > -Iinclude/asm-i386/mach-default -fomit-frame-pointer -nostdinc
> > -iwithprefix include -DKBUILD_BASENAME=vermagic
> > -DKBUILD_MODNAME=vermagic -c -o init/.tmp_vermagic.o init/vermagic.c
>
> That's just using the one in your path again. Is it the right one?
> What does running that exact command with -v from the kernel source dir
> give you?
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>

2003-02-17 04:00:00

by Daniel Jacobowitz

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

On Mon, Feb 17, 2003 at 09:33:32AM +0530, Rahul Vaidya wrote:
> >From my kernel source directory: I have aliased gcc to my actual gcc
> file..not the softlinked one..

Shell aliases won't affect the GCC that Make uses. Try using make
CC=/path/to/real/gcc.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer

2003-02-17 04:58:18

by Rahul Vaidya

[permalink] [raw]
Subject: Re: linux 2.5.53 not compiling

Thank you Daniel,

The kernel source compiled. I changed the CC variable
path.

I also thank Russel,Zwane and John for their help.

Thanks again.

--
Rahul Vaidya
Hostel Room G46,
Ph.3942451

"Life can only be understood going backwards,
but it must be lived going forwards"
-Kierkegaard

On Sun, 16 Feb 2003, Daniel Jacobowitz wrote:

> On Mon, Feb 17, 2003 at 09:33:32AM +0530, Rahul Vaidya wrote:
> > >From my kernel source directory: I have aliased gcc to my actual gcc
> > file..not the softlinked one..
>
> Shell aliases won't affect the GCC that Make uses. Try using make
> CC=/path/to/real/gcc.
>
> --
> Daniel Jacobowitz
> MontaVista Software Debian GNU/Linux Developer
>