2000-12-05 01:54:50

by Lukasz Trabinski

[permalink] [raw]
Subject: Problems with Athlon CPU

Hello

There is probably not a kernel bug, but bug in gcc, but... :)

[root@beer linux]# make bzImage

[snip]

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -DEXPORT_SYMTAB -c selection.c
In file included from /usr/src/linux/include/asm/smp.h:21,
from /usr/src/linux/include/linux/smp.h:14,
from /usr/src/linux/include/linux/sched.h:22,
from selection.c:16:
/usr/src/linux/include/asm/apic.h:13:29: warning: nothing can be pasted
after this token
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686 -DEXPORT_SYMTAB -c serial.c
In file included from /usr/src/linux/include/asm/smp.h:21,
from /usr/src/linux/include/linux/smp.h:14,
from /usr/src/linux/include/linux/sched.h:22,
from serial.c:183:
/usr/src/linux/include/asm/apic.h:13:29: warning: nothing can be pasted
after this token
serial.c: In function `line_info':
serial.c:3241: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[3]: *** [serial.o] Error 2
make[3]: Leaving directory `/usr/src/linux/drivers/char'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux/drivers/char'
make[1]: *** [_subdir_char] Error 2
make[1]: Leaving directory `/usr/src/linux/drivers'
make: *** [_dir_drivers] Error 2

I have tried compiled it on AMD Athlon Processor with glibc 2.2.
I have tried to compile kernels: 2.2.17, 2.2.18pre-24, 2.4.0-test11 and
always I have got this message. With glibc 2.1.94 I had not any problems
with compilation!


[lukasz@beer lukasz]$ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 3
model name : AMD Athlon(tm) Processor
stepping : 0
cpu MHz : 600.043
cache size : 1 KB
fdiv_bug : no
hlt_bug : no
sep_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr 6 mce cx8 sep mtrr pge 14 cmov
fcmov 17 psn 22 mmx 24 30 3dnow
bogomips : 1196.03

[lukasz@beer lukasz]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.0)

[lukasz@beer lukasz]$ rpm -q glibc
glibc-2.2-5

Any sugestions? On others machines with AMD-K6 or Petnium-III/II and
with the same version of glibc and gcc that problems does not exists!

ps
sorry for my broken english. :(



--
*[ ?ukasz Tr?bi?ski ]*
SysAdmin @wsisiz.edu.pl


2000-12-05 07:27:37

by Mike A. Harris

[permalink] [raw]
Subject: Re: Problems with Athlon CPU

On Tue, 5 Dec 2000, Lukasz Trabinski wrote:

>Date: Tue, 5 Dec 2000 02:19:55 +0100 (CET)
>From: Lukasz Trabinski <[email protected]>
>To: [email protected]
>Cc: [email protected]
>Content-Type: TEXT/PLAIN; charset=ISO-8859-2
>Subject: Problems with Athlon CPU
>
>Hello
>
>There is probably not a kernel bug, but bug in gcc, but... :)

It is a kernel bug.

[SNIP]

>gcc version 2.96 20000731 (Red Hat Linux 7.0)
^^^^^^^^^^^^^^^^

You can't build a kernel with that compiler. You _must_ use gcc
2.91.66 or another compiler that can compile the kernel. Red Hat
ships gcc 2.91.66 packaged as "kgcc" for kernel builds as do
other major vendors.

You must edit the top level makefile appropriately first before
building.

>[lukasz@beer lukasz]$ rpm -q glibc
>glibc-2.2-5

The kernel doesn't use any libc so it doesn't matter.

>Any sugestions? On others machines with AMD-K6 or Petnium-III/II and
>with the same version of glibc and gcc that problems does not exists!

No, you must have a different gcc on the other machines. You
can't build a kernel with gcc 2.96 as the kernel is buggy.


----------------------------------------------------------------------
Mike A. Harris - Linux advocate - Open source advocate
This message is copyright 2000, all rights reserved.
Views expressed are my own, not necessarily shared by my employer.
----------------------------------------------------------------------

If you think C++ is not overly complicated, just what is a protected
abstract virtual base pure virtual private destructor, and when
was the last time you needed one?
-- Tom Cargill, C++ Journal, Fall 1990.

2000-12-05 09:55:10

by Alan

[permalink] [raw]
Subject: Re: Problems with Athlon CPU

> Hello
> There is probably not a kernel bug, but bug in gcc, but... :)

Use egcs-1.1.2 to build 2.4 kernels (kgcc)


2000-12-05 10:16:54

by Lukasz Trabinski

[permalink] [raw]
Subject: Re: Problems with Athlon CPU

In article <[email protected]> you wrote:
> ^^^^^^^^^^^^^^^^

> You can't build a kernel with that compiler. You _must_ use gcc
> 2.91.66 or another compiler that can compile the kernel. Red Hat
> ships gcc 2.91.66 packaged as "kgcc" for kernel builds as do
> other major vendors.

Huh, no way, I have tried also with kgcc:
[root@beer linux]# cat Makefile |grep gcc
HOSTCC =kgcc
# foo-bar-gcc for cross builds
# gcc272 for Debian's old compiler for kernels
# kgcc for Conectiva and Red Hat 7
CC =$(shell if [ -n "$(CROSS_COMPILE)" ]; then echo $(CROSS_COMPILE)kgcc; else \
$(CONFIG_SHELL) scripts/kwhich gcc272 2>/dev/null || $(CONFIG_SHELL) scripts/kwhich kgcc 2>/dev/null || echo cc; fi) \

after make bzImage:

/usr/src/linux/include/linux/signal.h: In function `siginitsetinv':
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
/usr/src/linux/include/linux/signal.h:201: parse error before `)'
make[3]: *** [auto_irq.o] Error 1
make[3]: Leaving directory `/usr/src/linux/drivers/net'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux/drivers/net'
make[1]: *** [_subdir_net] Error 2
make[1]: Leaving directory `/usr/src/linux/drivers'
make: *** [_dir_drivers] Error 2

and I would like also to say, that problem doeas not exists with glibc
and glibc-devel 2.1.94.

--
*[ ?ukasz Tr?bi?ski ]*
SysAdmin @wsisiz.edu.pl

2000-12-05 10:23:04

by Alan

[permalink] [raw]
Subject: Re: Problems with Athlon CPU

> In article <[email protected]> y=
> ou wrote:
> > ^^^^^^^^^^^^^^^^
>
> > You can't build a kernel with that compiler. You _must_ use gcc
> > 2.91.66 or another compiler that can compile the kernel. Red Hat
> > ships gcc 2.91.66 packaged as "kgcc" for kernel builds as do
> > other major vendors.
>
> Huh, no way, I have tried also with kgcc:

Then I can only conclude your system is broken in some way since it works
for everyone else

> [root@beer linux]# cat Makefile |grep gcc
> HOSTCC =3Dkgcc

HOSTCC should be gcc, CC should be kgcc. HOSTCC=kgcc should be fairly
harmless

> make[2]: Leaving directory `/usr/src/linux/drivers/net'
> make[1]: *** [_subdir_net] Error 2
> make[1]: Leaving directory `/usr/src/linux/drivers'
> make: *** [_dir_drivers] Error 2
>
> and I would like also to say, that problem doeas not exists with glibc
> and glibc-devel 2.1.94.

glibc is not linked with the kernel


2000-12-05 10:33:28

by Mike A. Harris

[permalink] [raw]
Subject: Re: Problems with Athlon CPU

On Tue, 5 Dec 2000, Lukasz Trabinski wrote:

>In article <[email protected]> you wrote:
>> ^^^^^^^^^^^^^^^^
>
>> You can't build a kernel with that compiler. You _must_ use gcc
>> 2.91.66 or another compiler that can compile the kernel. Red Hat
>> ships gcc 2.91.66 packaged as "kgcc" for kernel builds as do
>> other major vendors.
>
>Huh, no way, I have tried also with kgcc:

The kgcc compiler is merely gcc 2.91.66, and it most definitely
compiles the kernel correctly. If yours is failing, then you are
doing something wrong or have the wrong version of something else
interfering, or perhaps some other problem.

Provide a larger screenshot wher it actually shows c ompiler
build lines, errors, etc.. Also check that you're using the
proper versions of stuff as listed in Changelog.

What specific kernel are you building again? Is it stock or
patched?



----------------------------------------------------------------------
Mike A. Harris - Linux advocate - Open source advocate
This message is copyright 2000, all rights reserved.
Views expressed are my own, not necessarily shared by my employer.
----------------------------------------------------------------------


#[Mike A. Harris bash tip #1 - separate history files per virtual console]
# Put the following at the bottom of your ~/.bash_profile
[ ! -d ~/.bash_histdir ] && mkdir ~/.bash_histdir
tty |grep "^/dev/tty[0-9]" >& /dev/null && \
export HISTFILE=~/.bash_histdir/.$(tty | sed -e 's/.*\///')