2003-01-02 18:42:33

by BODA Karoly jr.

[permalink] [raw]
Subject: Linux-2.5.54-sparc64 compile errors

Hi!

Some errors and patches, but I'm not sure they are correct:

o There was no archclean which is needed to make clean

--- arch/sparc64/Makefile 2003-01-02 04:23:15.000000000 +0100
+++ arch/sparc64/Makefile~ 2003-01-02 16:56:48.000000000 +0100
@@ -74,6 +74,9 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
tftpboot.img vmlinux.aout:
$(Q)$(MAKE) $(build)=arch/sparc64/boot arch/sparc64/boot/$@

+archclean:
+ $(Q)$(MAKE) $(clean)=arch/sparc64/boot
+
define archhelp
echo '* vmlinux - Standard sparc64 kernel'
echo ' vmlinux.aout - a.out kernel for sparc64'


o Missing "drivers/scsi/aic7xxx/Kconfig" in arch/sparc64/Kconfig line 990

--- arch/sparc64/Kconfig 2003-01-02 04:23:01.000000000 +0100
+++ arch/sparc64/Kconfig~ 2003-01-02 19:09:53.000000000 +0100
@@ -986,7 +986,8 @@ choice
optional
depends on SCSI && PCI

-source "drivers/scsi/aic7xxx/Kconfig"
+source "drivers/scsi/aic7xxx/Kconfig.aic7xxx"
+source "drivers/scsi/aic7xxx/Kconfig.aic79xx"

config SCSI_AIC7XXX_OLD
tristate "Old driver"


o Compile error of arch/sparc64/kernel/power.c

