Click to See Complete Forum and Search --> : Trying to compile kernel


prince_kenshi
03-11-2001, 12:23 AM
I've compiled my kernel several times in the past. Today I was trying to compile the 2.4.1 kernel to get some different features but it gives me an error. I downloaded the 2.4.2 kernel and tried to compile it but it's giving me the same error. I have successfully compiled the 2.4.1 kernel before. I should have modern programs on my computer but apt-get is choking because of one program so I can't upgrade anything. Here is the last few things my computer says when making bzImage:

ld -m elf_i386 -Ttext 0x0 -s -oformat binary bbootsect.o -o bbootsect
ld: cannot open binary: No such file or directory
make[1]: *** [bbootsect] Error 1

I thought maybe that meant that it couldn't find the ld command but I can use the command. Does anyone have any ideas? I think I'm going to try to fix apt-get while waiting for a response. Help is appreciated.

rod
03-11-2001, 12:27 AM
What errors are you getting from apt? Are you using Debian's 'kernel-package' to compile?

Regards,
Rod

[ 10 March 2001: Message edited by: rod ]

prince_kenshi
03-11-2001, 02:44 AM
I managed to fix apt-get. It was hanging when it got to a program called console-common saying that some file was missing. But I switched to the stable distro and managed to fix everything. It still won't compile though. I just don't see why two different kernel sources would give that same error. Any clue?

Derango
03-11-2001, 09:59 AM
Go though the make file in /usr/src/kernel/arch/i386/boot/ and every time you see a -oformat change it to --oformat.

Hope this helps.

rod
03-11-2001, 11:32 AM
Make sure you have bin86 installed. apt-get install bin86. This could be the reason for your compiling problems.

Regards,
Rod

Derango
03-11-2001, 12:48 PM
Originally posted by rod:
Make sure you have bin86 installed. apt-get install bin86. This could be the reason for your compiling problems.

Regards,
Rod

There is a specific problem with debian and kernel 2.4.2 (it has to do with the versons of ld installed) where the -oformat switch is not recognized. only the --oformat switch works. Unfortunetly, debian seems to be the only distro with this problem, so the people who wrote the makefiles used the -oformat switch. That switch has to be manualy changed to --oformat for the compile to work (I know, I've been there ;) With that exact error message as well)

Derango
03-11-2001, 12:49 PM
Originally posted by rod:
Make sure you have bin86 installed. apt-get install bin86. This could be the reason for your compiling problems.

Regards,
Rod

There is a specific problem with debian and kernel 2.4.2 (it has to do with the versons of ld installed) where the -oformat switch is not recognized. only the --oformat switch works. Unfortunetly, debian seems to be the only distro with this problem, so the people who wrote the makefiles used the -oformat switch. That switch has to be manualy changed to --oformat for the compile to work (I know, I've been there ;) With that exact error message as well)

rod
03-11-2001, 01:01 PM
Derango... thanks for the information.

Regards,
Rod

Derango
03-11-2001, 02:27 PM
Hey, no problem...it might save you or someone else some frustration and prevent them from trying 4-5 times to compile the 2.4.x kernels on debian without sucess (at least with the newest version of the ld package)

prince_kenshi
03-11-2001, 05:36 PM
Your advice worked perfectly Derango. I'm now using my new kernel. Thanks to both of you for helping.