LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 01-07-2006, 03:11 PM   #1
Akabaka
LQ Newbie
 
Registered: Oct 2005
Location: United States
Distribution: Ubuntu
Posts: 17

Rep: Reputation: 0
"array type has incomplete element type" compiling 2.4.32 kernel


I need to compile a 2.4.32 version kernel. I make mrproper,make xconfig, make dep, which works fine. Make bzImage gives me the following.

Code:
aaron:/usr/src/linux-2.4.32 # make bzImage
gcc -D__KERNEL__ -I/usr/src/linux-2.4.32/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i586 -fno-unit-at-a-time   -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr/src/linux-2.4.32/include/linux/kernel.h:15,
                 from /usr/src/linux-2.4.32/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.32/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.32/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.32/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.32/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.32/include/linux/mm.h:4,
                 from /usr/src/linux-2.4.32/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.32/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/src/linux-2.4.32/include/asm/byteorder.h:14: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.32/include/asm/byteorder.h:30: warning: type qualifiers ignored on function return type
In file included from /usr/src/linux-2.4.32/include/linux/byteorder/little_endian.h:11,
                 from /usr/src/linux-2.4.32/include/asm/byteorder.h:65,
                 from /usr/src/linux-2.4.32/include/linux/kernel.h:15,
                 from /usr/src/linux-2.4.32/include/linux/wait.h:13,
                 from /usr/src/linux-2.4.32/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.32/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.32/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.32/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.32/include/linux/mm.h:4,
                 from /usr/src/linux-2.4.32/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.32/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/src/linux-2.4.32/include/linux/byteorder/swab.h:160: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.32/include/linux/byteorder/swab.h:173: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.32/include/linux/byteorder/swab.h:186: warning: type qualifiers ignored on function return type
/usr/src/linux-2.4.32/include/linux/byteorder/swab.h:200: warning: type qualifiers ignored on function return type
In file included from /usr/src/linux-2.4.32/include/linux/prefetch.h:13,
                 from /usr/src/linux-2.4.32/include/linux/list.h:6,
                 from /usr/src/linux-2.4.32/include/linux/wait.h:14,
                 from /usr/src/linux-2.4.32/include/linux/fs.h:12,
                 from /usr/src/linux-2.4.32/include/linux/capability.h:17,
                 from /usr/src/linux-2.4.32/include/linux/binfmts.h:5,
                 from /usr/src/linux-2.4.32/include/linux/sched.h:9,
                 from /usr/src/linux-2.4.32/include/linux/mm.h:4,
                 from /usr/src/linux-2.4.32/include/linux/slab.h:14,
                 from /usr/src/linux-2.4.32/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/usr/src/linux-2.4.32/include/asm/processor.h:75: error: array type has incomplete element type
make: *** [init/main.o] Error 1
Here is my gcc --version output:

Code:
aaron:/usr/src/linux-2.4.32 # gcc --version
gcc (GCC) 4.0.2 20050901 (prerelease) (SUSE Linux)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I searched and found out that a 3.x version of gcc will solve the problem, because 4.x now enforces the "incomplete element type" thing. I would rather not go about installing an older gcc. Is there a patch that will fix this so it will compile with gcc 4?
 
Old 01-08-2006, 01:48 PM   #2
Akabaka
LQ Newbie
 
Registered: Oct 2005
Location: United States
Distribution: Ubuntu
Posts: 17

Original Poster
Rep: Reputation: 0
I fixed it by installing gcc3. It turns out my stubborness not to install it was just a "superstition". It was very easy to install after all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Which "processor type" when compiling kernel for Sempron? lorenzanaj Linux - Hardware 11 03-17-2009 07:12 AM
arrays of elements with [gcc4]array type has incomplete element type lmmix Linux - Software 0 02-26-2005 09:07 AM
C error "dereferencing pointer to incomplete type" lucs Slackware 6 02-21-2005 10:33 AM
"fs type noatuo not supported by kernel" error? daren Linux - General 3 09-03-2003 01:22 AM
<input type="button" disabled="true" > does not work in ns4.7 or 4.9 cybercop12us Programming 2 11-29-2002 09:31 AM


All times are GMT -5. The time now is 03:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration