Stop Microsoft
Operating Systems => Linux and UNIX => Topic started by: cymon on 15 June 2006, 04:43
-
After unpacking the sources into /usr/src/linux-2.6.16 and cleaning up the build directory with make mrproper, I get this error message when I go to configure it with make menuconfig. This also comes up with make xconfig and make config. Sadly, xterm doesn't allow cut and paste.
make: *** [scripts_basic] Error 2
I don't know what that means, but if it's fixable, I'd like to try and fix it.
-
You can copy and paste with xterm. Select the text and it'll be copied, then middle click to paste.
If you could give us the whole output we'd probably have a better chance of knowing what's up..
-
statenburg:/home/ben# cd /usr/src/linux-2.6.16
statenburg:/usr/src/linux-2.6.16# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/limits.h:122,
from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/syslimits.h:7,
from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:115:
/usr/include/bits/socket.h:304:24: asm/socket.h: No such file or directory
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:214: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:214: error: (Each undeclared identifier is reported only once
scripts/basic/fixdep.c:214: error: for each function it appears in.)
scripts/basic/fixdep.c:214: warning: unused variable `s'
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:310: error: `PATH_MAX' undeclared (first use in this function)
scripts/basic/fixdep.c:310: warning: unused variable `s'
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
There it is.
-
Install linux-kernel-headers, I think.
EDIT: http://kernel.org/
You might prefer to use 2.6.16.20, it'll have ALOT of bugfixes (not all will apply to your system/setup, obviously) - you could download the patch (http://www.kernel.org/diff/diffview.cgi?file=%2Fpub%2Flinux%2Fkernel%2Fv2.6%2Fpatch-2.6.16.20.bz2), uncompress it and run 'sudo patch -p1 < /path/to/patch-2.6.16.20' (IIRC), if you want.
-
I got the tarball of the source directly from kernel.org. Also, this is my first kernel compile, so I'd like to keep this simple, without a lot of patching.
Apt has linux-kernel-headers at latest version.
-
The kernel headers are installed?
Maybe something in this thread will help: http://www.linuxforums.org/forum/linux-kernel/22858-make-xconfig-error.html (try making the link)
-
Your using debian eh?
Why not just use apt to upgrade your kernel.
Anyways...when i compiled a kernel in debian, I couldnt get menuconfig or xconfig to work either. I ended up copying my config file from my fedora machine and using "make config" to configure anything that i wanted different.
Although i had a completely different error i think.
EDIT: actually, yea that wont work.
Erm... there is some files the error says it cant find... try to locate them...
# locate limits.h
-
Why compile anything when you don't have to ... especially a kernel
-
Why compile anything when you don't have to ... especially a kernel
Performance gains? Smaller kernel?
-
Why compile anything when you don't have to ... especially a kernel
Mainly because I'd like to know how to do it. Unless you'd like me to go back to Windows?
-
I found that when I was fuckering up my suse distro with all the extras to put on, a kernel recompile fixed a lot of what I was fuckin up. I even got step by step help from Voidmain. I bet worker201 remembers that! I had fuckered Suse up so much, I actually had to reinstall it...Void was impressed, he said he had never seen that before! Worker201 couldn't believe it either..
-
Mainly because I'd like to know how to do it. Unless you'd like me to go back to Windows?
That's respectable ... but don't be too flustered if it don't work. You'll probably need someone to take you through step by step like pofnlice :)
I don't quite see what this has to do with Window$ ... I never compiled my kernel ... nor would I want to ... it's a pain in the ass
-
Building a kernel is a really good thing to do even just for the experience.
The first thing i'd suggest is to build a kernel from the stock kernel sources that come with the distro. Then you can make sure you have all the dependencies and the method right. Just get it, and the modules, built.... you don't have to use it.
Then try the latest kernel.org sources.
Also, make sure to check the readme from kernel.org. They sometimes require you to update parts of your system before it will build.
-
By the way, 2.6.17 came out today :)
-
A quick Google search suggests that your glibc is not up to date:
http://www.google.com/search?q=%2Fusr%2Finclude%2Fbits%2Fsocket.h&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
I can see how this might be a problem. Fortunately, once things work properly, building a kernel is really not that hard. I learned how to do it from Slackware:
http://www.slackbook.org/html/system-configuration-kernel.html#SYSTEM-CONFIGURATION-KERNEL-COMPILE
Should be similar on your system.
-
[mobrien@hariel ~]$ rpm -qf /usr/include/bits/socket.h
glibc-headers-2.3.6-3
Do you have your glibc headers installed?
-
output from locate limits.h
/root/linux-2.6.8/include/asm-arm26/limits.h
/root/linux-2.6.8/include/asm-arm/limits.h
/root/linux-2.6.8/include/asm-i386/mach-default/irq_vectors_limits.h
/root/linux-2.6.8/include/asm-i386/mach-generic/irq_vectors_limits.h
/root/linux-2.6.8/include/asm-i386/mach-summit/irq_vectors_limits.h
/root/linux-2.6.8/include/linux/limits.h
/usr/include/asm-i486/mach-default/irq_vectors_limits.h
/usr/include/asm-i486/mach-generic/irq_vectors_limits.h
/usr/include/asm-i486/mach-summit/irq_vectors_limits.h
/usr/include/limits.h
/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/limits.h
/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/syslimits.h
/usr/src/linux-2.6.16/include/asm-arm26/limits.h
/usr/src/linux-2.6.16/include/asm-arm/limits.h
/usr/src/linux-2.6.16/include/asm-i386/mach-default/irq_vectors_limits.h
/usr/src/linux-2.6.16/include/asm-i386/mach-generic/irq_vectors_limits.h
/usr/src/linux-2.6.16/include/asm-i386/mach-summit/irq_vectors_limits.h
/usr/src/linux-2.6.16/include/linux/limits.h
-
output from locate limits.h
/root/linux-2.6.8/include/asm-arm26/limits.h
/root/linux-2.6.8/include/asm-arm/limits.h
/root/linux-2.6.8/include/asm-i386/mach-default/irq_vectors_limits.h
/root/linux-2.6.8/include/asm-i386/mach-generic/irq_vectors_limits.h
/root/linux-2.6.8/include/asm-i386/mach-summit/irq_vectors_limits.h
/root/linux-2.6.8/include/linux/limits.h
/usr/include/asm-i486/mach-default/irq_vectors_limits.h
/usr/include/asm-i486/mach-generic/irq_vectors_limits.h
/usr/include/asm-i486/mach-summit/irq_vectors_limits.h
/usr/include/limits.h
/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/limits.h
/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/syslimits.h
/usr/src/linux-2.6.16/include/asm-arm26/limits.h
/usr/src/linux-2.6.16/include/asm-arm/limits.h
/usr/src/linux-2.6.16/include/asm-i386/mach-default/irq_vectors_limits.h
/usr/src/linux-2.6.16/include/asm-i386/mach-generic/irq_vectors_limits.h
/usr/src/linux-2.6.16/include/asm-i386/mach-summit/irq_vectors_limits.h
/usr/src/linux-2.6.16/include/linux/limits.h
Try running this:
CFLAGS="-I/usr/src/linux-2.6.16/include/" make menuconfig
BTW, I have the same glibc on Ubuntu and I compiled 2.6.17 yesterday (it has alot of cool new stuff, including a driver for Airport Extreme). If you're using menuconfig you'll need to have the ncurses5-dev package installed too.
If, like me, you need some non-standard kernel modules e.g. for your wireless card, you'll need to compile/install them yourself when you boot up into your new kernel. The Debian ones won't work.
-
Also, make sure you have got the libc6-dev installed, looks like you might be missing it
-
Crap, now I'm getting errors with apt.
After running the cflags, then I try make menuconfig.
statenburg:/home/ben# cd /usr/src/linux-2.6.16
statenburg:/usr/src/linux-2.6.16# make menuconfig
HOSTCC scripts/basic/fixdep
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:144,
from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/limits.h:122
,
from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/syslimits.h:
7,
from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/limits.h:11,
from scripts/basic/fixdep.c:113:
/usr/include/bits/local_lim.h:36:26: linux/limits.h: No such file or directory
In file included from /usr/include/sys/socket.h:35,
from /usr/include/netinet/in.h:24,
from /usr/include/arpa/inet.h:23,
from scripts/basic/fixdep.c:115:
/usr/include/bits/socket.h:304:24: asm/socket.h: No such file or directory
scripts/basic/fixdep.c: In function `use_config':
scripts/basic/fixdep.c:214: error: `PATH_MAX' undeclared (first use in this func
tion)
scripts/basic/fixdep.c:214: error: (Each undeclared identifier is reported only
once
scripts/basic/fixdep.c:214: error: for each function it appears in.)
scripts/basic/fixdep.c:214: warning: unused variable `s'
scripts/basic/fixdep.c: In function `parse_dep_file':
scripts/basic/fixdep.c:310: error: `PATH_MAX' undeclared (first use in this func
tion)
scripts/basic/fixdep.c:310: warning: unused variable `s'
make[1]: *** [scripts/basic/fixdep] Error 1
make: *** [scripts_basic] Error 2
[/code]
Apt gives me a bunch of connection refused errors when I do apt-get update.
-
is libc6-dev installed?
the connection refused errors could be temporary problems on the server-side..
-
libc6-dev is at the latest version.
Damn it, all this just for the nVidia drivers. But it says there's no kernel interface for my kernel, it needed the 2.6.8 source, I downloaded that and it said it needed to be configured. Tried configuring it, that didn't work.
-
libc6-dev is at the latest version.
Damn it, all this just for the nVidia drivers. But it says there's no kernel interface for my kernel, it needed the 2.6.8 source, I downloaded that and it said it needed to be configured. Tried configuring it, that didn't work.
Doesn't it work with linux-kernel-headers installed?
If you need the source code I think it looks for it in /lib/modules/`uname -r`/source - which you should setup to be a symlink to the kernel source directory.
ln -s /path/to/kernel/sourcecode /lib/modules/`uname -r`/source
-
In fact I think you might want to look into the linux-restricted-modules package...
-
Well I recently compiled my own kernel, but it was pretty easy cuz I used an src.rpm version ... all I had to do is
rpmbuild --rebuild kernel-version###-src.rpm
or if you need to make changes (like I had to) you could make an rpm out of a tgz of the kernel with:
rpmbuild -ta --target=i686 kernel-version####.tar.gz
of course you may need a spec file for it unless you get an rpm version of it and extract it, then repackage it as tgz
more on rpm stuff:
http://www.linux.com/howtos/Font-HOWTO/rpm.shtml