当前位置: 技术问答>linux和unix
编译uclinux字符驱动出一堆错误.......
来源: 互联网 发布时间:2016-04-22
本文导语: $make arm-elf-gcc -o at led_driver.c -elf2flt In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:19, from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23, ...
$make
arm-elf-gcc -o at led_driver.c -elf2flt
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:19,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
from led_driver.c:12:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/string.h:16: warning: conflicting types for built-in function `memcpy'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/string.h:26: warning: conflicting types for built-in function `memset'
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
from led_driver.c:12:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:79: warning: conflicting types for built-in function `memcmp'
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda_fs_i.h:14,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:308,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
from led_driver.c:12:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:259: parse error before `u_quad_t'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:259: warning: no semicolon at end of struct or union
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:267: parse error before `va_bytes'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:267: warning: data definition has no type or storage class
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:268: parse error before `va_filerev'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:268: warning: data definition has no type or storage class
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:435: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:443: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:485: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:494: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:539: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:546: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:566: field `attr' has incomplete type
led_driver.c:67: warning: initialization from incompatible pointer type
make: *** [led_driver.o] Error 1
我在UBUNTU 8.04上编译的
arm-elf-gcc -o at led_driver.c -elf2flt
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:19,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
from led_driver.c:12:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/string.h:16: warning: conflicting types for built-in function `memcpy'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/asm/string.h:26: warning: conflicting types for built-in function `memset'
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:23,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
from led_driver.c:12:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/string.h:79: warning: conflicting types for built-in function `memcmp'
In file included from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda_fs_i.h:14,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/fs.h:308,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/capability.h:17,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/binfmts.h:5,
from /usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/sched.h:9,
from led_driver.c:12:
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:259: parse error before `u_quad_t'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:259: warning: no semicolon at end of struct or union
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:267: parse error before `va_bytes'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:267: warning: data definition has no type or storage class
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:268: parse error before `va_filerev'
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:268: warning: data definition has no type or storage class
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:435: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:443: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:485: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:494: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:539: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:546: field `attr' has incomplete type
/usr/local/lib/gcc-lib/arm-elf/2.95.3/../../../../arm-elf/include/linux/coda.h:566: field `attr' has incomplete type
led_driver.c:67: warning: initialization from incompatible pointer type
make: *** [led_driver.o] Error 1
我在UBUNTU 8.04上编译的
|
不会是2.4的代码到2.6下编译吧
|
编译驱动是不能使用任何glibc的内容的
arm-elf-gcc是用来编译普通程序的。
arm-elf-gcc是用来编译普通程序的。
|
我觉得很可能是编译器太老了(v2.95.3)。需要更换一个新的