LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Error when attempting to compile kernel (http://www.linuxquestions.org/questions/debian-26/error-when-attempting-to-compile-kernel-309746/)

SMurf7 04-04-2005 07:08 PM

Error when attempting to compile kernel
 
Hello,

It's been a while since I tried compiling the kernel (The last time was under Woody, last year) and now that I'd installed Sarge I thought I'd have a go again. Unfortunately it didn't go so well this time... :(
Code:

mm/mm.o(.text+0x6ae6): In function `do_mremap':
: undefined reference to `unlikely'
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory `/usr/src/kernel-source-2.4.16'
make: *** [stamp-build] Error 2

Not sure what the problem is. I've checked the headers included in mm.c and unlikely is there (in complier.h). I also know this worked under Woody, which suggests something has changed. Installing gcc-2.95 got rid of some earlier parse errors, do I need anything else? :confused:

Moloko 04-04-2005 07:45 PM

Could be a package you don't have. You definitely need these and their dependencies: tk8.3 debhelper, modutils, kernel-package, libc6-dev, libncurses5-dev, libqt3-mt-dev (last one if using xconfig)

And I suppose you need the module-init-tools and the kernel-kbuild-x.xx.xx and kernel-headers.

The dev's I have (and I only compile kernels):
autotools-dev
dpkg-dev
libaudio-dev
libc6-dev
libexpat1-dev
libfontconfig1-dev
libfreetype6-dev
libice-dev
libjpeg62-dev
liblcms1-dev
libmng-dev
libncurses5-dev
libpng12-dev
libqt3-mt-dev
libsm-dev
libstdc++5-3.3-dev
libx11-dev
libxcursor-dev
libxext-dev
libxft-dev
libxi-dev
libxmu-dev
libxrandr-dev
libxrender-dev
libxt-dev
libxv-dev
render-dev
x-dev
xlibmesa-gl-dev
xlibmesa-glu-dev
xlibs-static-dev
zlib1g-dev

Hope this helps.

SMurf7 04-05-2005 04:32 PM

Well after a bit of crying into my tea I decided to add:-
Code:

#include <linux/compiler.h>
to the top of mremap.c in the mm folder and it suddenly compiled correctly. Maybe having to override GCC to 2.95 meant that some preprocessor expansion wasn't being done or something? :confused:

Moloko 04-05-2005 05:31 PM

I didn't notice you mentioned an earlier version of gcc, but I also have no idea what the differences are with gcc-3.3. At least it works now ;)


All times are GMT -5. The time now is 10:51 AM.