LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error while building kernel (http://www.linuxquestions.org/questions/linux-software-2/error-while-building-kernel-222281/)

linuxboy69 08-25-2004 02:15 PM

Error while building kernel
 
I put in the output that I get when I try do the 'make bzImage'. I custom built the kernel using the 'make config command'. I have googled the errors below and have had no luck finding the problem. Can anyone help me. Maybe point me to a good site where I can troubleshoot my problem. If you need any additional information let me know.

Thanks in advance




ar rcs lib.a checksum.o old-checksum.o delay.o usercopy.o getuser.o memcpy.o strstr.o
make[2]: Leaving directory `/usr/src/linux-2.4.21-15.EL/arch/i386/lib'
make[1]: Leaving directory `/usr/src/linux-2.4.21-15.EL/arch/i386/lib'
gcc -E -D__KERNEL__ -I/usr/src/linux-2.4.21-15.EL/include -xc -P arch/i386/vmlinux.lds.in -o arch/i386/vmlinux.lds
make[1]: Entering directory `/usr/src/linux-2.4.21-15.EL'
ld -m elf_i386 -T /usr/src/linux-2.4.21-15.EL/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.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/char/drm/drm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/audit/audit-stubs.o drivers/pci/driver.o drivers/video/video.o drivers/usb/usbdrv.o drivers/media/media.o crypto/crypto.o net/network.o /usr/src/linux-2.4.21-15.EL/arch/i386/lib/lib.a /usr/src/linux-2.4.21-15.EL/lib/lib.a /usr/src/linux-2.4.21-15.EL/arch/i386/lib/lib.a --end-group -o vmlinux
arch/i386/kernel/kernel.o(.text+0x3c8b): In function `enable_irq':
: undefined reference to `send_IPI_self'
make[1]: *** [kallsyms] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4.21-15.EL'
make: *** [vmlinux] Error 2

ky-lab_rat 08-25-2004 03:24 PM

For me in the past things errors like these

where bad references in the .config file for your kernel. 1st I would check is see if these lines are in your .config and just rem them out at first and try it again.

I would also try to do a make xconfig and see if it complains about the same errors.

Nothing else do a grep of your src dir and try to find the file containing the function then check that same file in a no patched version of your source and see if the same reference is there.

Just my 2 cents

linuxboy69 08-25-2004 03:48 PM

I am trying to compile the kernel on a web server which does not have Xwindows on so I can not do a xconfig. I checked my .config file and there is nothing like "send_IPI_self" in there.

Thank your help

ky-lab_rat 08-25-2004 03:50 PM

did you try greping the src dir and find the file that contains that reference?

linuxboy69 08-25-2004 04:06 PM

I'm sorry, I didn't understand your last comment. What file am I looking for that has the "enable_irq" function?

ky-lab_rat 08-25-2004 04:30 PM

This is my over all take on the issue.

The custom kernel you have has an invalid function/reference in one of the source or include files.

Okay I did a little googling and found out that your running redhat enterprise linux and the reference is in /usr/src/linux-2.4.21-15.EL/arch/i386/kernel/smp.c file

I also found a link that might be discussing one patch that might be effecting you

http://www.balug.org/pipermail/balug...ch/002332.html

To me it sounds like you might need to contact Redhat and have them give you a patch for the file

linuxboy69 08-25-2004 04:50 PM

In this error that I got from the kernel:

"arch/i386/kernel/kernel.o(.text+0x3c8b): In function `enable_irq':
: undefined reference to `send_IPI_self'"

Does the "undefined reference" part mean that it was unable to locate the send_IPI_self function inside the "enable_irq" function? The smp.c file as you probably already know deals with the multi-processing which I specifically left out (cause I only have one cpu) and it contained the "send_IPI_self function in the error. Is it possible that I accidentally compilied in an option that needs SMP compilied in to work? Could that be my problem?

Thanks for all your help.

ky-lab_rat 08-25-2004 05:01 PM

It's possible. I saw this in one of the make references


Quote:


Symmetric multi-processing support (SMP)

This enables support for systems with more than one CPU. If you have
a system with only one CPU, like most personal computers, say N. If
you have a system with more than one CPU, say Y.

If you say N here, the kernel will run on single and multiprocessor
machines, but will use only one CPU of a multiprocessor machine. If
you say Y here, the kernel will run on many, but not all,
singleprocessor machines. On a singleprocessor machine, the kernel
will run faster if you say N here.

Note that if you say Y here and choose architecture "586" or
"Pentium" under "Processor family", the kernel will not work on 486
architectures. Similarly, multiprocessor kernels for the "PPro"
architecture may not work on all Pentium based boards.

People using multiprocessor machines who say Y here should also say
Y to "Enhanced Real Time Clock Support", below. The "Advanced Power
Management" code will be disabled if you say Y here.

See also the <file:Documentation/smp.txt>,
<file:Documentation/i386/IO-APIC.txt>,
<file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
<http://www.tldp.org/docs.html#howto>.

If you don't know what to do here, say N.

You might want to check if you have enabled Power man. I also see some references in some of those files for the "enable_irq" and "send_IPI_self"

Maybe just saying no to N to both of those options. I have not done much with SMP Kernels so I'm guessing on those options. But by the way it sounds saying no to both of them might do it.

linuxboy69 08-25-2004 05:22 PM

I checked the .config file and I have already said no to both. oh well, I will just keep plugging away at it. Thank you for helping me.

linuxboy69 08-25-2004 05:56 PM

WOOT!! I figured it out. I had "Local APIC support on uniprocessors" enabled. Once I disabled it, it was smoot sailing from there (knock on wood). Now I can sleep better.

linuxboy69 08-26-2004 01:09 PM

:confused: now when I do a "make modules" I get an error but I believe this is an easier problem to fix. When I first install RHEL on the machine I used the cdrom. Since then I have removed the cdrom and I am trying to build a custom kernel. Is it possible that I am getting this error because I do not physically have a cdrom in the server anymore? I will continue to try and google an answer to my problem. Any help is greatly appreciated.

Here is the error:

make -C cdrom modules
make[2]: Entering directory `/usr/src/linux-2.4.21-15.EL/drivers/cdrom'
gcc -D__KERNEL__ -I/usr/src/linux-2.4.21-15.EL/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -Wno-unused -fomit-frame-pointer -pipe -freorder-blocks -mpreferred-stack-boundary=2 -march=pentium4 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.21-15.EL/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=cdrom -DEXPORT_SYMTAB -c cdrom.c
In file included from /usr/src/linux-2.4.21-15.EL/include/linux/prefetch.h:13,
from /usr/src/linux-2.4.21-15.EL/include/linux/list.h:6,
from /usr/src/linux-2.4.21-15.EL/include/linux/module.h:12,
from cdrom.c:255:
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:61: warning: parameter names (without types) in function declaration
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:61: field `loops_per_jiffy_R_ver_str' declared as a function
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:84: invalid suffix on integer constant
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:84: syntax error before numeric constant
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:84: warning: function declaration isn't a prototype
In file included from /usr/src/linux-2.4.21-15.EL/include/linux/prefetch.h:13,
from /usr/src/linux-2.4.21-15.EL/include/linux/list.h:6,
from /usr/src/linux-2.4.21-15.EL/include/linux/module.h:12,
from cdrom.c:255:
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:270:1: warning: "EISA_bus" redefined
In file included from /usr/src/linux-2.4.21-15.EL/include/linux/modversions.h:138,
from <command line>:1:
/usr/src/linux-2.4.21-15.EL/include/linux/modules/i386_ksyms.ver:81:1: warning: this is the location of the previous definition
/usr/src/linux-2.4.21-15.EL/include/asm/processor.h:272: warning: parameter names (without types) in function declaration
In file included from cdrom.c:255:
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:190: invalid suffix on integer constant
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:190: syntax error before numeric constant
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:190: `inter_module_register_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:190: warning: function declaration isn't a prototype
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:191: invalid suffix on integer constant
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:191: syntax error before numeric constant
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:191: `inter_module_unregister_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:191: warning: function declaration isn't a prototype
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:192: `inter_module_get_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:192: warning: parameter names (without types) in function declaration
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:193: `inter_module_get_request_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:193: warning: parameter names (without types) in function declaration
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:194: invalid suffix on integer constant
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:194: syntax error before numeric constant
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:194: `inter_module_put_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:194: warning: function declaration isn't a prototype
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:203: `try_inc_mod_count_R_ver_str' declared as function returning a function
/usr/src/linux-2.4.21-15.EL/include/linux/module.h:203: warning: parameter names (without types) in function declaration
make[2]: *** [cdrom.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.21-15.EL/drivers/cdrom'
make[1]: *** [_modsubdir_cdrom] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.21-15.EL/drivers'
make: *** [_mod_drivers] Error 2


All times are GMT -5. The time now is 11:26 AM.