Gcc 开放虚拟机工具的buildroot编译
我试图在BuildRootEnv下编译OpenVMToos包(9.0.0-782409),但在一个文件中失败了。下面是错误日志。我把范围缩小到与语言环境有关的部分。试图摆脱标准语言环境包括和buildroot环境下可用的语言环境,没有区别。其中包括我缺少的东西(可能需要显式地传递给CFLAGS以配置开放虚拟机工具的脚本) 以下是错误下的文件代码片段:Gcc 开放虚拟机工具的buildroot编译,gcc,cross-compiling,buildroot,vmware-tools,Gcc,Cross Compiling,Buildroot,Vmware Tools,我试图在BuildRootEnv下编译OpenVMToos包(9.0.0-782409),但在一个文件中失败了。下面是错误日志。我把范围缩小到与语言环境有关的部分。试图摆脱标准语言环境包括和buildroot环境下可用的语言环境,没有区别。其中包括我缺少的东西(可能需要显式地传递给CFLAGS以配置开放虚拟机工具的脚本) 以下是错误下的文件代码片段: 721 static char * 722 CodeSetOldGetCodeSetFromLocale(void) 723 { 724
721 static char *
722 CodeSetOldGetCodeSetFromLocale(void)
723 {
724 char *codeset;
725
726 #if defined(__linux__)
727
728 locale_t new = newlocale(LC_CTYPE_MASK, "", NULL);
729 if (!new) {
730 /*
731 * If the machine is configured incorrectly (no current locale),
732 * newlocale() could return NULL. Try to fall back on the "C"
733 * locale.
734 */
735
736 new = newlocale(LC_CTYPE_MASK, "C", NULL);
737 ASSERT(new);
738 }
739 codeset = Util_SafeStrdup(nl_langinfo_l(CODESET, new));
740 freelocale(new);
741
742 #elif defined(sun)
743
744 char *locale = setlocale(LC_CTYPE, NULL);
745 if (!setlocale(LC_CTYPE, "")) {
在工具链中启用区域设置支持,然后执行
makeclean;使所有
循环。实际上,buildroot配置中已经启用了区域设置支持。但后来我意识到一个错误,即GLIB12和GLIB2目标都是在buildroot配置中启用的,这导致了这个文件包含问题。所以我纠正了这一点,只保留GLIB2目标,并确实“全部清除”,但现在它在链接期间在开放vm工具的不同位置失败。现在它正试图链接到系统的glib-2.so(/usr/lib/glib-2.so),而不是从buildroot env。如何更正此LD\U库路径问题?您使用的是哪个Buildroot版本?glib 1.2从很久以前就被删除了。请使用最新的Buildroot版本,并使用邮件列表回答此类问题。
codesetOld.c: In function 'CodeSetOldGetCodeSetFromLocale':
codesetOld.c:728: error: '__locale_t' undeclared (first use in this function)
codesetOld.c:728: error: (Each undeclared identifier is reported only once
codesetOld.c:728: error: for each function it appears in.)
codesetOld.c:728: error: expected ';' before 'new'
codesetOld.c:729: error: 'new' undeclared (first use in this function)
cc1: warnings being treated as errors
codesetOld.c:736: error: implicit declaration of function '__newlocale'
codesetOld.c:739: error: implicit declaration of function '__nl_langinfo_l'
codesetOld.c:739: error: passing argument 2 of 'Util_SafeInternalStrdup' makes pointer from integer without a cast
codesetOld.c:740: error: implicit declaration of function '__freelocale'
make[5]: *** [codesetOld.lo] Error 1
make[4]: *** [all-recursive] Error 1
make[3]: *** [all-recursive] Error 1
721 static char *
722 CodeSetOldGetCodeSetFromLocale(void)
723 {
724 char *codeset;
725
726 #if defined(__linux__)
727
728 locale_t new = newlocale(LC_CTYPE_MASK, "", NULL);
729 if (!new) {
730 /*
731 * If the machine is configured incorrectly (no current locale),
732 * newlocale() could return NULL. Try to fall back on the "C"
733 * locale.
734 */
735
736 new = newlocale(LC_CTYPE_MASK, "C", NULL);
737 ASSERT(new);
738 }
739 codeset = Util_SafeStrdup(nl_langinfo_l(CODESET, new));
740 freelocale(new);
741
742 #elif defined(sun)
743
744 char *locale = setlocale(LC_CTYPE, NULL);
745 if (!setlocale(LC_CTYPE, "")) {