LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-15-2004, 05:05 PM   #1
linuxgamer09483
Member
 
Registered: Feb 2004
Distribution: Slackware 9.1+
Posts: 33

Rep: Reputation: 15
Errors compiling kernel


Running slack-current / kernel 2.4.18
trying to compile 2.6.1

I do make mrproper, menuconfig, then make bzImage...
from 2> output:

/usr/src/linux-2.6.1/scripts/mkcompile_h: line 72: cmp: command not found
/usr/src/linux-2.6.1/scripts/mkcompile_h: line 72: cmp: command not found
arch/i386/boot/setup.S: Assembler messages:
arch/i386/boot/setup.S:165: Warning: value 0x37ffffff truncated to 0x37ffffff

/bin/sh: line 1: arch/i386/boot/compressed/vmlinux.bin: No such file or directory
make[2]: *** [arch/i386/boot/compressed/vmlinux.bin.gz] Error 1
make[1]: *** [arch/i386/boot/compressed/vmlinux] Error 2
make: *** [bzImage] Error 2

 
Old 02-15-2004, 05:20 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 197Reputation: 197
Do a 'make' and not make bzImage after the menuconfig. Also make sure its saving your .config file as well after doing menuconfig.
 
Old 02-15-2004, 05:23 PM   #3
bnice
Member
 
Registered: Feb 2004
Location: Sacramento, CA
Distribution: Slack 9.1, slackware-current
Posts: 284

Rep: Reputation: 30
cmp is a comparison function found in diffutils pkg.


you need to install diffutils package from ap folder

Last edited by bnice; 02-15-2004 at 05:24 PM.
 
Old 02-15-2004, 05:41 PM   #4
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
Quote:
Originally posted by trickykid
Do a 'make' and not make bzImage after the menuconfig. Also make sure its saving your .config file as well after doing menuconfig.
Why do a make instead of a make bzImage? I am just asking to understand.
 
Old 02-15-2004, 05:52 PM   #5
linuxgamer09483
Member
 
Registered: Feb 2004
Distribution: Slackware 9.1+
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks both for replying...

Quote:
Do a 'make' and not make bzImage after the menuconfig.
Actually I tired 'make' before doing 'make bzImage' and ran into the same problem.
(I did make mrproper and make clean inbetween ofcourse)
Quote:
Also make sure its saving your .config file as well after doing menuconfig.
Yup.

Quote:
cmp is a comparison function found in diffutils pkg.
Thanks - I had been wondering about that. Installing diffutils got rid of the first few errors but unfortunately didnt solve the fatal error

Also, Im using gcc-3.3.2, if that matters...
 
