# Kernel (gentoo-sources) Compile issues.

## craftyc

I have emerged the gentoo-sources and when I try to compile I get this error at the end.

```
ake[2]: Leaving directory `/usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib'

make[1]: Leaving directory `/usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib'

gcc -E -C -P -I/usr/src/linux-2.4.19-gentoo-r5/include -imacros /usr/src/linux-2.4.19-gentoo-r5/include/asm                                   6/vmlinux.lds.S >arch/i386/vmlinux.lds

ld -m elf_i386 -T /usr/src/linux-2.4.19-gentoo-r5/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o ar                                   n.o init/version.o init/do_mounts.o \

        --start-group \

        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \

         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/medi                                   ide/idedriver.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/sound/sounddrivers.o drivers/pci/driv                                   o/video.o \

        net/network.o \

        /usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib/lib.a /usr/src/linux-2.4.19-gentoo-r5/lib/lib.a /usr/                                   6/lib/lib.a \

        --end-group \

        -o vmlinux

init/main.o: In function `smp_init':

init/main.o(.text.init+0x59e): undefined reference to `skip_ioapic_setup'

arch/i386/kernel/kernel.o: In function `broken_pirq':

arch/i386/kernel/kernel.o(.text.init+0x3252): undefined reference to `skip_ioapic_setup'

make: *** [vmlinux] Error 1

```

It does not matter which options I enable or disable, I still get this error. Any ideas what could be causing this? Thanks in advance.

----------

## jay

Did you enable the "Symmetric multi-processing support" in Processor type and features? I got a very similiar error when I tried to toggle this off.

----------

## craftyc

 *jay wrote:*   

> Did you enable the "Symmetric multi-processing support" in Processor type and features? I got a very similiar error when I tried to toggle this off.

 

I enabled the option and everythings hunky-dory. 

Any ideas why this option needs to be compiled in?

----------

## craftyc

After rebooting with the new kernel I get a load of failed dependancies. Any ideas how this can be fixed?

----------

## Curious

 *craftyc wrote:*   

> Any ideas why this option needs to be compiled in?

 

Because it is broken.  :Wink: 

The last time I tried to use the Gentoo sources it had similar issues if you tried to use it without preemption.  So I'm working off the vanilla tree for the moment.

Bryn.

----------

## craftyc

 *Curious wrote:*   

>  *craftyc wrote:*   Any ideas why this option needs to be compiled in? 
> 
> Because it is broken. 
> 
> The last time I tried to use the Gentoo sources it had similar issues if you tried to use it without preemption.  So I'm working off the vanilla tree for the moment.
> ...

 #

OK then, so will I.  :Smile: 

----------

## Sivar

 *Curious wrote:*   

>  *craftyc wrote:*   Any ideas why this option needs to be compiled in? 
> 
> Because it is broken. 
> 
> The last time I tried to use the Gentoo sources it had similar issues if you tried to use it without preemption.  So I'm working off the vanilla tree for the moment.
> ...

 

It works perfectly if you add SMP support (and presumably preemption, I've never tried it without), neither of which should be harmful in any way. Preemption, if anything, helps and the SMP support just complains about finding only one CPU and goes about its business. Why use the vanilla sources?

----------

## AutoBot

I'm sure they meant use vanilla-sources and then patch it to fit ones needs.

----------

## jay

 *craftyc wrote:*   

> After rebooting with the new kernel I get a load of failed dependancies. Any ideas how this can be fixed?

 

Search the forum for "unresolved symbols" or "kernel compile error" - you'll find some tips. If the problem persist with special modules, post your error messages here. Also Google around for these error messages, in many mailing list there's a work-around posted.

----------

## craftyc

I think I'll stick with vanilla-sources until the next version of gentoo-sources comes out.

----------

## jay

Here seems to be another solution to disable SMP:

https://forums.gentoo.org/viewtopic.php?t=475&highlight=mrproper

So it's not broken, it's just a dependency problem  :Smile: 

----------

## JefP@@

At first I tried the gentoo-sources ... the kernel compiled, even modules ... booting no problem, everything worked flowlessly. But I got a lot of kernel messages spammed in my console. Preemptive exit kernel msgs or smth. I though, maybe there was some debugging option for preemptive, but I couldn't find it anyhow ... so I downloaded the 2.4.18 sources from kernel.org & patched it with the preemptive patch. Compiled it & everything's working great...  duno what the prob was / what I did wrong ... 

Any thoughts on this?

Grtz

----------

## Zu`

 *craftyc wrote:*   

> I have emerged the gentoo-sources and when I try to compile I get this error at the end.
> 
> ```
> ake[2]: Leaving directory `/usr/src/linux-2.4.19-gentoo-r5/arch/i386/lib'
> 
> ...

 

The correct solution to your problem is stated here:

https://forums.gentoo.org/viewtopic.php?t=33

It happened to me as well, and only occurs if you first compile the kernel with SMP support and then later recompile it without (with the same sources) If you do a make mrproper before proceeding, it will go fine.

I wonder why SMP is selected by default anyways.. gives nothing but trouble  :Smile: 

----------

## jay

 *Zu` wrote:*   

> 
> 
> I wonder why SMP is selected by default anyways.. gives nothing but trouble 

 

Full ACK - I was desperately trying to get my nvidia drivers to work but couldn't. The standard answer at #nvidia is already: "So you're using a gentoo kernel? Get yourself a 2.418 kernel directly from kernel.org and it will work!". I spend about 2 weeks on this issue. Finally I tracked this down as a result of SMP enabled in my kernel.

I also suggest to disable SMP by default.

----------

## Zu`

Yeah. But 2.4.18 from kernel.org has SMP enabled by default as well. So this doesn't change anything. And the gentoo sources work fine for me with nvidia drivers, they just need proper configuration.

So whatever those guys say at #nvidia, don't believe them  :Smile: 

We're fine running our gentoo sources   :Cool: 

Hehe

----------

## jay

I started with the 2.4.18 drivers and after I got this working, I emerged the latest gentoo-sources and now I'm running my nvidia drivers happily in the 2.4.19-rc5 release.

----------

## Egil

 *Zu` wrote:*   

>  *craftyc wrote:*   I have emerged the gentoo-sources and when I try to compile I get this error at the end.
> 
> ```
> ...
> 
> ...

 

I had the same problem and it was my first compile of the kernel.  (I also did a "make mrproper" before attempting to compile.)  I was trying to compile with SMP turned off and the first APIC option after the SMP option turned on.  (I am not at the Linux box so I cannot specifically quote the options.)

I solved the problem by turning on the IOAPIC option (second option after SMP in my menuconfig).

(I next failed because I had turned off quota support but chosen quota support for XFS. - I need to be consistent in my choices.  (*shrug*))

I hope this helps.

----------

