Click to See Complete Forum and Search --> : using apt-get install to install a new kernel


DimGR
06-01-2004, 12:09 AM
why i get these errors? i tried all 3 options and all gave me errors

cd /usr/src/linux/
root@PenguinGR:/usr/src/linux# make xconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@PenguinGR:/usr/src/linux# make oldconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@PenguinGR:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@PenguinGR:/usr/src/linux#

maccorin
06-01-2004, 12:13 AM
that makes me think you don't have the kernel headers installed

(esp the /usr/include/asm/socket.h missing part)


EDIT:

your distro should have a package w/ them, make sure you use it, because you should have the _same_ headers glibc was compiled against on your system

DimGR
06-01-2004, 12:23 AM
Originally posted by maccorin
that makes me think you don't have the kernel headers installed

(esp the /usr/include/asm/socket.h missing part)


EDIT:

your distro should have a package w/ them, make sure you use it, because you should have the _same_ headers glibc was compiled against on your system


i just installed them but the same problem occurs


apt-get install kernel-headers-2.6.6-1-386
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
kernel-headers-2.6.6-1 kernel-kbuild-2.6-3
The following NEW packages will be installed:
kernel-headers-2.6.6-1 kernel-headers-2.6.6-1-386 kernel-kbuild-2.6-3
0 upgraded, 3 newly installed, 0 to remove and 119 not upgraded.
Need to get 3281kB of archives.
After unpacking 41.6MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 ftp://linux.csua.berkeley.edu unstable/main kernel-kbuild-2.6-3 2.6.6-1 [352kB]
Get:2 ftp://linux.csua.berkeley.edu unstable/main kernel-headers-2.6.6-1 2.6.6-1 [2684kB]
Get:3 ftp://linux.csua.berkeley.edu unstable/main kernel-headers-2.6.6-1-386 2.6.6-1 [245kB]
Fetched 3281kB in 53s (61.5kB/s)
Selecting previously deselected package kernel-kbuild-2.6-3.
(Reading database ... 104986 files and directories currently installed.)
Unpacking kernel-kbuild-2.6-3 (from .../kernel-kbuild-2.6-3_2.6.6-1_i386.deb) ...
Selecting previously deselected package kernel-headers-2.6.6-1.
Unpacking kernel-headers-2.6.6-1 (from .../kernel-headers-2.6.6-1_2.6.6-1_i386.deb) ...
Selecting previously deselected package kernel-headers-2.6.6-1-386.
Unpacking kernel-headers-2.6.6-1-386 (from .../kernel-headers-2.6.6-1-386_2.6.6-1_i386.deb) ...
Setting up kernel-kbuild-2.6-3 (2.6.6-1) ...
Setting up kernel-headers-2.6.6-1 (2.6.6-1) ...

Setting up kernel-headers-2.6.6-1-386 (2.6.6-1) ...

maccorin
06-01-2004, 12:28 AM
post errors not normal ouput

2.6 kernel headers? I don't think that debian builds their glibc against 2.6 headers, considering debian ships w/ a 2.4 kernel....

DimGR
06-01-2004, 12:29 AM
Originally posted by maccorin
post errors not normal ouput

2.6 kernel headers? I don't think that debian builds their glibc against 2.6 headers, considering debian ships w/ a 2.4 kernel....



/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1

mdwatts
06-01-2004, 10:13 AM
According to my distro (SuSE), /usr/include/sys/socket.h is included in the glibc-devel package.

maccorin
06-01-2004, 03:13 PM
Originally posted by mdwatts
According to my distro (SuSE), /usr/include/sys/socket.h is included in the glibc-devel package.

yes, but he is missing asm/socket.h, not sys/socket.h :D

kevinalm
06-03-2004, 12:36 AM
Did you maybe not start with:

make mrproper

?

And the /usr/src/linux symlink is deprecated, but that is your distro's fault, not your's. It may well be that some development package is missing though.

spizkapa
06-03-2004, 08:30 AM
You should not build the 2.6 series kernels with gcc version 2.96 and above. If I remember correctly, the kernel install files explicitly say that weird things can heppen if you compile the beast that 2.6 is with say, gcc 3.3 etc.

Also, you should try getting the actual kernel sources for the kernel you're compiling i.e. the tar.gz or tar.bz2. I remember having all sorts of problems with the kernel headers packages from apt-get.

Good luck.

DimGR
06-03-2004, 09:18 AM
Originally posted by spizkapa
You should not build the 2.6 series kernels with gcc version 2.96 and above. If I remember correctly, the kernel install files explicitly say that weird things can heppen if you compile the beast that 2.6 is with say, gcc 3.3 etc.

Also, you should try getting the actual kernel sources for the kernel you're compiling i.e. the tar.gz or tar.bz2. I remember having all sorts of problems with the kernel headers packages from apt-get.

Good luck.


i was setting it up according to this page
http://www.linuxlookup.com/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=1&page=1

