This is a discussion on kernel 2.6.4, after removing headers 2.4.20 compiling not possible within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi, after compiling and testing 2.6.4 I decided to remove the old tgz of kernel 2.4.20. From that moment ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, after compiling and testing 2.6.4 I decided to remove the old tgz of kernel 2.4.20. From that moment on I cannot compile anything becase gcc cannot find the header files in the path specified. I don't want to install tgz of old 2.4.20 kernel headers. I think it is a matter of symbolic links, anyone of you who compiled the new kernel and removed the old headers can help me please ? -- Colossus Mizio, a proxy scanner tool with GUI for Linux http://mizio.sourceforge.net |
| |||
| Hallo colossus > after compiling and testing 2.6.4 I decided to remove the old tgz of > kernel 2.4.20. From that moment on I cannot compile anything becase gcc > cannot find the header files in the path specified. I don't want to > install tgz of old 2.4.20 kernel headers. I think it is a matter of The kernel-headers should match the version your libraries were built against. So if you don't want to recompile all of those (and I really wouldn't want to do that) you'll need to keep the 'old' headers. Juergen |
| |||
| colossus wrote: I solved reinstalling the 2.4.20 headers. I tried copying the headers of 2.6.4 in /usr/include/linux but it worked partially. -- Colossus Mizio, a proxy scanner tool with GUI for Linux http://mizio.sourceforge.net |
| |||
| -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 colossus wrote: | | I solved reinstalling the 2.4.20 headers. I tried copying | the headers of 2.6.4 in /usr/include/linux but it worked | partially. That's because the kernel headers are supposed to be the ones Glibc was compiled against, not whatever kernel headers you happen to have copied into /usr/include/linux and /usr/include/asm-<arch>. There's a valid reason for it so don't screw around with something you obviously know nothing about when the solution to getting everything working properly again is re-installing the 2.4.20 headers that should be there. Bottom of this page says it quite well. http://linuxfromscratch.mirror.ac.uk...06/kernel.html Billy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iQD1AwUBQI+m7G2aRmqinBtGAQImLwcAk0GZULc0Lo54sY/aXVz5MOiHINqnrxgn vN5JSQ4hvShIgbZZrrOLErPQYuUz9k8i/lGuueY0I5OPjt/aYMyXw9XmeSaiiwTi 4n9igeBymGXITKUjGTZdp/9M89w/Y+k2PB/jQElYFdyaUY5gCQi5UF1oOXGC4cQk NNB8+A8eqzINvRbzKM1cF6gnkxGIBng4XjX65myLxzE5RxYcVN eDBULfjsT2rOlR /nsfdG34OfKP+6zKENwy3M1jElVvopmmAlrqsRQ75wYu8slFZ3G qI0PrZvEzHzhq ATQqX42shXQ= =50Zg -----END PGP SIGNATURE----- |
| |||
| Juergen Frieling wrote: > The kernel-headers should match the version your libraries were built > against. So if you don't want to recompile all of those (and I really > wouldn't want to do that) you'll need to keep the 'old' headers. > > Juergen Thank you Juergen. -- Colossus Mizio, a proxy scanner tool with GUI for Linux http://mizio.sourceforge.net |
| |||
| colossus <colossus_NOSPAM_@freemail.it> wrote: >colossus wrote: > >I solved reinstalling the 2.4.20 headers. I tried copying >the headers of 2.6.4 in /usr/include/linux but it worked >partially. Don't do that! Which ever set of headers existed when the C library was compiled is the set you want the compiler to see in /usr/include when compiling normal programs. If you have a distribution set of headers/libraries, *do not* change those headers! You may need to have kernel headers in /usr/src/linux/include, which are symlinked to appropriate places in /usr/include. (And *if* you recompile the C library, you'll need to put your current kernel headers into /usr/src/linux/include to compile the library, and keep them there if you install that library permanently.) When you compile a new kernel, it might indeed have a /different/ set of headers, but those affect *only* the kernel. The sources should not be put into /usr/src/linux, because that will change what the symlinks to /usr/include see. (You can zap the entire /usr/src/linux hierarchy... *except* for /usr/src/linux/include!) When you compile a new kernel, put it somewhere other than in /usr/src/linux. -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| |||
| Floyd L. Davidson <floyd@barrow.com> wrote: > recompile the C library, you'll need to put your current kernel > headers into /usr/src/linux/include to compile the library, and > keep them there if you install that library permanently.) /usr/src/linux is _only_ used for compiling the kernel, the ones "other programs" use are located in /usr/include/linux (and asm-i386) dirs, which nowadays are NOT links anymore, but wholly separate dirs, look into your /var/log/packages/linux-headers-* cq /var/log/packages/kernel-source-* files to see what is installed where). For instance: I've got a 2.4.26 kernel (kernel-ide- etc), but my "kernel-headers" package is still the 2.4.22 one I started with. > The sources should not be put into /usr/src/linux, because that > will change what the symlinks to /usr/include see. (You can zap > the entire /usr/src/linux hierarchy... *except* for > /usr/src/linux/include!) That isn't true anymore (used to be, in 7.x versions, I believe), kernel-headers is installed directly into /usr/include/linux, NOT linked to /usr/src anymore. Older systems may still have the links, although, and as the scripts don't allow for that, they may be doing the wrong thing. So IF you've still got links for /usr/include/linux and/or /usr/include/asm-i386, remove them and reinstall the kernel-headers package for YOUR release of Slackware. -- ************************************************** ****************** ** Eef Hartman, Delft University of Technology, dept. EWI/TW ** ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 ** ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands ** ************************************************** ****************** |
| |||
| Eef Hartman <E.J.M.Hartman@math.tudelft.nl> wrote: >Floyd L. Davidson <floyd@barrow.com> wrote: >> recompile the C library, you'll need to put your current kernel >> headers into /usr/src/linux/include to compile the library, and >> keep them there if you install that library permanently.) > >/usr/src/linux is _only_ used for compiling the kernel, the ones Absolutely backwards! You should *never* put your kernel sources into /usr/src/linux. This is from the README file in the 2.6.5 kernel distribution: INSTALLING the kernel: - If you install the full sources, put the kernel tarball in a directory where you have permissions (eg. your home directory) and unpack it: gzip -cd linux-2.6.XX.tar.gz | tar xvf - Replace "XX" with the version number of the latest kernel. Do NOT use the /usr/src/linux area! This area has a (usually incomplete) set of kernel headers that are used by the library header files. They should match the library, and not get messed up by whatever the kernel-du-jour happens to be. Note that last paragraph. >"other programs" use are located in /usr/include/linux (and asm-i386) >dirs, which nowadays are NOT links anymore, but wholly separate dirs, >look into your /var/log/packages/linux-headers-* cq >/var/log/packages/kernel-source-* >files to see what is installed where). The include files in the kernel sources are indeed not links anymore. However, the noted "(usually incomplete) set of headers that are used by the library header files" do have symlinks, and *they* are what is in /usr/src/linux, not the includes used when compiling a new kernel. >For instance: I've got a 2.4.26 kernel (kernel-ide- etc), but my >"kernel-headers" package is still the 2.4.22 one I started with. And if your C lib was compiled with 2.4.22, that is what should be in /usr/src/linux. Whether they are directly copied there, or whether they are symlinks to /usr/src/linux, makes no diference. But in fact if you ever do compile a C library, as well as a kernel, setting up the symlinks is the preferable method. >> The sources should not be put into /usr/src/linux, because that >> will change what the symlinks to /usr/include see. (You can zap >> the entire /usr/src/linux hierarchy... *except* for >> /usr/src/linux/include!) > >That isn't true anymore (used to be, in 7.x versions, I believe), >kernel-headers is installed directly into /usr/include/linux, NOT >linked to /usr/src anymore. That isn't necessarily true. It may or may not be the way any particular distribution comes, or not. But the way the *kernel* is distributed, that is exactly what is expected. (In fact, it makes no difference how it is done, as long as the /usr/include headers are the ones that the C library was compiled with, and *not* the ones for the most recently compiled kernel.) >Older systems may still have the links, although, and as the scripts >don't allow for that, they may be doing the wrong thing. > >So IF you've still got links for /usr/include/linux and/or >/usr/include/asm-i386, remove them and reinstall the kernel-headers >package for YOUR release of Slackware. But *do* follow the instructions. -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| |||
| Floyd L. Davidson <floyd@barrow.com> wrote: > Do NOT use the /usr/src/linux area! This area has a (usually > incomplete) set of kernel headers that are used by the library header > files. They should match the library, and not get messed up by > whatever the kernel-du-jour happens to be. This is just not true for Slackware, the "kernel-headers" package, which is the one the "libraries" used, installs under /usr/include and does NOT have any links to /usr/src. In fact, when you don't install any "kernel-source" package, you haven't even got any /usr/src/linux* dirs OR links. > anymore. However, the noted "(usually incomplete) set of > headers that are used by the library header files" do have > symlinks, and *they* are what is in /usr/src/linux, not the > includes used when compiling a new kernel. No, they're not in Slackware, at least since 8.1 And Pat himself DOES install his new, updated kernel sources under /usr/src and DOES install a link from /usr/src/linux-<version> to /usr/src/linux, out of the (yesterday released for 9.1) 2.4.26 kernel-source package: ( cd usr/src ; rm -rf linux ) ( cd usr/src ; ln -sf linux-2.4.26 linux ) ( cd usr/src/linux-2.4.26/include ; rm -rf asm ) ( cd usr/src/linux-2.4.26/include ; ln -sf asm-i386 asm ) From the "doinst.sh" script IN that package. So he DOES install the links under /usr/src, but makes NO links from /usr/include TO /usr/src. > But in fact if you ever do compile a C library, as well as a > kernel, setting up the symlinks is the preferable method. Or just installed the right "kernel-headers" package first. -- ************************************************** ****************** ** Eef Hartman, Delft University of Technology, dept. EWI/TW ** ** e-mail: E.J.M.Hartman@math.tudelft.nl, fax: +31-15-278 7295 ** ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands ** ************************************************** ****************** |
| ||||
| Eef Hartman <E.J.M.Hartman@math.tudelft.nl> wrote: >Floyd L. Davidson <floyd@barrow.com> wrote: >> Do NOT use the /usr/src/linux area! This area has a (usually >> incomplete) set of kernel headers that are used by the library header >> files. They should match the library, and not get messed up by >> whatever the kernel-du-jour happens to be. > >This is just not true for Slackware, the "kernel-headers" package, which is >the one the "libraries" used, installs under /usr/include and does NOT have >any links to /usr/src. >In fact, when you don't install any "kernel-source" package, you haven't >even got any /usr/src/linux* dirs OR links. It may in fact be that you can set it up that way. It's still not the right way to do it. The Linux kernel documentation quoted above makes that clear, and should be the guide to follow. -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
| Thread Tools | |
| Display Modes | |
|
|