LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Libranet (https://www.linuxquestions.org/questions/libranet-34/)
-   -   Kernel compile failing due to a file I can't find (https://www.linuxquestions.org/questions/libranet-34/kernel-compile-failing-due-to-a-file-i-cant-find-105894/)

GreenPenInc 10-19-2003 09:35 AM

Kernel compile failing due to a file I can't find
 
I'm so honored to have the first question in the Libranet forum! :)

Anyway, here's the deal. I'm trying to recompile my kernel to include support for the nVidia AGP on my A7N8X motherboard. It hums along happily until this part:

gcc -D__KERNEL__ -I/usr/src/kernel-source-2.4.20/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon -nostdinc -iwithprefix include -DKBUILD_BASENAME=super -c -o super.o super.c
super.c: In function `read_super_block':
super.c:869: warning: int format, long unsigned int arg (arg 2)
super.c:944:14: missing terminating " character
super.c: In function `reread_meta_blocks':
super.c:945: error: stray '\' in program
super.c:945: error: `ld' undeclared (first use in this function)
super.c:945: error: (Each undeclared identifier is reported only once
super.c:945: error: for each function it appears in.)
super.c:945: error: syntax error before "n"
super.c:945:12: missing terminating " character
make[3]: *** [super.o] Error 1
make[3]: Leaving directory `/usr/src/kernel-source-2.4.20/fs/reiserfs'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/kernel-source-2.4.20/fs/reiserfs'
make[1]: *** [_subdir_reiserfs] Error 2
make[1]: Leaving directory `/usr/src/kernel-source-2.4.20/fs'
make: *** [_dir_fs] Error 2

Error: make bzImage failed

Press ENTER to continue

Naturally the first thing I tried was to type 'find / super.c' and try to fix it myself, but it couldn't find anything! Am I misusing the find command? I'd appreciate any help in finding this file, but of course the root of the problem is trying to get the kernel to compile.

ceedeedoos 10-19-2003 09:51 AM

find /<kernelsourcedir> -name 'super.c'
try that :) if it doesn't return anything, then you don't have it :)

EDIT: I searched my kernel sources for it and found it, so it should be there ...

GreenPenInc 10-19-2003 09:52 AM

Thank you for your prompt reply! I found it and edited. I'm recompiling now... I'll let you know if it works! :)

UPDATE:

Okay, I fixed that problem. ("944GJ" -- gotta love vim!) Now I'm getting a different one though. It's giving me problems with a 'network.o' file -- an undefined reference, to be specific. I don't know where the source file it was compiled from is. I did 'find / -name network.*' and there was no source file either .c or .h.

rstr.o mmx.o
make[2]: Leaving directory `/usr/src/kernel-source-2.4.20/arch/i386/lib'
make[1]: Leaving directory `/usr/src/kernel-source-2.4.20/arch/i386/lib'
ld -m elf_i386 -T /usr/src/kernel-source-2.4.20/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/media/media.o drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/net/fc/fc.o drivers/net/tokenring/tr.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/net/pcmcia/pcmcia_net.o drivers/net/wireless/wireless_net.o drivers/video/video.o drivers/usb/usbdrv.o drivers/input/inputdrv.o drivers/telephony/telephony.o drivers/md/mddev.o drivers/isdn/vmlinux-obj.o \
net/network.o \
/usr/src/kernel-source-2.4.20/arch/i386/lib/lib.a /usr/src/kernel-source-2.4.20/lib/lib.a /usr/src/kernel-source-2.4.20/arch/i386/lib/lib.a \
--end-group \
-o vmlinux
net/network.o(.text+0xd987): In function `rtnetlink_rcv':
: undefined reference to `rtnetlink_rcv_skb'
make: *** [vmlinux] Error 1

How does one get past errors of this type when compiling a kernel?

tal@libranet 10-19-2003 04:47 PM

GCC version
 
Are you by any chance using GCC version 3.3? If so, see the Libranet support database

GreenPenInc 10-19-2003 07:36 PM

Thanks very much for the helpful link! Here's what happened.

I searched the net and found a link which described a patch for my exact problem:
http://www.dilger.at/index.php?show=kernel_gcc33
However, I have no idea how to save that patch and run it! So, I used my programming knowledge. I edited the file directly and took out the line with the minus sign before it and replaced it with the one with the plus sign. I compiled and it worked right away! (As an aside, if anybody could point me in the direction of where to read up on this making of patches like that and how to use them, I'd appreciate it.)

Of course, it gave me another error, something with my IDE CD drive. But this time the error came during the make modules step, and everything else before it had worked. So, I decided to see if it had made the changes I was looking for and rebooted.

Big mistake! Now my ethernet card and sound wouldn't work and I still had no AGP. So I reinstalled from scratch (it was only a day old, no big loss). I found that I'd learned a whole lot! Knowing what I was doing made a huge difference, and all the tiny little problems I had all the other times around were gone. My ethernet card even worked right out of the box!

Here is my current situation: (For those who don't feel like reading the above wordy epistle ;))

So I tried to patch the kernel using NVidia's drivers, and to my great surprise the kernel compile and reinstall worked perfectly! I used the method outlined in the Slackware forum:

make menuconfig
make dep
make clean
make bzImage
make
make install
make modules
make modules-install

Which I found very helpful and useful! I also prefer it to the auto-compile since I control each step. Anyway I rebooted, and tried out TuxRacer (my test app to see if AGP is enabled; so far it's not!). Since it didn't seem to have 3d support I ran lsmod and got this output:

Module Size Used by Not tainted
parport_pc 15716 1 (autoclean)
lp 6784 0 (autoclean)
parport 26048 1 (autoclean) [parport_pc lp]
rtc 6908 0 (autoclean)
natsemi 16928 1
emu10k1 61640 0
ac97_codec 11048 0 [emu10k1]
sound 58804 0 [emu10k1]
soundcore 3844 7 [emu10k1 sound]
smbfs 39088 0 (unused)
apm 10120 1
ide-scsi 8784 0
ide-cd 30180 0
ide-floppy 13792 0
sr_mod 15672 0 (unused)
cdrom 28768 0 [ide-cd sr_mod]
scsi_mod 56468 2 [ide-scsi sr_mod]

No nvgart or agpgart. I've got an All-In-Wonder RADEON (the original!) in the slot. The radeon drivers are installed, as far as I know. Any suggestions for getting the AGP up and running?

jon@libranet 10-21-2003 02:06 AM

There is a procedure in the Libranet support database for patching a kernel that you can look at:

http://libranet.com/support/view.cgi...item=0351.html

uteck 10-21-2003 11:29 AM

The Radion is made by ATI, not nVidia. ATI has not released Linux 3d drivers.

GreenPenInc 10-21-2003 11:55 AM

Sorry, just to clarify -- the nvidia drivers are for my motherboard, an A7N8X. The Radeon is my video card. It doesn't have 3d drivers? That sucks!


All times are GMT -5. The time now is 07:55 PM.