but i got stuck at the errors so i am staying with 2.6.1 :)

hard candy
06-03-2004, 09:31 AM
You could try "ln -s /usr/src/linux/include/asm /usr/include/asm" to make a soft link and see if that works. It will not work if the headers are not correct to begin with.

spizkapa
06-03-2004, 10:19 AM
I have seen the sym linking suggested in a quick googling that I did when I was compiling the 2.6 series myself. It may work but you have to remember that it is a hack and not a solution.

The only correct way is to have all the necessary applications you need for 2.6 (eg e2fs) upgarded to the right versions, use the recommended gcc version, then get the complete source and finally try installing.

All the best.

mdwatts
06-03-2004, 11:06 AM
Originally posted by maccorin
yes, but he is missing asm/socket.h, not sys/socket.h :D

I know as both are (according to SuSE 9.0) included in glibc-devel.

# rpm -qf /usr/include/asm/socket.h
glibc-devel-2.3.2-87

:)

maccorin
06-03-2004, 04:58 PM
heh, weird

they probably distribute it all as one package to make sure that you don't have a different version of the kernel headers then glibc was compiled against, that's actually a good idea.

bwkaz
06-03-2004, 06:53 PM
Originally posted by hard candy
You could try "ln -s /usr/src/linux/include/asm /usr/include/asm" to make a soft link and see if that works. It will not work if the headers are not correct to begin with. NO NO NO NO! :p

http://www.kernelnewbies.org/faq/index.php3#headers

