LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   trying to compile the 2.6.21.5 kernel (https://www.linuxquestions.org/questions/slackware-14/trying-to-compile-the-2-6-21-5-kernel-562708/)

underworld288 06-18-2007 12:36 PM

trying to compile the 2.6.21.5 kernel
 
I am trying to compile and install the 2.6.21.5 kernel but I keep getting errors when running the make menuconfig command. Here is the output...

Code:

HOSTCC  scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:153,
                from /usr/include/limits.h:145,
                from /usr/lib/gcc/i486-slackware-linux/4.1.2/include/limits.h:122,
                from /usr/lib/gcc/i486-slackware-linux/4.1.2/include/syslimits.h:7,
                from /usr/lib/gcc/i486-slackware-linux/4.1.2/include/limits.h:11,
                from scripts/basic/fixdep.c:115:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
In file included from /usr/include/sys/socket.h:35,
                from /usr/include/netinet/in.h:24,
                from /usr/include/arpa/inet.h:23,
                from scripts/basic/fixdep.c:117:
/usr/include/bits/socket.h:310:24: error: asm/socket.h: No such file or directory
scripts/basic/fixdep.c: In function 'use_config':
scripts/basic/fixdep.c:206: error: 'PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:206: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:206: error: for each function it appears in.)
scripts/basic/fixdep.c:206: warning: unused variable 's'
scripts/basic/fixdep.c: In function 'parse_dep_file':
scripts/basic/fixdep.c:306: error: 'PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:306: warning: unused variable 's'
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2


Can anyone tell me what is wrong from the output or give me any advice?

thanks

titopoquito 06-18-2007 12:52 PM

I'm not 100 % sure, but I think you need the kernel headers package that is coming with Slackware.

underworld288 06-18-2007 12:56 PM

ok then, if you are correcty, how would I go about doing that? http://packages.slackware.it?

titopoquito 06-18-2007 01:00 PM

You can take the headers package that is on your Slackware CD. And I think that even the 2.4.33 kernel headers should be ok. What kernel do you actually have installed? You could probably without any harm install the 2.6 headers from the /extra folder instead of the 2.4 ones.

If you mount your CD you find them at $PATH_TO_CD/extra/linux-2.6.17.13/linux-headers...tgz (2.6 kernel) and $PATH_TO_CD/slackware/d/kernel-headers...tgz (2.4 kernel) -- I abbreviated them but you should find them this way without problem.

EDIT: Sorry, I didn't recognize the URL to the now official package browser but thought you were talking about a package from www.slacky.it. So yes, if you search them on http://packages.slackware.it or take them from your CD doesn't matter at all :)

underworld288 06-18-2007 01:10 PM

well i have the 2.4.33.3 kernel installed right now, the one that comes default with slackware 11.

underworld288 06-18-2007 01:26 PM

I found the kernel-headers-2.6.21.5 package on the site but cant find the linux-headers. I can't use the disc i got cause for some reason it isn't mounting and when I try to install the kernel headers my kernel is to old to install that so.. idk what to do. Anyone got an idea?

titopoquito 06-18-2007 01:39 PM

I thought kernel headers are linux headers, but please someone correct me if that's wrong. What Slackware version and kernel have you installed now? 11.0 with 2.4.33 kernel? Looks like you have searched for "Slackware current" packages?
I have Slackware 11.0 with the 2.6 kernel and the 2.6 headers. I get no error if I untar the 2.6.21.5 sources and call "make menuconfig". I don't know if something else might be missing or screwed up, but I think someone else could jump in now ... :eek:

bioe007 06-18-2007 02:30 PM

you probably don't want to install the headers from slackware current. because you almost certainly will bork things if your kernel headers are compiled against a different version of glibc. (or something like that)

find the slackware-11.0 headers and install them. any flavor should work, AFAIK the 2.4 one should be fine as well.

this is confusing, but you don't actually need the 2.6.21.5 headers, just some from a slackware 11 kernel.

also remember to make mrproper before trying anything with a 2.6 kernel.

underworld288 06-19-2007 01:34 PM

when i try to install the headers for 2.4.33.3 it give me this output.

Code:

Installing package headers...
PACKAGE DESCRIPTION:
FATAL: kernel too old
/sbin/installpkg: line 220:  5661 Segmentation fault      /sbin/ldconfig
Executing install script for headers...

I see in there it says my kernel is to old, how is that when my kernel is the same as the headers that I'm trying to install?

Petri Kaukasoina 06-19-2007 02:50 PM

Quote:

Originally Posted by underworld288
FATAL: kernel too old
Segmentation fault /sbin/ldconfig

/sbin/ldconfig complains about your running kernel. It seems as if you had installed packages from slackware-current without reading the instructions. It is interesting that it still works at all, with glibc-2.5 on a 2.4 kernel (?)

underworld288 06-19-2007 03:00 PM

oh well do you think i should even try and continue building the updated kernel on this machine or reinstall slackware?

bioe007 06-19-2007 04:38 PM

do you still have your slack-11 kernel installed too?

if so just change /etc/lilo.conf to point at the old slack-11 kernel, then boot into that.

if not I'd try installpkg <slack-11 disk>/<kernel that used to work>.tgz

update /etc/lilo.conf
run /sbin/lilo

you can download a 2.6.XX.Y kernel from kernel.org (use a mirror) or use the source off a slack disc

<edit> ++ you can always use slack CD1 (or DVD) as a rescue disk by booting it and then chrooting into your old root directory.

underworld288 06-19-2007 09:49 PM

oh well thanks for the info but I just went ahead and installed slackware again, thank anyway though. Bioe007, I noticed you have a link on how to do this sort of thing, its actually really helpful. I tell you if it got me through the whole process or if I run into any problem though.

underworld288 06-19-2007 10:53 PM

alright I'm at the configuring the kernel part and I cant start any of the graphical menues. I've tried xconfig, command not found is what it said, I also tried menuconfig, another command not found. What should I do now?

titopoquito 06-20-2007 03:35 AM

Oh well, you are root when you try this?


All times are GMT -5. The time now is 08:18 AM.