# older kernels doesn't compile anymore

## Konsti

concerned are 

linux-2.6.10-gentoo-r7

linux-2.6.9-gentoo

```

  CHK     include/linux/version.h

make[1]: `arch/x86_64/kernel/asm-offsets.s' is up to date.

  CHK     include/linux/compile.h

  CHK     usr/initramfs_list

  AS      arch/x86_64/kernel/entry.o

arch/x86_64/kernel/entry.S: Assembler messages:

arch/x86_64/kernel/entry.S:81: Error: Macro with this name was already defined

arch/x86_64/kernel/entry.S:100: Error: Macro with this name was already defined

make[1]: *** [arch/x86_64/kernel/entry.o] Error 1

make: *** [arch/x86_64/kernel] Error 2

```

What are the oldest 2.6.x series kernel one can install?

Why are gentoo-sources-2.6.7-r19 masked?

```

gcc --version

gcc (GCC) 3.4.3-20050110 (Gentoo 3.4.3.20050110-r2, ssp-3.4.3.20050110-0, pie-8.7.7)

Copyright (C) 2004 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

```

Konsti

----------

## Gridmark

I'm having this same issue with 2.6.10-vanilla and gcc 3.4.4

Currently im still chrooted into my box and am unable to compile a kernel at all (Including current sync of gentoo sources, but thats another issue methinks)...

I was using the unstable ~athlon64 packages, i have commented that out, and am remerging everything (emerge -ev system) and see where that takes me.

Looking at your error, it seems your running and athlon64 system. Perhaps its related as thats what im trying to build...

----------

## Konsti

The from me above quoted error message is caused by the new gcc (or was it binutils?) which handle some cases of code more strict... What error do you get on 2.6.10? Thats weird and probably something else...

Yes, its amd64

----------

## scoobydu

Is there a solution to this?  :Question: 

I'm having the same problem trying to build a 2.6.7 kernel, using gcc 3.4.4 on amd64.

scooby

----------

## Konsti

IIRC there is a solution, there has to be some code changed to make newer binutils happy.

I did not test ist though, I saw a patch somewhere but I don't know where anymore...

----------

## scoobydu

 *Konsti wrote:*   

> IIRC there is a solution, there has to be some code changed to make newer binutils happy.
> 
> I did not test ist though, I saw a patch somewhere but I don't know where anymore...

 

Ok, thanks, I'll do some digging around.

scooby

----------

## unplug

I am having same problem when I tried to compile 2.6.15-gentoo-r7 with gcc 3.3.4 for x86_64

Any solution?

----------

## its1louder

I'd like to bump this, I need to support some hardware not working on kernel 2.6.15 but tested working on 2.6.9.  The oldest I could "emerge" was vanilla 2.6.10 so I was trying to compile that.

here is my GCC

```

# equery uses gcc

[ Searching for packages matching gcc... ]

[ Colour Code : set unset ]

[ Legend        : Left column  (U) - USE flags from make.conf                     ]

[                  : Right column (I) - USE flags packages was installed with ]

[ Found these USE variables for sys-devel/gcc-3.4.4-r1 ]

 U I

 - - altivec        : Adds support for optimizations for G4 and G5/ppc970 processors

 - - bootstrap      : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during original system bootstrapping

 + - boundschecking : Adds the bounds checking patch by Haj Ten Brugge, this will DISABLE the hardened PIE+SSP patches

 - - build          : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping.

 + + fortran        : Adds support for fortran (formally f77)

 - - gcj            : Enable building with gcj (The GNU Compiler for the Javatm Programming Language)

 + + gtk            : Adds support for x11-libs/gtk+ (The GIMP Toolkit)

 - - hardened       : activate default security enhancements for toolchain (gcc, glibc, binutils)

 - - ip28           : Enable building a compiler capable of building a kernel for SGI Indigo2 Impact R10000 (IP28)

 - - multilib       : On 64bit systems, if you want to be able to compile 32bit and 64bit binaries

 - - multislot      : Allow for SLOTs to include minor version (3.3.4 instead of just 3.3)

 - - n32            : Enable n32 ABI support on mips

 - - n64            : Enable n64 ABI support on mips

 + + nls            : Adds Native Language Support (using gettext - GNU locale utilities)

 - - nocxx          : Disable support for C++ (DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)

 - - nopie          : Disable PIE support (NOT FOR GENERAL USE)

 - - nossp          : Disable SSP support (NOT FOR GENERAL USE)

 - - objc           : Build support for the Objective C code language

 - - vanilla        : Do not add extra patches which change default behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically

```

```

# uname -a

Linux hyhats 2.6.15-gentoo-r7 #6 SMP Wed May 3 05:50:07 PDT 2006 x86_64 Intel(R) Xeon(TM) CPU 3.00GHz GNU/Linux

```

```

  CC      arch/x86_64/kernel/process.o

  CC      arch/x86_64/kernel/semaphore.o

  CC      arch/x86_64/kernel/signal.o

  AS      arch/x86_64/kernel/entry.o

arch/x86_64/kernel/entry.S: Assembler messages:

arch/x86_64/kernel/entry.S:81: Error: Macro with this name was already defined

arch/x86_64/kernel/entry.S:100: Error: Macro with this name was already defined

make[1]: *** [arch/x86_64/kernel/entry.o] Error 1

make: *** [arch/x86_64/kernel] Error 2

```

my plan is to try some other gcc-glibc-binutils right now . . .   See if 4.1 makes a difference, I was planning on trying it out anyway.  

If that fails I will try going to kernel.org to get a 2.6.9 kernel the old fashioned way.   

Actually, the hardware is verified with redhat 2.6.9.  Is there an easy place to get that kernel source or is it just the same as vanilla?

----------

## its1louder

What I did was, I went to the offending source code document and editted out the two offending macros.  The kernel then compiled and ran.

----------

## its1louder

the 2.6.9 kernel I got at kernel.org.

----------