(assuming it works for you... my Firefox CVS pull isn't loading the actual page, but that could just be a bug in it, not the page)

You should NEVER use the include files from /usr/src/linux/include. EVER. Userspace needs the same headers that glibc was compiled against (if glibc was compiled against 2.4, otherwise a set of sanitized headers if glibc was compiled against 2.6), and that's what should be in /usr/include/linux and /usr/include/asm.

Kernel modules need the headers from the running kernel, but they should look for them in /lib/modules/<kernel version>/build/include/, not /usr/src/linux/include/.

Originally posted by spizkapa
You should not build the 2.6 series kernels with gcc version 2.96 and above. If I remember correctly, the kernel install files explicitly say that weird things can heppen if you compile the beast that 2.6 is with say, gcc 3.3 etc. As did the documentation for kernel 2.4, but it's out of date. gcc 3.2 and 3.3 both work great (for x86! not for all other architectures) for the vast majority of people, including myself. I have never heard of a problem with the kernel that could be definitively traced back to using gcc 3.2 or 3.3.

Now gcc 3.4 is another beast entirely, but it'll soon become stable enough also.

Besides, compiling the kernel with gcc 2.95.X will make most of the NPTL tests inside the glibc source tree segfault when they try to run -- supposedly glibc is fine, but when a ton of tests are segfaulting, I still find that extremely unsettling.

-----

As for the original error, DimGR, try installing libc6-dev (at least that's what I think Debian calls it).

JohnT
06-03-2004, 07:24 PM
You should always, always...see.. "Documentation/Changes"
In your downloaded kernel,for the latest requirements--
they may have changed!

spizkapa
06-04-2004, 07:30 AM
Oops, I didn't know that later versions of gcc work fine for kernel compilation. This is where the problem starts, you tell people to read the F manual, they do and then get the wrong (or incomplete or obsolete) information.

So, DimGR, sorry for misleading you, I hope you get there with the more recent help on this forum.

bwkaz
06-04-2004, 06:58 PM
Originally posted by spizkapa
This is where the problem starts, you tell people to read the F manual, they do and then get the wrong (or incomplete or obsolete) information. I know, it's a pain in the butt. I'm surprised it hasn't caused any big flamewars on the lfs-dev list yet, actually, since they've been staunchly following the kernel developers' recommendation forever (they compile gcc 2 and put it into /opt, just for the kernel and modules -- the rest of the system is gcc 3).

I just wish whoever tries to get it updated in Documentation/Changes luck... ;)

DimGR
06-04-2004, 11:09 PM
thanks for all the help but i can not get this to work so i am staying with 2.6.1

DimGR
06-07-2004, 11:01 AM
i was told that in order to set up the ATI driver that i need , i need to have the files drm.h and drm_proc.h in the /usr/src/linux-2.6.1 directory. If they are not there i could either have a missconfigured kernel or that the 2.6.1 kernel simply does not have them. I checked and these files are not there . is there a way to " fix " this ?


further googling on this showed that i need to install the kernel source in order to have the 2 above missing files.

apt-get install kernel-source does not list anything for the 2.6.1 kernel though ........

Dark Ninja
06-07-2004, 11:23 AM
apt-get install kernel-source does not list anything for the 2.6.1 kernel though

Sounds like it's time to get 2.6.6! :D

DimGR
06-07-2004, 12:15 PM
Originally posted by Dark Ninja
Sounds like it's time to get 2.6.6! :D


i know i know but whenever i tried to set up the 2.6.6. i got stuck here :



cd /usr/src/linux/
root@PenguinGR:/usr/src/linux# make xconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@PenguinGR:/usr/src/linux# make oldconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@PenguinGR:/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
root@PenguinGR:/usr/src/linux#


i was told to install kernel headers and i did but another error poped up

( installation)
apt-get install kernel-headers-2.6.6-1-386
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
kernel-headers-2.6.6-1 kernel-kbuild-2.6-3
The following NEW packages will be installed:
kernel-headers-2.6.6-1 kernel-headers-2.6.6-1-386 kernel-kbuild-2.6-3
0 upgraded, 3 newly installed, 0 to remove and 119 not upgraded.
Need to get 3281kB of archives.
After unpacking 41.6MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 ftp://linux.csua.berkeley.edu unstable/main kernel-kbuild-2.6-3 2.6.6-1 [352kB]
Get:2 ftp://linux.csua.berkeley.edu unstable/main kernel-headers-2.6.6-1 2.6.6-1 [2684kB]
Get:3 ftp://linux.csua.berkeley.edu unstable/main kernel-headers-2.6.6-1-386 2.6.6-1 [245kB]
Fetched 3281kB in 53s (61.5kB/s)
Selecting previously deselected package kernel-kbuild-2.6-3.
(Reading database ... 104986 files and directories currently installed.)
Unpacking kernel-kbuild-2.6-3 (from .../kernel-kbuild-2.6-3_2.6.6-1_i386.deb) ...
Selecting previously deselected package kernel-headers-2.6.6-1.
Unpacking kernel-headers-2.6.6-1 (from .../kernel-headers-2.6.6-1_2.6.6-1_i386.deb) ...
Selecting previously deselected package kernel-headers-2.6.6-1-386.
Unpacking kernel-headers-2.6.6-1-386 (from .../kernel-headers-2.6.6-1-386_2.6.6-1_i386.deb) ...
Setting up kernel-kbuild-2.6-3 (2.6.6-1) ...
Setting up kernel-headers-2.6.6-1 (2.6.6-1) ...

Setting up kernel-headers-2.6.6-1-386 (2.6.6-1) ...

and the error i got was the same as the above


/usr/src/linux# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
make[1]: *** [scripts/basic/fixdep] Error 1

DimGR
06-07-2004, 03:38 PM
tried an alternate method to install kernel 2.6.6.

i did apt-get install kernel-header 2.6.6-1-386
apt-get install kernel-source- 2.6.6-1-386 and apt-get install kernel-image-2.6.6-1-386 and according to apt-get messages everything was installed okay .
It also created the boot image etc.
My lilo now looks like this

***** i edited the lilo manually. Did i do something wrong? maybe alias should be =3 instead of 1? *****
image=/boot/vmlinuz-2.6.6-1-386
label=Linux2.6
initrd=/boot/initrd.img-2.6.6-1-386
read-only
# restricted
# alias=1

image=/boot/vmlinuz-2.6.1
label=Linux
initrd=/boot/initrd.gz
read-only
# restricted
# alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional
# restricted
# alias=2



when i chose to boot 2.6.6. it says bios data loaded succesfully and then it stops. HOw cani correct this?
Back to top

DimGR
06-07-2004, 06:54 PM
what these errors mean?


ake menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:130,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-linux/3.3.3/include/limits.h:122,
from /usr/lib/gcc-lib/i486-linux/3.3.3/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-linux/3.3.3/include/limits.h:11,
from scripts/basic/fixdep.c:105:
/usr/include/bits/local_lim.h:36:26: 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 scripts/basic/fixdep.c:107:
/usr/include/bits/socket.h:305:24: asm/socket.h: No such file or directory
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:193: error: `PATH_MAX' undeclared (first use in this fun ction)
scripts/basic/fixdep.c:193: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:193: error: for each function it appears in.)
scripts/basic/fixdep.c:193: warning: unused variable `s'
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:289: error: `PATH_MAX' undeclared (first use in this fun ction)
scripts/basic/fixdep.c:289: warning: unused variable `s'
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2

DimGR
06-07-2004, 08:21 PM
any help on the errors?

bwkaz
06-07-2004, 10:48 PM
As a bunch of us said the first time you posted those errors, it means you're missing a bunch of include files.

Try doing a make V=1 menuconfig and post what gcc commands it runs. That should help to indicate if you just don't have the full kernel source, or if it's lack of glibc headers, or what.

Loki3
06-07-2004, 11:32 PM
While not completely useful my favorite way to compile a kernel on a debian system is to use the "debian-way". If you can't get your method to work, try this:

http://www.hjackson.org/cgi-bin/linux/kernel/compiling_the_kernel.pl

Maybe try doing a apt-get update and then get the kernel source again? Like bwkaz says, it seems some things are missing out of /usr/src/linux.