Kernel Compilation Errors: 'undefined reference'

Kernel Compilation Errors: 'undefined reference'

Post by paul coluc » Sun, 04 Feb 1996 04:00:00



Hello,
   I just installed Slackware 3.0 and everything went OK.  I have
a Mitsumi FX400 ATAPI IDE.  I used the idecd bootdisk to install
the files off the CDROM onto my hard drive.  When the installation
was completed, I did not have CDROM support anymore; I assume (?)
that the kernel loaded on the installed system did not have ATAPI
IDE CDROM support (I checked /proc/devices and the cdrom did not
show up, although the iso9660 format showed up under /proc/filesystems).
I rebooted with the idecd bootdisk and text rootdisk and then I
regained the CDROM back, so I think that CDROM support was not on
the final installed kernel.

  At this point I decided it was a good time to recompile the kernel
with support for my Mitsumi ATAPI IDE support as well as support for
my Pro Audio Spectrum 16 Basic sound card.  I have read the relevant
HOWTO's faithfully.  I did 'make config', 'make def' and 'make clean'.  
I also ensured I had the proper symbolic links to linux and asm.  When
I finally got to 'make zImage', the machine (dx4-120 PCI, 8MB RAM) crunched
around for about 20 minutes, and then choked with many, many, (many!)

                           undefined reference to

statements, and finally

                       make: *** [vmlinuz] Error 1.

I went through the procedure 2 more times with identical results.

The final time, I piped the output of the compilation procedure
to a file.  Below are relevent excerpts from that file:

*************************************

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486  -c -o init/main.o init/main.c
dnsdomainname: Unknown server error
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -DUTS_MACHINE='"i386"' -c -o init/version.o init/version.c
set -e; for i in kernel drivers mm fs net ipc lib arch/i386/kernel arch/i386/mm; do make -C $i; done
make[1]: Entering directory `/usr/src/linux/kernel'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c ksyms.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486  -fno-omit-frame-pointer -c sched.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c dma.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c fork.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c exec_domain.c

                              ^
                              |
                              |

                    cutting out similar output

                              |
                              |
                              v

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c execve.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c wait.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c string.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c vsprintf.c
ar rcs lib.a ctype.o _exit.o open.o close.o errno.o write.o dup.o setsid.o execve.o wait.o string.o vsprintf.o
sync
make[1]: Leaving directory `/usr/src/linux/lib'
make[1]: Entering directory `/usr/src/linux/arch/i386/kernel'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c process.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c signal.c
gcc -D__KERNEL__ -I/usr/src/linux/include -D__ASSEMBLY__ -traditional -c entry.S -o entry.o
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c traps.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c irq.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c vm86.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c bios32.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c ptrace.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c ioport.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c ldt.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c setup.c
ld -r -o kernel.o process.o signal.o entry.o traps.o irq.o vm86.o bios32.o ptrace.o ioport.o ldt.o setup.o
sync
gcc -D__KERNEL__ -I/usr/src/linux/include -E -traditional -o head.s head.S
as -o head.o head.s
make[1]: Leaving directory `/usr/src/linux/arch/i386/kernel'
make[1]: Entering directory `/usr/src/linux/arch/i386/mm'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c init.c
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -m486 -c fault.c
ld -r -o mm.o init.o fault.o
make[1]: Leaving directory `/usr/src/linux/arch/i386/mm'
ld -qmagic -Ttext 0xfffe0 arch/i386/kernel/head.o init/main.o init/version.o \
        arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o net/net.o ipc/ipc.o \
        fs/filesystems.a \
        drivers/block/block.a drivers/char/char.a drivers/net/net.a \
        /usr/src/linux/lib/lib.a -o vmlinux
ld: warning: cannot find entry symbol _start; defaulting to 000fffe0
arch/i386/kernel/head.o(.text+0x18): undefined reference to `__edata'
arch/i386/kernel/head.o(.text+0x1d): undefined reference to `__end'
arch/i386/kernel/head.o(.text+0x7f): undefined reference to `_x86'
arch/i386/kernel/head.o(.text+0xa3): undefined reference to `_x86'
arch/i386/kernel/head.o(.text+0xcf): undefined reference to `_x86'
arch/i386/kernel/head.o(.text+0xdb): undefined reference to `_x86_model'
arch/i386/kernel/head.o(.text+0xe4): undefined reference to `_x86_mask'
arch/i386/kernel/head.o(.text+0xea): undefined reference to `_x86_capability'
arch/i386/kernel/head.o(.text+0xf4): undefined reference to `_x86_vendor_id'
arch/i386/kernel/head.o(.text+0xfa): undefined reference to `_x86_vendor_id'
arch/i386/kernel/head.o(.text+0x100): undefined reference to `_x86_vendor_id'
arch/i386/kernel/head.o(.text+0x171): undefined reference to `_start_kernel'

                           ^
                           |
                           |
                cutting out similar errors  (many, many, too many!)
                           |
                           |
                           v

arch/i386/mm/mm.o(.text+0x18f): undefined reference to `swapper_pg_dir'
arch/i386/mm/mm.o(.text+0x351): undefined reference to `pg0'
arch/i386/mm/mm.o(.text+0x36d): undefined reference to `pg0'
arch/i386/mm/mm.o(.text+0x58a): undefined reference to `pg0'
arch/i386/mm/mm.o(.text+0x5d4): undefined reference to `pg0'
kernel/kernel.o(.text+0x1df): undefined reference to `_current'
kernel/kernel.o(.text+0x1ec): undefined reference to `_last_task_used_math'
kernel/kernel.o(.data+0x39c): undefined reference to `sys_call_table'
kernel/kernel.o(.data+0x454): undefined reference to `floppy_track_buffer'
kernel/kernel.o(.data+0x2aa0): undefined reference to `swapper_pg_dir'
mm/mm.o(.text+0x7f): undefined reference to `swapper_pg_dir'
mm/mm.o(.text+0x2c0): undefined reference to `swapper_pg_dir'
mm/mm.o(.text+0x2f6): undefined reference to `swapper_pg_dir'
fs/fs.o(.text+0xdd7a): undefined reference to `sys_call_table'
fs/fs.o(.text+0xe6ff): undefined reference to `sys_call_table'
fs/fs.o(.text+0xe95a): undefined reference to `sys_call_table'
fs/fs.o(.text+0xea5b): undefined reference to `sys_call_table'
fs/fs.o(.text+0xec1e): undefined reference to `sys_call_table'
floppy.o(.text+0xc3a): undefined reference to `floppy_track_buffer'
floppy.o(.text+0xc49): undefined reference to `floppy_track_buffer'
floppy.o(.text+0xc50): undefined reference to `floppy_track_buffer'
floppy.o(.text+0x2a88): undefined reference to `floppy_track_buffer'
floppy.o(.text+0x2b56): undefined reference to `floppy_track_buffer'
floppy.o(.text+0x3500): more undefined references to `floppy_track_buffer' follow
make: *** [vmlinux] Error 1

**************

   If anyone has any suggestions I greatly appreciate it.

  (I am using Slackware 3.0, 1.2.13 sources dx4-120 PCI w/ 8MB RAM).
--
Paul Colucci
Computational Fluid Dynamics Laboratory
Dept. Mechanical and Aerospace Engineering
State University of New York at Buffalo