You are not logged in.
Pages: 1
Hello, I seem to be having trouble compiling the current 2.6 kernel in ABS with gcc 4.0. I get the following errors:
CC [M] drivers/i2c/algos/i2c-algo-bit.o
In file included from drivers/i2c/algos/i2c-algo-bit.c:31:
include/linux/i2c.h:58: error: array type has incomplete element type
include/linux/i2c.h:197: error: array type has incomplete element type
make[3]: *** [drivers/i2c/algos/i2c-algo-bit.o] Error 1
make[2]: *** [drivers/i2c/algos] Error 2
make[1]: *** [drivers/i2c] Error 2
make: *** [drivers] Error 2
==> ERROR: Build Failed. Aborting...
Does anyone know of a patch for the 2.6 kernel so that it is compilable with gcc 4.0?
Offline
yeah, I've gotten those same errors with gcc4
from: http://www.coyotegulch.com/reviews/gcc4/
GCC 4.0 did compile a working kernel; I'm running it even as I type this sentence. The road to success was a bit bumpy; GCC 4.0 produces more warnings than did its predecessors, and I had to make trivial changes in two function prototypes from the file include/linux/i2c.h. GCC 4,0 objected to a declaration like this:
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
I replaced the above with the following:
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg * msg,int num);
Offline
Same here. Mayber gcc4 should be moved to "unstable" for the time being?
MDK
Open Source Software Operations/Nokia
michael.kostrzewa (at) nokia.com
Offline
Same here. Mayber gcc4 should be moved to "unstable" for the time being?
umm... it's in testing... testing is a bit worse than unstable... and technically gcc isn't unstable, its that programs haven't updated their code to work with gcc4 yet...
Offline
Hi,
this might help, at least I made it for our kernel26
http://www.justdreams.de/archlinux/down … rnel.patch
it shouldn't hurt gcc-3.4 compiler
for the scsi Kernel I'm not sure, some other modules might be affected,
too. For custoumized builds you prolly discover some more non C99
compliant modules.
Look at this quote from
http://gnu.open-mirror.com/software/gcc … anges.html
if you wanna fix things:
Arrays of incomplete element type are invalid in C. GCC now issues
an error for such arrays. Declarations such as extern struct s x[]; (where
struct s has not been defined) can be moved after the definition of struct s.
Function parameters declared as arrays of incomplete type can instead be declared as pointers.
-neri
Offline
yeah, I've gotten those same errors with gcc4
from: http://www.coyotegulch.com/reviews/gcc4/
GCC 4.0 did compile a working kernel; I'm running it even as I type this sentence. The road to success was a bit bumpy; GCC 4.0 produces more warnings than did its predecessors, and I had to make trivial changes in two function prototypes from the file include/linux/i2c.h. GCC 4,0 objected to a declaration like this:
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
I replaced the above with the following:
extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg * msg,int num);
Hmm, since when was a statement like the original one flawed? That's weird.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
this might help, at least I made it for our kernel26
http://www.justdreams.de/archlinux/down … rnel.patch
Worked like charm for my custom kernel, thanks a lot.
All of your mips are belong to us!!
Offline
Pages: 1