Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When i try to compile my kernels (2.4.29, 2.4.30 2.4.31) i get this error:
Quote:
gcc -D__KERNEL__ -I/boot/linux-2.4.31/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -
fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time -DKBUILD_BASENAME=main -c -o init/ma
in.o init/main.c
In file included from /boot/linux-2.4.31/include/linux/kernel.h:15,
from /boot/linux-2.4.31/include/linux/wait.h:13,
from /boot/linux-2.4.31/include/linux/fs.h:12,
from /boot/linux-2.4.31/include/linux/capability.h:17,
from /boot/linux-2.4.31/include/linux/binfmts.h:5,
from /boot/linux-2.4.31/include/linux/sched.h:9,
from /boot/linux-2.4.31/include/linux/mm.h:4,
from /boot/linux-2.4.31/include/linux/slab.h:14,
from /boot/linux-2.4.31/include/linux/proc_fs.h:5,
from init/main.c:15:
/boot/linux-2.4.31/include/asm/byteorder.h:14: warning: type qualifiers ignored on function return type
/boot/linux-2.4.31/include/asm/byteorder.h:30: warning: type qualifiers ignored on function return type
In file included from /boot/linux-2.4.31/include/linux/byteorder/little_endian.h:11,
from /boot/linux-2.4.31/include/asm/byteorder.h:65,
from /boot/linux-2.4.31/include/linux/kernel.h:15,
from /boot/linux-2.4.31/include/linux/wait.h:13,
from /boot/linux-2.4.31/include/linux/fs.h:12,
from /boot/linux-2.4.31/include/linux/capability.h:17,
from /boot/linux-2.4.31/include/linux/binfmts.h:5,
from /boot/linux-2.4.31/include/linux/sched.h:9,
from /boot/linux-2.4.31/include/linux/mm.h:4,
from /boot/linux-2.4.31/include/linux/slab.h:14,
from /boot/linux-2.4.31/include/linux/proc_fs.h:5,
from init/main.c:15:
/boot/linux-2.4.31/include/linux/byteorder/swab.h:160: warning: type qualifiers ignored on function return type
/boot/linux-2.4.31/include/linux/byteorder/swab.h:173: warning: type qualifiers ignored on function return type
/boot/linux-2.4.31/include/linux/byteorder/swab.h:186: warning: type qualifiers ignored on function return type
/boot/linux-2.4.31/include/linux/byteorder/swab.h:200: warning: type qualifiers ignored on function return type
In file included from /boot/linux-2.4.31/include/linux/prefetch.h:13,
from /boot/linux-2.4.31/include/linux/list.h:6,
from /boot/linux-2.4.31/include/linux/wait.h:14,
from /boot/linux-2.4.31/include/linux/fs.h:12,
from /boot/linux-2.4.31/include/linux/capability.h:17,
from /boot/linux-2.4.31/include/linux/binfmts.h:5,
from /boot/linux-2.4.31/include/linux/sched.h:9,
from /boot/linux-2.4.31/include/linux/mm.h:4,
from /boot/linux-2.4.31/include/linux/slab.h:14,
from /boot/linux-2.4.31/include/linux/proc_fs.h:5,
from init/main.c:15: /boot/linux-2.4.31/include/asm/processor.h:75: error: array type has incomplete element type
make: *** [init/main.o] Error 1
maybe you have selected some options not supported by your processor? what kind of machine do you have? can't you upgrade insdead of downgrade your kernel?
It looks like you are trying to compile kernel v. 2.4 with gcc4.0. Either use another compiler (gcc3.3 should work ok, 2.95 will definitely work) or use kernel2.6.
make defconfig to create a default configuration.(or, restore your original .config)
Now make xconfig and select your options again.
I would be in favor of the defconfig route because that will produce a self-consistent set of options and it seems to pay attention to what kind of CPU, etc. you have. However, if you don't want to do that, probably the area where you need to focus is in the selection of "Processor type and features."
Looking at this line in /include/linux/asm/processor.h (using "75g" in the less command, or less +75 ..., either of which put the desired line at the top of the page), I see that this particular line has something to do with SMP... does your system, in fact, have multiple processors?
Curious that you're building a kernel in /boot ... And if you do stick with 2.4, be sure to apply all of its patches!
Originally posted by r0b0 It looks like you are trying to compile kernel v. 2.4 with gcc4.0. Either use another compiler (gcc3.3 should work ok, 2.95 will definitely work) or use kernel2.6.
Why bother with 2.4 in the first place?
yep, thats the problem - finally i downgraded to gcc 3.3.6 and everything is ok now. (i was searching for a workaround)
Quote:
Originally posted by sundialsvcs
Curious that you're building a kernel in /boot ... And if you do stick with 2.4, be sure to apply all of its patches! [/B]
- why not build the kernel in /boot dir???
- kernel patches are cumulative or not? (i think 2.4.31 includes all patches)
- with the first chance (lack of time) i will upgrade to 2.6.12
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.