Re: 2.4.20 kernel link failure: undefined reference to `_mcount'
On Thu, Dec 12, 2002 at 02:17:24PM -0600, Roy Bixler wrote: > On Thu, Dec 12, 2002 at 05:17:29PM +, Dave Love wrote: > > Holt Sorenson <[EMAIL PROTECTED]> writes: > > > > > I'm attempting to compile kernel 2.4.20 on a sun ultra 2 using > > > gcc-3.0 (3.0.4) from debian gnu/linux sparc woody 3.0r0. > > > > Don't. Use `egcs64' -- see archives of this list. Does the procedure > > in the kernel section of the Debian FAQ not work? If it doesn't, > > please make a bug report. > > I have successfully used the latest gcc-3.2.1 builds to compile kernel > 2.4.20 on a Sunblade 100 (Ultra IIe processor). At least, the kernel > has been up for more than 7 days without a problem. Ack. I will go with egcs64 for now, but thanks for the info. > -- > Roy Bixler <[EMAIL PROTECTED]> > The University of Chicago Press
Re: 2.4.20 kernel link failure: undefined reference to `_mcount'
On Thu, Dec 12, 2002 at 05:17:29PM +, Dave Love wrote: > Holt Sorenson <[EMAIL PROTECTED]> writes: > > > I'm attempting to compile kernel 2.4.20 on a sun ultra 2 using > > gcc-3.0 (3.0.4) from debian gnu/linux sparc woody 3.0r0. > > Don't. Use `egcs64' -- see archives of this list. Does the procedure ah ha. The magic foo. Thanks! I tried searching the archives but the search function on debian.org didn't return anything useful. I tried things like 'kernel compile' and 'kernel'. > in the kernel section of the Debian FAQ not work? If it doesn't, > please make a bug report. Are you referring to "9.2 What tools does Debian provide to build custom kernels?" I haven't used it. I'm used to my old ways that grew from using slackware. Thanks for pointing me towards a new trick. I'll give it a go and adopt it if I'm happy with the process. I just started using debian-sparc. I have used debian-i386 for quite some time now, so I've had a few very minor bumps including this one as I transition. Thanks for helping me knock one out. > [What's the advantage of that kernel over the latest Debian package > anyway?] 2.4.20 itself may or may not have significant advantages. I didn't work really hard at comparing it to 2.4.18. I'm patching it to support filesystem acls and exploring patching gr-security into it. With patches that aren't part of the mainstream kernel, it has been my experience that using the most recent patch with the most recent kernel is generally a good idea. > > The linux kernel faq > > (http://www.wsinf.edu.pl/doc/doc-linux-html/FAQ/Linux-FAQ-8.html) > > suggests that the linker is using a static libc for linking. > I don't think that's a kernel FAQ, despite the name. Ack. Thanks.
2.4.20 kernel link failure: undefined reference to `_mcount'
I'm attempting to compile kernel 2.4.20 on a sun ultra 2 using gcc-3.0 (3.0.4) from debian gnu/linux sparc woody 3.0r0. The linux kernel faq (http://www.wsinf.edu.pl/doc/doc-linux-html/FAQ/Linux-FAQ-8.html) suggests that the linker is using a static libc for linking. The linker command below doesn't show that /usr/lib/libc.a is being linked in but perhaps it's implied (this doesn't quite make sense though, since kernels are usually 500k to 1 MB and libc.a is a little over 2MB on both i386 and sparc) ? In any case, is there any special magic I need to do to compile this ? I used 3.0.4 because 2.9.5 didn't seem to have a compiler for sparc64. Lots of thanks in advance. link error: ld -m elf64_sparc -T arch/sparc64/vmlinux.lds arch/sparc64/kernel/head.o arch/sparc64/kernel/init_task.o init/main.o init/version.o init/do_mounts.o \ --start-group \ arch/sparc64/kernel/kernel.o arch/sparc64/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o arch/sparc64/math-emu/math-emu.o \ drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/scsi/scsidrv.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/sbus/sbus_all.o drivers/video/video.o drivers/md/mddev.o \ net/network.o \ /usr/src/linux-2.4.20/lib/lib.a /usr/src/linux-2.4.20/lib/lib.a /usr/src/linux-2.4.20/arch/sparc64/prom/promlib.a /usr/src/linux-2.4.20/arch/sparc64/lib/lib.a \ --end-group \ -o vmlinux init/main.o: In function `check_bugs': init/main.o(.text+0x8): undefined reference to `_mcount' init/main.o: In function `rest_init': init/main.o(.text+0x28): undefined reference to `_mcount' init/main.o: In function `init': init/main.o(.text+0x88): undefined reference to `_mcount' init/main.o: In function `profile_setup': init/main.o(.text.init+0x8): undefined reference to `_mcount' init/main.o: In function `checksetup': init/main.o(.text.init+0x48): undefined reference to `_mcount' init/main.o(.text.init+0xe8): more undefined references to `_mcount' follow make: *** [vmlinux] Error 1