sparc64-linux-gcc -Wp,-MD,arch/sparc64/kernel/.power.o.d -D__KERNEL__
-Iinclude -Wall -Wstrict-prototypes -Wno-trigraphs -O2
-fno-strict-aliasing -fno-common -m64 -pipe -mno-fpu -mcpu=ultrasparc
-mcmodel=medlow -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
-Wa,--undeclared-regs -fomit-frame-pointer -nostdinc -iwithprefix include
-DKBUILD_BASENAME=power -DKBUILD_MODNAME=power -c -o
arch/sparc64/kernel/power.o arch/sparc64/kernel/power.c
In file included from include/linux/interrupt.h:9,
from arch/sparc64/kernel/power.c:13:
include/asm/hardirq.h:23: parse error before `irq_cpustat_t'
include/asm/hardirq.h:23: warning: type defaults to `int' in declaration of `irq_cpustat_t'
include/asm/hardirq.h:23: warning: data definition has no type or storage class
In file included from include/asm/hardirq.h:25,
from include/linux/interrupt.h:9,
from arch/sparc64/kernel/power.c:13:
include/linux/irq_cpustat.h:20: parse error before `irq_stat'
include/linux/irq_cpustat.h:20: warning: type defaults to `int' in declaration of `irq_stat'
include/linux/irq_cpustat.h:20: warning: data definition has no type or storage class
include/linux/irq_cpustat.h:20: warning: array `irq_stat' assumed to have one element
make[2]: *** [arch/sparc64/kernel/power.o] Error 1
make[1]: *** [arch/sparc64/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.54'
make: *** [stamp-build] Error 2

This patch makes it compile:
--- include/linux/interrupt.h 2003-01-02 04:22:17.000000000 +0100
+++ include/linux/interrupt.h~ 2003-01-02 19:29:15.000000000 +0100
@@ -5,6 +5,7 @@
#include <linux/config.h>
#include <linux/linkage.h>
#include <linux/bitops.h>
+#include <linux/cache.h>
#include <asm/atomic.h>
#include <asm/hardirq.h>
#include <asm/ptrace.h>


o And an error which with I can't do anything... :(

sparc64-linux-gcc -Wp,-MD,arch/sparc64/kernel/.head.o.d -D__ASSEMBLY__
-D__KERNEL__ -Iinclude -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
-nostdinc -iwithprefix include -ansi -c -o arch/sparc64/kernel/head.o
arch/sparc64/kernel/head.S
In file included from include/linux/cache.h:4,
from include/asm/smp.h:11,
from arch/sparc64/kernel/entry.S:15,
from arch/sparc64/kernel/head.S:734:
include/linux/kernel.h:31: warning: `ALIGN' redefined
include/linux/linkage.h:24: warning: this is the location of the previous definition
/usr/lib/gcc-lib/sparc64-linux/egcs-2.92.11/include/va-sparc.h: Assembler messages:
/usr/lib/gcc-lib/sparc64-linux/egcs-2.92.11/include/va-sparc.h:15: Error: Unknown opcode: `typedef'
/usr/lib/gcc-lib/sparc64-linux/egcs-2.92.11/include/va-sparc.h:50: Error: Unknown opcode: `void'
/usr/lib/gcc-lib/sparc64-linux/egcs-2.92.11/include/va-sparc.h:54: Error: Unknown opcode: `enum'
/usr/lib/gcc-lib/sparc64-linux/egcs-2.92.11/include/va-sparc.h:55:
Warning: rest of line ignored; first ignored character is `,'/usr/lib/gcc-lib/sparc64-linux/egcs-2.92.11/include/va-sparc.h:56:
Fatal error: Unknown opcode: `__void_type_class,'
make[2]: *** [arch/sparc64/kernel/head.o] Error 1
make[1]: *** [arch/sparc64/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.54'
make: *** [stamp-build] Error 2


Sorry if my patches are not correct, I'm not a kernel developer.:)
If need any information about my machine, please ask for it.:)

--
Woockie
..."what is there in this world that makes living worthwhile?"
Death thought about it. "CATS," he said eventually, "CATS ARE NICE."
(Terry Pratchett, Sourcery)



2003-01-02 19:23:44

by Sam Ravnborg

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

On Thu, Jan 02, 2003 at 07:50:59PM +0100, BODA Karoly jr. wrote:
> Hi!
>
> Some errors and patches, but I'm not sure they are correct:
>
> o There was no archclean which is needed to make clean

This one is my bad. Deleted accidently when moving archhelp.

Your mailer screwed up all tabs, so patch did not apply.
Also cc: [email protected] next time.

Sam

>
> --- arch/sparc64/Makefile 2003-01-02 04:23:15.000000000 +0100
> +++ arch/sparc64/Makefile~ 2003-01-02 16:56:48.000000000 +0100
> @@ -74,6 +74,9 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
> tftpboot.img vmlinux.aout:
> $(Q)$(MAKE) $(build)=arch/sparc64/boot arch/sparc64/boot/$@
>
> +archclean:
> + $(Q)$(MAKE) $(clean)=arch/sparc64/boot
> +
> define archhelp
> echo '* vmlinux - Standard sparc64 kernel'
> echo ' vmlinux.aout - a.out kernel for sparc64'
>
>

2003-01-03 14:00:34

by James Morris

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

On Thu, 2 Jan 2003, BODA Karoly jr. wrote:

> o And an error which with I can't do anything... :(
>
> sparc64-linux-gcc -Wp,-MD,arch/sparc64/kernel/.head.o.d -D__ASSEMBLY__
> -D__KERNEL__ -Iinclude -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
> -nostdinc -iwithprefix include -ansi -c -o arch/sparc64/kernel/head.o
> arch/sparc64/kernel/head.S
> In file included from include/linux/cache.h:4,
> from include/asm/smp.h:11,
> from arch/sparc64/kernel/entry.S:15,
> from arch/sparc64/kernel/head.S:734:
> include/linux/kernel.h:31: warning: `ALIGN' redefined
> include/linux/linkage.h:24: warning: this is the location of the previous definition
>

This is a namespace collision introduced with ALIGN() being moved to
kernel.h. A patch below resolves this for sparc64 by not including some
non-asm headers when compiling assembler, although the namespace issue
itself may still need to be fixed (e.g. change ALIGN() to ALIGN_TO()
in kernel.h ?).

It looks like sparc32 has a similar problem.


- James
--
James Morris
<[email protected]>

diff -urN -X dontdiff linux-2.5.54.orig/include/asm-sparc64/smp.h linux-2.5.54.w1/include/asm-sparc64/smp.h
--- linux-2.5.54.orig/include/asm-sparc64/smp.h Wed Oct 9 22:39:39 2002
+++ linux-2.5.54.w1/include/asm-sparc64/smp.h Sat Jan 4 00:43:28 2003
@@ -7,13 +7,14 @@
#define _SPARC64_SMP_H

#include <linux/config.h>
-#include <linux/threads.h>
-#include <linux/cache.h>
#include <asm/asi.h>
#include <asm/starfire.h>
#include <asm/spitfire.h>

#ifndef __ASSEMBLY__
+#include <linux/threads.h>
+#include <linux/cache.h>
+
/* PROM provided per-processor information we need
* to start them all up.
*/

2003-01-03 15:25:41

by BODA Karoly jr.

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

diff -ruNp a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
--- a/arch/sparc64/Kconfig 2003-01-02 04:23:01.000000000 +0100
+++ b/arch/sparc64/Kconfig 2003-01-02 19:09:53.000000000 +0100
@@ -986,7 +986,8 @@ choice
optional
depends on SCSI && PCI

-source "drivers/scsi/aic7xxx/Kconfig"
+source "drivers/scsi/aic7xxx/Kconfig.aic7xxx"
+source "drivers/scsi/aic7xxx/Kconfig.aic79xx"

config SCSI_AIC7XXX_OLD
tristate "Old driver"
diff -ruNp a/arch/sparc64/Makefile b/arch/sparc64/Makefile
--- a/arch/sparc64/Makefile 2003-01-02 04:23:15.000000000 +0100
+++ b/arch/sparc64/Makefile 2003-01-03 16:02:27.000000000 +0100
@@ -74,6 +74,10 @@ drivers-$(CONFIG_OPROFILE) += arch/sparc
tftpboot.img vmlinux.aout:
$(Q)$(MAKE) $(build)=arch/sparc64/boot arch/sparc64/boot/$@

+archmrproper:
+archclean:
+ $(Q)$(MAKE) $(clean)=arch/sparc64/boot
+
define archhelp
echo '* vmlinux - Standard sparc64 kernel'
echo ' vmlinux.aout - a.out kernel for sparc64'
diff -ruNp a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
--- a/include/asm-sparc64/smp.h 2003-01-02 04:21:40.000000000 +0100
+++ b/include/asm-sparc64/smp.h 2003-01-03 15:02:38.000000000 +0100
@@ -7,13 +7,13 @@
#define _SPARC64_SMP_H

#include <linux/config.h>
-#include <linux/threads.h>
-#include <linux/cache.h>
#include <asm/asi.h>
#include <asm/starfire.h>
#include <asm/spitfire.h>

#ifndef __ASSEMBLY__
+#include <linux/threads.h>
+#include <linux/cache.h>
/* PROM provided per-processor information we need
* to start them all up.
*/
diff -ruNp a/include/linux/interrupt.h b/include/linux/interrupt.h
--- a/include/linux/interrupt.h 2003-01-02 04:22:17.000000000 +0100
+++ b/include/linux/interrupt.h 2003-01-02 19:32:01.000000000 +0100
@@ -5,6 +5,7 @@
#include <linux/config.h>
#include <linux/linkage.h>
#include <linux/bitops.h>
+#include <linux/cache.h>
#include <asm/atomic.h>
#include <asm/hardirq.h>
#include <asm/ptrace.h>

2003-01-03 16:27:58

by James Morris

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

On Fri, 3 Jan 2003, BODA Karoly jr. wrote:

> arch/sparc64/solaris/built-in.o(.text+0xb4): In function `entry64_personality_patch':
> : undefined reference to `TI_FLAGS'

See the patch below for a fix for this.

> kernel/built-in.o(.data+0x1708): undefined reference to `hugetlb_sysctl_handler'

Looks like the sparc hugetlb code needs updating, you will need to disable
it until it's done.

> drivers/built-in.o(.text+0x1af90): In function `kd_nosound':

You need to set CONFIG_INPUT=y to fix this at the moment (even if you
don't have any input devices configured).


- James
--
James Morris
<[email protected]>

diff -urN -X dontdiff linux-2.5.54.orig/arch/sparc64/solaris/entry64.S linux-2.5.54.w2/arch/sparc64/solaris/entry64.S
--- linux-2.5.54.orig/arch/sparc64/solaris/entry64.S Fri Aug 2 07:16:02 2002
+++ linux-2.5.54.w2/arch/sparc64/solaris/entry64.S Sat Jan 4 03:22:12 2003
@@ -16,6 +16,7 @@
#include <asm/signal.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
+#include <asm/thread_info.h>

#include "conv.h"


2003-01-03 18:47:18

by BODA Karoly jr.

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

On Sat, 4 Jan 2003, James Morris wrote:

> See the patch below for a fix for this.
[...]
> You need to set CONFIG_INPUT=y to fix this at the moment (even if you
> don't have any input devices configured).

Thank you for the help for everyone the compile was successful.
With preempt didn't boot the machine. This is a possible couse only, I
made more changes between the two version's (booting and not booting)
config.
After booting I can't insmod (even with insmod nor with modprobe)
anything with the following error message:

mortimer:~# modprobe nfs
WARNING: Error inserting sunrpc (/lib/modules/2.5.54/kernel/net/sunrpc/sunrpc.ko): Cannot allocate memory
WARNING: Error inserting lockd (/lib/modules/2.5.54/kernel/fs/lockd/lockd.ko): Cannot allocate memory
FATAL: Error inserting nfs (/lib/modules/2.5.54/kernel/fs/nfs/nfs.ko): Cannot allocate memory

With strace I found this, is it normal?
238 create_module(0, 0) = -1 ENOSYS (Function not implemented)

module-init-tools version 0.9.7

CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_OBSOLETE_MODPARM=y
CONFIG_KMOD=y

--
Woockie
..."what is there in this world that makes living worthwhile?"
Death thought about it. "CATS," he said eventually, "CATS ARE NICE."
(Terry Pratchett, Sourcery)

2003-01-04 00:19:51

by James Morris

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

On Fri, 3 Jan 2003, BODA Karoly jr. wrote:

> After booting I can't insmod (even with insmod nor with modprobe)
> anything with the following error message:
>
> mortimer:~# modprobe nfs
> WARNING: Error inserting sunrpc (/lib/modules/2.5.54/kernel/net/sunrpc/sunrpc.ko): Cannot allocate memory
> WARNING: Error inserting lockd (/lib/modules/2.5.54/kernel/fs/lockd/lockd.ko): Cannot allocate memory
> FATAL: Error inserting nfs (/lib/modules/2.5.54/kernel/fs/nfs/nfs.ko): Cannot allocate memory
>

Try Rusty's sh_link patch:
http://marc.theaimsgroup.com/?l=linux-kernel&m=104157163822921&w=2



- James
--
James Morris
<[email protected]>


2003-01-04 02:13:40

by David Miller

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors


I have most of this stuff fixed at:

bk://kernel.bkbits.net/davem/sparc-2.5

which is my current bitkeeper tree, it is going to Linus shortly.

2003-01-06 14:52:45

by BODA Karoly jr.

[permalink] [raw]
Subject: Re: Linux-2.5.54-sparc64 compile errors

On Sat, 4 Jan 2003, James Morris wrote:

> > WARNING: Error inserting lockd (/lib/modules/2.5.54/kernel/fs/lockd/lockd.ko): Cannot allocate memory
> > FATAL: Error inserting nfs (/lib/modules/2.5.54/kernel/fs/nfs/nfs.ko): Cannot allocate memory
> Try Rusty's sh_link patch:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=104157163822921&w=2

Yes, thank you. It works now :)

mortimer:~# uname -a
Linux mortimer 2.5.54 #14 Sat Jan 4 01:32:19 CET 2003 sparc64 unknown unknown GNU/Linux
mortimer:~# lsmod
Module Size Used by
nfs 111288 0
lockd 49400 1 nfs
sunrpc 92088 2 nfs lockd

--
Woockie
..."what is there in this world that makes living worthwhile?"
Death thought about it. "CATS," he said eventually, "CATS ARE NICE."
(Terry Pratchett, Sourcery)