Subject: Compilation errors

From: Richard Hartensveld <[email-masked]>
Date: Wed, 03 Feb 1999 06:31:52 -0800

Hi all,

I'm trying to build the latest cvs tree (first kernel i'm trying to
compile locally on this challenge S)

Does anyone know what's going wrong? the same kernel compiles flawlessly
on my linux/x86 system with a crosscompiler.

Down here is the error.

[root@tux linux]# make zImage
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -mcpu=r8000 -mips2
-pipe  -c -o init/main.o init/main.c
/usr/src/linux/include/linux/sched.h: In function `on_sig_stack':
In file included from /usr/src/linux/include/linux/mm.h:4,
                 from /usr/src/linux/include/linux/slab.h:14,
                 from /usr/src/linux/include/linux/malloc.h:4,
                 from /usr/src/linux/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/src/linux/include/linux/sched.h:528: `current' undeclared (first
use this function)
/usr/src/linux/include/linux/sched.h:528: (Each undeclared identifier is
reported only once
/usr/src/linux/include/linux/sched.h:528: for each function it appears
in.)
/usr/src/linux/include/linux/sched.h:530: warning: control reaches end
of non-void function
/usr/src/linux/include/linux/sched.h: In function `sas_ss_flags':
/usr/src/linux/include/linux/sched.h:534: `current' undeclared (first
use this function)
/usr/src/linux/include/linux/sched.h:536: warning: control reaches end
of non-void function
/usr/src/linux/include/linux/sched.h: In function `suser':
/usr/src/linux/include/linux/sched.h:561: `current' undeclared (first
use this function)
/usr/src/linux/include/linux/sched.h: In function `fsuser':
/usr/src/linux/include/linux/sched.h:570: `current' undeclared (first
use this function)
/usr/src/linux/include/linux/sched.h: In function `capable':
/usr/src/linux/include/linux/sched.h:586: `current' undeclared (first
use this function)
/usr/src/linux/include/linux/mm.h: In function `expand_stack':
In file included from /usr/src/linux/include/linux/slab.h:14,
                 from /usr/src/linux/include/linux/malloc.h:4,
                 from /usr/src/linux/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/src/linux/include/linux/mm.h:349: `current' undeclared (first use
this function)
init/main.c: In function `do_basic_setup':
init/main.c:1242: `current' undeclared (first use this function)
make: *** [init/main.o] Error 1

Cheers,

Richard

---

From: Alex deVries <[email-masked]>
Date: Wed, 3 Feb 1999 12:12:47 -0500 (EST)

> /usr/src/linux/include/linux/sched.h:528: for each function it appears

Use egcs and you will have no problems.  You'll be a better person, too.

- Alex

---

From: Ulf Carlsson <[email-masked]>
Date: Wed, 3 Feb 1999 21:43:26 +0100

> Use egcs and you will have no problems.  You'll be a better person, too.

You may update the specs file instead if you want, and gcc will work. Ask me and
I'll send you the updated specs file.

- Ulf