Old 02-15-2004, 07:16 PM   #6
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
thats the problem u cant use gcc-3****, it jsut wont work, install and use gcc 2.(whatever i think the newst one is 2.5.9? (im not sure), i dono if u can use gcc-3* on 2.6 kernels but 2.4 u must use less then gcc 3.** (recomended is somthing like gcc-2.5.2 (if i remember right)
 
Old 02-15-2004, 07:24 PM   #7
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
well your gcc version shouldn't be a problem, cause i have gcc 3.2.3 and have compiled a few 2.6.x kernels fine ....
secondly try downloading and compiling kernel 2.6.2 ..
it would make more sense, since it is the latest stable ..
and you may have better success also ;-)
 
Old 02-15-2004, 07:32 PM   #8
linuxgamer09483
Member
 
Registered: Feb 2004
Distribution: Slackware 9.1+
Posts: 33

Original Poster
Rep: Reputation: 15
I tried 2.6.2 first. I thought trying 2.6.1 might be a cheap way around the problem...
I'll try using gcc 2.x and see what happens..
 
Old 02-15-2004, 07:53 PM   #9
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
I just built a LFS system. They recommend using gcc-2.95.3 for compiling the kernel. This is the version that the kernel developers say to use. I think that it is hardly nessesary. Lots of people use gcc-3.*** for compiling all their programs including the kernel, without any problem.
 
Old 02-16-2004, 09:58 AM   #10
sandesh_hs
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora,redhat linux
Posts: 4

Rep: Reputation: 0
Wink

Upgrade your system per the Changes file.

There are a number of utilities that you will have to upgrade for them to work properly with your new 2.6 kernel. Some of the utilities listed in 'Changes' you won't have to worry about, as for example they may be specific to certain filesystems. However, you will at least need to meet the minimum version requirements for the following (see 'Documentation/Changes' for the latest requirements -- they may have changed!):

Name: Minimum version: How to find version:
Gnu C Compiler 2.95.3 gcc --version
Gnu Make 3.78 make --version
binutils 2.12 ld -v
util-linux 2.10o fdformat --version
module-init-tools 0.9.9 depmod -V
procps 2.0.9 ps --version
[procps 2.x] [procps 3.x]
The following utilities are filesystem specific. If you're running ext2 or ext3, be sure to update your e2fsprogs, if you're running jfs, be sure to update jfsutils, etc...

Name: Minimum version: How to find version:
e2fsprogs 1.29 tune2fs
jfsutils 1.0.14 fsck.jfs -V
reiserfsprogs 3.6.3 reiserfsck -V 2>&1 | grep reiserfsprogs
xfsprogs 2.1.0 xfs_db -V
nfs-utils 1.0.5 showmount --version
And a handful of other utilities that you'll want to update if you use them:

Name: Minimum version: How to find version:
pcmcia-cs 3.1.21 cardmgr -V
quota-tools 3.09 quota -V
PPP 2.4.0 ppd --version
isdn4k-utils 3.1pre1 isdnctrl 2>&1 | grep version
oprofile 0.5.3 oprofiled --version
If you're going to be running ALSA for the first time, also be sure to visit http://www.alsa-project.org/ to grab the latest alsa-lib and alsa-utils.



Step 4: Configure your new kernel.
One of the first changes you'll notice is the new build system [story]. The old Tk/Tcl 'xconfig' build method no longer exists, replaced by a new QT based 'xconfig'. Non-QT fans will be happy to find that a GTK based 'gconfig' is also available for their use.

2.6 build methods include:

make config

This appears to be identical to 'config' in the 2.4 kernel. As the most simplistic configuration method, it simply asks you about each configuration option, one at a time... Requires the 'bash' shell.

make menuconfig

This appears to be identical to 'menuconfig' in the 2.4 kernel. A simple curses based configuration method.

make xconfig

This new default graphical configuration system uses the QT libraries. I found it to be quite functional and easy to use.

make gconfig

This option is a clone of the new xconfig, however using the GTK libraries instead of the QT libraries. Unfortunately, in my brief testing I found it to be somewhat buggy. While running, it spews out the same error over and over, and crashed rather quickly. Here's a log to show you what I'm talking about.

make oldconfig
This build option will prove extremely useful to you as you upgrade to newer and newer 2.6 kernels. At first glance it looks identical to the plain 'make config', however 'oldconfig' reads your current .config settings and automatically answers for you based on these settings, only prompting you for new configuration choices. To use, simply copy in your old .config file, then type 'make oldconfig'.

When configuring your 2.6 kernel for the first time, keep in mind the following tips from the top-level README file that came with your Linux source:
having unnecessary drivers will make the kernel bigger, and can under some circumstances lead to problems: probing for a nonexistent controller card may confuse your other controllers.
the "kernel hacking" configuration details usually result in bigger or slower kernel (or both), and can even make the kernel less stable by configuring some routines to actively try to break bad code to find kernel problems (kmalloc()). Thus you should probably answer 'n' to the questions for "development", "experimental", or "debugging" features.
ALSA:
For many people upgrading from 2.4 to 2.6, this will be your first time using the Advanced Linux Sound Architecture (ALSA) which has replaced OSS. Though it may be tempting to simply enable the deprecated OSS and go about your life as normal, it's probably worth your time to get ALSA working. Thanks to ALSA's OSS API Emulation, it's really not that hard. When configuring your kernel, be sure to enable the OSS emulation options (SND_OSSEMUL, SND_MIXER_OSS and SND_PCM_OSS) Also be sure to enable the appropriate sound driver (in PCI devices) - I compiled mine directly into the kernel. Finally, be sure to download and install the latest alsa-lib and alsa-utils.

Step 5: Build your new kernel.
Actually building the kernel is one step easier than in 2.4, as you no longer have to type 'make dep'. To build a new kernel, type 'make bzImage'. If you've chosen to compile any modules, you'll also need to 'make modules' and 'make modules_install'. Or, you can string it all together like 'make bzImage && make modules && make modules_install'.

When the build starts, you'll notice that the default build process is much quieter than it was in 2.4, providing simple summaries as opposed to all the compiler output.

Step 6: Install your new kernel.
Now that you've built your kernel, you need to copy it into place. For example, on x86 you'll find it in 'arch/i386/boot'. You'll want to copy this file and your new System.map into /boot. For example:

# pwd
/usr/src/linux-2.6.0-test4
# mv arch/i386/boot/bzImage /boot/bzImage-2.6.0-test4
# mv System.map /boot/System.map-2.6.0-test4
# cd /boot
# rm System.map
# ln -s System.map-2.6.0-test4 System.map
I noticed that my new 2.6 kernel is bigger than the last 2.4 kernel I compiled with the same version of gcc, however it's possible that I have more options enabled:

-rw-r--r-- 1 root root 1094390 Aug 12 20:30 bzImage-2.4.21-ck3
-rw-r--r-- 1 root root 1639129 Aug 27 22:06 bzImage-2.6.0-test4
Having copied your new kernel into place, now you need to configure your boot loader. You're probably using grub [manual] or lilo [howto], refer to the appropriate documentation if you're unsure how your boot loader works.Upgrade your system per the Changes file.

Last edited by sandesh_hs; 02-16-2004 at 09:59 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors Compiling the 2.6.12.4 kernel zeroslack Linux - General 2 08-10-2005 09:02 AM
Errors when compiling kernel bornhj Slackware 18 04-14-2005 12:50 AM
Errors Compiling 2.6.10 Kernel! Please Help! Jonescity Slackware 12 02-26-2005 06:01 PM
Kernel compiling errors krackerroot Slackware 4 10-27-2003 12:33 AM
Errors Compiling Kernel naesyllek Linux - General 2 07-26-2003 07:06 PM


All times are GMT -5. The time now is 09:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration