Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 02-27-2004, 12:14 AM   #1
LQ Newbie
Registered: Jan 2004
Posts: 4

Rep: Reputation: 0
Unhappy RH9 "make modules" won't compile

I'm running Redhat 9 on a Sony Vaio PCG-C1VPK using the 2.4.20-8 kernel, and I wanted to reconfigure and build a new kernel..
I followed the standard steps, which seemed to compile without a hitch:
make config
make dep
make clean
make bzImage
however, "make modules" and/or "make modules_install" won't compile, and there doesn't seem to be any bzImage in the directory, but rather a "vmlinux"

make modules flipped out a lot, including errors like the following:

make[3]: Entering directory `/usr/src/linux-2.4.20-8/drivers/addon/aep'
gcc -D__KERNEL__ -I/usr/src/linux_alt/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -DMODULE -DMODVERSIONS -include /usr/src/linux_alt/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=paep -c -o paep.o paep.c
In file included from paep.c:67:
/usr/src/linux_alt/include/linux/kernel.h:60: invalid suffix on integer constant
/usr/src/linux_alt/include/linux/kernel.h:60: parse error before numeric constant
/usr/src/linux_alt/include/linux/kernel.h:60: warning: function declaration isn't a prototype
/usr/src/linux_alt/include/linux/kernel.h:61: invalid suffix on integer constant
/usr/src/linux_alt/include/linux/kernel.h:61: parse error before numeric constant
/usr/src/linux_alt/include/linux/kernel.h:62: `panic_R_ver_str' declared as function returning a function
/usr/src/linux_alt/include/linux/kernel.h:62: warning: function declaration isn't a prototype

in fact, all the errors that show up seem to originate from paep.c
is it something with redhat's source? should I just grab the kernel source from instead?
any ideas?
Old 02-27-2004, 11:15 AM   #2
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
"should I just grab the kernel source from instead?"

I have always done my kernel compiles using In addition to whatever changes that you want to make you can upgrade to either 2.4.25 or 2.6.3 while you are at it.

Be prepared. Create a LifeBoat CD.

Steve Stites
Old 02-29-2004, 04:25 AM   #3
LQ Newbie
Registered: Feb 2004
Posts: 27

Rep: Reputation: 15
(short answer: its not the new kernel/sources... its the config)

Well the paep is a module that is trying to be compiled. More than likely it might be that the hardware does not contain piece that that module is trying to support.

What was your .config like? if you look at the .config you will see a line like this:


You might want to comment it out, here is my addon section:
# Additional device driver support
# CONFIG_CIPE is not set
# CONFIG_CRYPTO_AEP is not set
# CONFIG_MEGARAC is not set
# CONFIG_FC_QLA2200 is not set
# CONFIG_FC_QLA2300 is not set
# CONFIG_SCSI_ISCSI is not set

For s&g's I looked it up for you -
They sell an SSL crypto card that you can place in a server to offload the software crypto functions (pretty neat actually =)

I'm going to venture a guess that you don't have that card, eh?

Use make menuconfig to "not set" the addon modules.

Here is a good walk through to produce a "clean" kernel from config

cd /usr/src/linux
make clean

make mrproper (don't quote me but I believe mrproper takes to back to what your original kernel config was - ie, so if you have added like a customization for /dev/agpgart, or a NIC card, etc, this will "re"-break it. So remember that you have done this)

make menuconfig (set up your kernel here in this menu - comment out what you don't need. I have yet to find a use for addons... though I may someday - the beauty of Linux =)
make dep
make bzImage
make modules
make modules_install
cp /boot/
cp arch/i386/boot/bzImage /boot/bzImage

And it may be better to not concatenate the commands, e.g., make ; make install etc etc... cuz its hard then to figure out where the mess up happened... do it sequentially and it is more systematic to find the problem.

Here is another good walkthough I found:

Darin Hi all, I'm new to the forum but having broken a few installs of Slackware, RedHat, SUSE, etc by screwing up kernel rebuilds so I'll throw in my learned the hard way method for rebuilding kernels.

* cd /usr/src/linux
* make mrproper (cleans out old build temp files, may not be needed. also note this deletes any previous .config file, see below)
* can copy previous config from /boot as a base template... cp /boot/config-2.4.xx-new .config
* make menuconfig (or make config or make xconfig)
* pick all the appropriate options, but take note:
-remember which of your system drivers you are adding into the kernel and which ones you are modularizing; A good trick is to open /etc/rc.d/rc.modules in a different terminal window and remark/unremark appropriate modules as you go through the config. ie I modularize my sound card driver so uncomment it in rc.modules but build my scsi driver into the kernel so comment out the line for it in rc.modules.
* make dep
* make clean (can do these together, they are fairly short... root@scoob:/usr/src/linux# make dep ; make clean)
* make bzImage (Usually the longest part of the process)
* make zImage instead of bzImage if you can pull off a small kernel
* make modules
-note: can do any command below except make modules_install in a second terminal while make modules is running
* mv /lib/modules/2.4.xx /lib/modules/2.4.xx-old (this moves the old modules out of the way so make modules_install doesn't overwrite them)
* make modules_install (this basically copies the new modules to /lib/modules/2.4.xx)
* cp arch/i386/boot/zImage /boot/vmlinuz-2.2.xx-new
* edit /etc/lilo.conf (it's a good idea to copy your original image= section and rename it to something like original so you can boot the old kernel)
*mv /boot/
*delete or rename the symbolic link and make a new one ln -s /boot/ /boot/
*cp .config /boot/config-2.4.xx-new
*delete or rename the symbolic link config and make a new one ln -s /boot/config-2.4.xx-new /boot/config
* /sbin/lilo
* reboot (no need to do it immediately but the new kernel won't be loaded until you reboot)

This does a few things, first off the from the new build is now in /boot where the kernel can find it rather than the old one. Second, you have a saved copy of your .config as /boot/config-2.4.xx-new and can copy it back as a template if you need to modify your kernel build, see the third step above. By moving the old modules out of the way, you can trim your system by deleting these once you are satisfied with the new kernel.

Things to look out for:
-This isn't the definitive guide to compiling your kernel! Do reference any appropriate man pages, HOWTOs, etc while doing this.
-on Slackware, your network card module may be loaded in /etc/rc.d/rc.netdevice instead of /etc/rc.d/rc.modules
-by moving your old modules out of the way you can hose your system if you forgot an important module like your hard drive driver in the new kernel.
-editing the rc. startup files can really mess up your system if you don't CAREFULLY follow syntax.

I've also had problems where errors fly by on screen during boot and you can't find them in system logs and there is probably a proper way to get the sysytem to log them but a dirty trick that I use is to open up the startup files like rc.M and add some pauses like this:


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
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
Advice on how to test "# make modules" grautu Linux - Software 2 08-04-2005 03:24 AM
how do i compile or make "Wine" work in slackware? Tod_Con Linux - Software 2 06-21-2004 02:53 AM
Installing Sound card - can't "make modules" BrianK Linux - Hardware 3 01-04-2004 06:49 PM
during compile "make" fails. thom Linux - Newbie 3 03-05-2002 07:57 PM > Forums > Linux Forums > Linux - Software

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

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