location of my C headers

TheOmegaCode

Platinum Member
Aug 7, 2001
2,954
1
0
I'm installing VMware and everything has gone fine, up to where it asks me for the directory of the location of my C header files. I point it to /usr/include and it tells me


<< The directory of kernel headers (version 2.4.8-34.1mdk) does not match your running kernel (version 2.4.8-26mdk). [...] >>


zoit? How is this?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The headers in /usr/include are not usually the same as the kernel you're running, especially if you've upgraded since the initial install. It needs the full kernel source, which is usually somewhere in /usr/src.
 

TheOmegaCode

Platinum Member
Aug 7, 2001
2,954
1
0
It's saying that the more recent headers are in /usr/include, and if I try /usr/src, I get...


<< the path "/usr/src" is an existing directory, but it does not contain at least one of these directories "linux, "asm", "net" >>


All of those directories are in /usr/include...
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
The "real" kernel source usually lives at /usr/src/linux/include - this contains the subdirectories (linux and asm) you mentioned. Standard practice is to have /usr/include/linux and /usr/include/asm symlinks that point to those subdirectories as well. So either /usr/src/linux/include or /usr/include should work if the headers are actually installed. If you're using a distribution, there's usually a "kernel include" or "kernel header" package that you can install instead of the full source in order to save space. It's also possible that you have the full source already, but it's living in something like /usr/src/linux-2.4.16 without a symlink from linux to linux-2.4.16. In that case, just add the symlink and you should be fine.

Technically, this symlinking is screwed up according to Linus, who says that /usr/include/asm and /usr/include/linux should contain the actual kernel headers against which your glibc library was compiled, and that these headers should never be removed unless glibc is updated. But I don't think any distros actually work that way.

edit: little foggy... just came home from work. Let's answer the question. Since VMWare is reporting a conflict, it sounds like your /usr/src/linux symlink is pointing to your old source tree, and not your current one.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Technically, this symlinking is screwed up according to Linus, who says that /usr/include/asm and /usr/include/linux should contain the actual kernel headers against which your glibc library was compiled, and that these headers should never be removed unless glibc is updated. But I don't think any distros actually work that way.


Debian would be one that does, libc6-dev includes all the kernel headers in /usr/include.
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81


<< Debian would be one that does, libc6-dev includes all the kernel headers in /usr/include. >>



Good to know. So, if he installing on Debian, he may just have to point to /usr/src/linux/include rather than /usr/include.
 

Derango

Diamond Member
Jan 1, 2002
3,113
1
0


<< Technically, this symlinking is screwed up according to Linus, who says that /usr/include/asm and /usr/include/linux should contain the actual kernel headers against which your glibc library was compiled, and that these headers should never be removed unless glibc is updated. But I don't think any distros actually work that way.


Debian would be one that does, libc6-dev includes all the kernel headers in /usr/include.
>>



Gentoo also conforms to the non-symlinking kernel headers
 

TheOmegaCode

Platinum Member
Aug 7, 2001
2,954
1
0
I figured while I'm here, I might as well just recompile my kernel to 2.5.7. I'm making the dependencies right now... Taking FOREVER...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You realize 2.5.7 is unstable and stuff is guaranteed broken and unfinished right?

I would stick to 2.4.18 (or a 19-pre) if you don't feel like debugging things.
 

TheOmegaCode

Platinum Member
Aug 7, 2001
2,954
1
0


<< You realize 2.5.7 is unstable and stuff is guaranteed broken and unfinished right?

I would stick to 2.4.18 (or a 19-pre) if you don't feel like debugging things.
>>

yeah, I do... but then again, maybee I should just stick with 2.4.18...