【无需解决】cygwin下编译buildroot在uClibc的utils时出错:../utils/getconf.c:438:29: error: ‘_SC_CHARCLASS_NAME_MAX’ undeclared here (not in a function)

【问题】

折腾:

【记录】在Cygwin上用Buildroot为xscale建立交叉工具链

期间,编译出错:

make[1]: Entering directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/toolchain/uClibc-0.9.33.2/utils'
  HOSTCC utils/getconf.host
../utils/getconf.c:438:29: error: '_SC_CHARCLASS_NAME_MAX' undeclared here (not in a function)
../utils/getconf.c: In function 'print_all':
../utils/getconf.c:1093:24: error: '_SC_UINT_MAX' undeclared (first use in this function)
../utils/getconf.c:1093:24: note: each undeclared identifier is reported only once for each function it appears in
../utils/getconf.c:1093:21: warning: comparison between pointer and integer [enabled by default]
../utils/getconf.c:1094:25: error: '_SC_ULONG_MAX' undeclared (first use in this function)
../utils/getconf.c:1094:22: warning: comparison between pointer and integer [enabled by default]
../utils/getconf.c: In function 'main':
../utils/getconf.c:1307:23: error: '_SC_UINT_MAX' undeclared (first use in this function)
../utils/getconf.c:1307:20: warning: comparison between pointer and integer [enabled by default]
../utils/getconf.c:1308:26: error: '_SC_ULONG_MAX' undeclared (first use in this function)
../utils/getconf.c:1308:23: warning: comparison between pointer and integer [enabled by default]
make[1]: *** [../utils/getconf.host] Error 1
make[1]: Leaving directory `/home/CLi/develop/buildroot/buildroot-2013.05/output/toolchain/uClibc-0.9.33.2/utils'
make: *** [/home/CLi/develop/buildroot/buildroot-2013.05/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libc.a] Error 2

CLi@PC-CLI-1 ~/develop/buildroot/buildroot-2013.05
$

截图:

utils getconf.c error _SC_CHARCLASS_NAME_MAX undeclared here not in a function

即:

../utils/getconf.c:438:29: error: ‘_SC_CHARCLASS_NAME_MAX’ undeclared here (not in a function)

【解决过程】

1.然后此处,是关闭了cygwin后,

另外再接着make,以为会出现此处的错误的。

结果就竟然可以继续编译了。。。

2.后来查到的此处的_SC_CHARCLASS_NAME_MAX,原来是和sysconf相关的:

Constants for sysconf Parameters

_SC_CHARCLASS_NAME_MAX
Inquire about the parameter corresponding to maximal length allowed for a character class name in an extended locale specification. These extensions are not yet standardized and so this option is not standardized as well.

即:

这个宏,不是.c文件里面的普通的宏定义,而是GNU的相关的,自动配置,自动编译方面所用到的参数。

3.所以,对于此处的,可以继续编译,没有出现上述的错误,也就暂时懒得理会了。

 

【总结】

此处,不知道之前是什么情况,而导致出现此错误的。

暂时是继续make,就没有在出现,所以暂时不去深究了。

以后如果再出现,再说。



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量