当前位置: 技术问答>linux和unix
types.h:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__dev_t’
来源: 互联网 发布时间:2017-03-20
本文导语: [root@localhost xc]# make World In file included from /Cross/target/local/mipsel-linux/include/stdio.h:36, from ./config/util/printver.c:10: /Cross/target/local/mipsel-linux/include/bits/types.h:127:3: error: #error In file included fro...
[root@localhost xc]# make World
In file included from /Cross/target/local/mipsel-linux/include/stdio.h:36,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/bits/types.h:127:3: error: #error
In file included from /Cross/target/local/mipsel-linux/include/stdio.h:36,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/bits/types.h:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__dev_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ino64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nlink_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__off64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__rlim64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:172: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__blkcnt64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:176: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__fsblkcnt64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:180: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__fsfilcnt64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:182: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ssize_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:186: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__loff_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:191: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__intptr_t’
In file included from /Cross/target/local/mipsel-linux/include/libio.h:32,
from /Cross/target/local/mipsel-linux/include/stdio.h:72,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/_G_config.h:33: error: expected specifier-qualifier-list before ‘__off64_t’
In file included from /Cross/target/local/mipsel-linux/include/stdio.h:72,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/libio.h:312: error: expected specifier-qualifier-list before ‘__off64_t’
/Cross/target/local/mipsel-linux/include/libio.h:351: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__io_read_fn’
/Cross/target/local/mipsel-linux/include/libio.h:359: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__io_write_fn’
/Cross/target/local/mipsel-linux/include/libio.h:368: error: expected declaration specifiers or ‘...’ before ‘__off64_t’
/Cross/target/local/mipsel-linux/include/libio.h:467: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_padn’
/Cross/target/local/mipsel-linux/include/libio.h:470: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_seekoff’
/Cross/target/local/mipsel-linux/include/libio.h:471: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_seekpos’
In file included from /Cross/target/local/mipsel-linux/include/stdlib.h:416,
from ./config/util/printver.c:11:
/Cross/target/local/mipsel-linux/include/sys/types.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘loff_t’
/Cross/target/local/mipsel-linux/include/sys/types.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dev_t’
/Cross/target/local/mipsel-linux/include/sys/types.h:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘nlink_t’
/Cross/target/local/mipsel-linux/include/sys/types.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ssize_t’
make: *** [World] Error 1
In file included from /Cross/target/local/mipsel-linux/include/stdio.h:36,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/bits/types.h:127:3: error: #error
In file included from /Cross/target/local/mipsel-linux/include/stdio.h:36,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/bits/types.h:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__dev_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:140: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ino64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:142: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__nlink_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:144: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__off64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:149: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__rlim64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:172: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__blkcnt64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:176: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__fsblkcnt64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:180: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__fsfilcnt64_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:182: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__ssize_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:186: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__loff_t’
/Cross/target/local/mipsel-linux/include/bits/types.h:191: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__intptr_t’
In file included from /Cross/target/local/mipsel-linux/include/libio.h:32,
from /Cross/target/local/mipsel-linux/include/stdio.h:72,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/_G_config.h:33: error: expected specifier-qualifier-list before ‘__off64_t’
In file included from /Cross/target/local/mipsel-linux/include/stdio.h:72,
from ./config/util/printver.c:10:
/Cross/target/local/mipsel-linux/include/libio.h:312: error: expected specifier-qualifier-list before ‘__off64_t’
/Cross/target/local/mipsel-linux/include/libio.h:351: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__io_read_fn’
/Cross/target/local/mipsel-linux/include/libio.h:359: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__io_write_fn’
/Cross/target/local/mipsel-linux/include/libio.h:368: error: expected declaration specifiers or ‘...’ before ‘__off64_t’
/Cross/target/local/mipsel-linux/include/libio.h:467: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_padn’
/Cross/target/local/mipsel-linux/include/libio.h:470: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_seekoff’
/Cross/target/local/mipsel-linux/include/libio.h:471: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_IO_seekpos’
In file included from /Cross/target/local/mipsel-linux/include/stdlib.h:416,
from ./config/util/printver.c:11:
/Cross/target/local/mipsel-linux/include/sys/types.h:46: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘loff_t’
/Cross/target/local/mipsel-linux/include/sys/types.h:62: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘dev_t’
/Cross/target/local/mipsel-linux/include/sys/types.h:77: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘nlink_t’
/Cross/target/local/mipsel-linux/include/sys/types.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ssize_t’
make: *** [World] Error 1
|
這是在定義一些C89不支持的非標準數據類型。首先定義了__STD_TYPE宏,這裡面有一個關鍵的問題,__extension__
這個是在哪裡定義的,樓主全域的搜索一下__extension__的定義吧,它的含義不清楚,導致了後面宏替換時typedef
的失敗
|
这个问题我也遇到过。。
很有可能是有的语句后面少了个“;”、、、、、
自己先检查一下、、
|
交叉编译?
http://www.dzkf.cn/html/qianrushixitong/2008/0401/3063.html
http://www.dzkf.cn/html/qianrushixitong/2008/0401/3063.html