binutils软件包似乎已更改,因为它的包含目录libiberty.h
已移至/usr/include/libiberty
,因此bfd.h
关于可能存在错误的包含ansidecl.h
。
使用binutils跟踪实用程序时出现那些编译错误
/usr/include/libiberty/libiberty.h: In function ‘basename’:
/usr/include/libiberty/libiberty.h:110:38: error: expected declaration specifiers before ‘ATTRIBUTE_RETURNS_NONNULL’
extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
/usr/include/libiberty/libiberty.h:121:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATTRIBUTE_RETURNS_NONNULL’
extern const char *lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
/usr/include/libiberty/libiberty.h:126:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATTRIBUTE_RETURNS_NONNULL’
extern const char *dos_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
^
/usr/include/libiberty/libiberty.h:132:50: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ATTRIBUTE_RETURNS_NONNULL’
extern const char *unix_lbasename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
通过更改bfd.h
为include /usr/include/libiberty/ansidecl.h
,在我的编译中一切正常。
请问,这个问题有什么提示吗?谢谢。