LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   compiling from source fails after kernel upgrade in slackware12 (https://www.linuxquestions.org/questions/slackware-14/compiling-from-source-fails-after-kernel-upgrade-in-slackware12-606954/)

gopi.d 12-15-2007 09:24 AM

compiling from source fails after kernel upgrade in slackware12
 
i did a full install of slackware 12 and upgraded the kernel to 2.6.23 from www.kernel.org to get my tvtuner working. all went fine and system works fine except i could not compile any package from source, when i try to compile and source package i get the below error.
root@gopi:/usr/src/kompile-0.3-beta3# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/ginstall -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
root@gopi:/usr/src/kompile-0.3-beta3#

i tried re-installing gcc, gcc-cpp, libstdc++, but to vain the problem is not solved and still compiling quits with the same error. pls guide me to solve this problem.

BCarey 12-15-2007 09:35 AM

Which commands did you use to compile and install your kernel. More specifically, did you install the kernel headers? If so you should reinstall the kernel headers from Slack 12.

Brian

gopi.d 12-15-2007 09:49 AM

i did make oldconfig, make menuconfig, make all, make modules_install, make install to install the new kernel and afer that i removed the old kernel, kernel-source, kernel headers in kpackage. will the old kernel headers work with new kernel.

H_TeXMeX_H 12-15-2007 10:05 AM

Reinstall the old kernel headers, don't ever remove them, they are necessary and it isn't a good idea to upgrade them due to issues with different versions of glibc, etc.

gopi.d 12-15-2007 10:16 AM

i see the kernel headers in slackware 12 dvd is for the default kernel 2.6.21.5-smp, but i had upgraded the kernel to 2.6.23 will the old kernel headers work for the new kernel or i have to find new kernel headers for the new kernel?

H_TeXMeX_H 12-15-2007 10:28 AM

The old kernel headers, the ones that came with slackware, please reinstall them the '2.6.21.5' version.

gopi.d 12-15-2007 10:45 AM

thanks for your guide had re-installed the kernel headers for install dvd. i'll give a try and comeback

gnashley 12-15-2007 11:21 AM

The kernel-headers are *not supposed* to match the kernel version you are running. they are supposed to be the same ones used to compile the glibc version in use. When a distro version is originally created, the kernel version and kernel-headers vesrion will *usually* be the same. But the important thing is that the glibc version is compiled against the kernel-headers versions and all software compiled for the system later should be compile with the same version of kernel-headers -no matter which kernel you are running at the time. The kernel-headers are slightly mis-named and are sometimes called the libc headers. When you compile a kernel, the kernel sources supply their own headers and do not use the installed kernel(libc)-headers. As mentioned, you should never upgrade the kernel-headers package unless you are upgrading the whole system.

gopi.d 12-16-2007 01:06 AM

Thanks a lot for your guide gnashley i re-installed the kernel headers and things are going fine now.


All times are GMT -5. The time now is 03:57 AM.