Error compiling Kaoru's kernel 2.4.19-pre8_B0c.src.rpm

Kaoru Fukui yellowdog-general@lists.terrasoftsolutions.com
Mon Jun 3 22:19:02 2002


Hi!
This is not kernel packages's problem.
You need kernel-headers for your gcc.

try to install kernel-headers at first.
kernel-headers has thus link and header.

-- this script has kernel-headers--------------
cd /usr/src
rm -f linux
ln -snf linux-%{KVERREL} linux
	cd /usr/include
	rm -f linux asm
	ln -snf ../src/linux/include/linux linux
	ln -snf ../src/linux/include/asm asm
cd /boot
rm -f kernel.h
ln -snf kernel.h-%{KVERREL} kernel.h

Kaoru
---------

On  2 Jun, Juan Manuel Palacios wrote:
> 
>     Hello Kaoru and everybody from the lists. I'm having some problems
> compiling the latest kernel's src.rpm found in your ftp site
> ( ftp://ppc.linux.or.jp/pub/users/fukui/). When I hit "rpm -ba
> kernel-2.4.19.k.spec" the decompression of the sources begin, followed
> by the checking of the configuration file. And up to here everything is
> fine. But just when the building process states that the next step is to
> build the dependencies it fails miserably with quite a confusing error
> message:
> 
> _____________________________
> + make -s dep
> In file included     from /usr/include/bits/posix1_lim.h:126,
>                                  from /usr/include/limits.h:144,
>                                  from /usr/lib/gcc-
> lib/ppc-yellowdog-linux/2.95.4/include/syslimits.h:7,
>                                  from /usr/lib/gcc-
> lib/ppc-yellowdog-linux/2.95.4/include/limits.h:11,
>                                  from scripts/mkdep.c:35:
> /usr/include/bits/local_lim.h:36: linux/limits.h: No such file or
> directory
> make: *** [scripts/mkdep] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.44658 (%build)
> 
> 
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.44658 (%build)
> _____________________________
> 
>     Now, I say confusing because I am no developer. I may be an
> experienced Linux user but nothing in developer land. I cheked in all
> the directories reported in the error and the file limits.h was to be
> found in most of them. That is, the files:
> 
> /usr/include/limits.h         <--  exists,
> /usr/include/bits/posix2_lim.h         <-- exists (referrenced by the
> previous in line no. 144),
> /usr/include/bits/posix1_lim.h         <-- exists,
> /usr/include/bits/local_lim.h         <-- exists (referrenced by the
> previous in line no. 126),
> /usr/lib/gcc-lib/ppc-yellowdog-linux/2.95.4/include/syslimits.h   
>     <-- exists (referrenced by the one below in line no. 11),
> /usr/lib/gcc-lib/ppc-yellowdog-linux/2.95.4/include/limits.h       
>     <-- exists (referrenced by the previous one in line no. 7),
> /usr/include/bits/local_lim.h        <--exists
> 
>     But for the last two the file referrenced is missing:
> 
> /usr/include/bits/local_lim.h:36        <-- no directory named "linux"
> there or any file named "limits.h", for that matter.
> scripts/mkdep.c:35        <-- real path is
> "/usr/src/rpm/BUILD/linux/scripts" and there is no "limits.h" file there.
> 
>     So I don't understand. Which one of these two files is causing the
> failure and what is the exact path the file "
> /usr/include/bits/local_lim.h" is trying to call when it invokes
> "linux/limits.h" in line 36? I found a directory "linux" which contains
> a "limits.h" file, but the complete path is
> "/usr/src/rpm/BUILD/linux/include/linux". I really don't think this is
> the complete path "local_lim.h" is looking for, or is it?
> 
>     I guess the most important question I have is, how can I fix the
> problem? To start troubleshooting first of all I made sure I had the
> packages I thought were necessary and enough already installed:
> 
> kernelcfg-0.6-9
> kernel-doc-2.4.19-pre8_B0c
> kernel-headers-2.4.19-pre8_B0c
> kernel-2.4.10-12a
> 
>     The docs and headers are the same version of the kernel I'm trying
> to compile, I simply updated the packages already installed. The kernel
> package provides the kernel I'm currently running (2.4.10-12a), which is
> the stock one provided by YellowDog 2.1. And kernelcfg, I've never
> really used it. Is there anything missig there, anything I'll need to
> carry on with the compile process? I removed the package named
> kernel-sources since it belonged to the same series as the stock kernel
> and I thought they could conflict with the sources installed by the new
> yet-unbuilt kernel. But one funny and strange thing I notticed: inside
> the directory /usr/src I have the following directories
> 
> drwxrwxr-x    4 juan     juan         4.0k May 17 01:28 Updates/
> lrwxrwxrwx    1 root     root           21 May 31 18:49 linux ->
> linux-2.4.19-pre8_B0c/
> drwxr-xr-x    7 root     root         4.0k May 29 16:29 linux-2.4.10/
> drwxr-xr-x    4 root     root         4.0k May 31 18:49
> linux-2.4.19-pre8_B0c/
> drwxr-xr-x    7 root     root         4.0k Mar 10 11:41 rpm/
> 
>     The directory "linux" points to the directory
> "linux-2.4.19-pre8_B0c/" which was installed by "kernel-
> headers-2.4.19-pre8_B0c", and this was to be expected. But inside this
> last one there are no real source files, all of them get installed in
> "/usr/src/rpm/BUILD/linux" when I issue "rpm -ba kernel-2.4.19.k.spec".
> Isn't this strange? I don't remember this from previous experiences
> building kernels. I remember having all the source and/or (not really
> sure here) header files in the directory "/usr/src/linux/" regardless of
> them getting installed somewhere else when the build process begins.
> Could this be what's at fault? In any case, I remember many more files
> in /usr/src/linux than what I have now.
> 
>     So, again, what is causing the error and how can I fix it? Typo,
> incorrect path, lack of necessary packages? I want to learn....
> 
>         Thank you all in advance for your kind help and assistance.
> Sincerely,...
> 
> 
>                     Juan.
> 
> 
> ** Sent via the linuxppc-user mail list. See http://lists.linuxppc.org/
>