2013-04-29 27 views
0

我试图在buildroot env下编译open-vm-toos包(9.0.0-782409),它在一个文件中失败。以下是错误的日志。我缩小了与locale包含的某些关系。试图脱离标准的语言环境包括那些在buildroot env下可用的,并且没有区别。其中包括我错过了(可能是明确传递给CFLAGS来配置open-vm-tools的脚本)?打开虚拟机工具的buildroot编译

/bin/sh ../../libtool --tag=CC --mode=compile /myRepository/repo/cai/buildroot/output/staging/usr/bin/i686-unknown-linux-uclibc-gcc -Os -pipe -Os -mtune=i686 -march=i686 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/myRepository/repo/cai/buildroot/output/staging/usr/include -I/myRepository/repo/cai/buildroot/output/staging/include --sysroot=/myRepository/repo/cai/buildroot/output/staging/ -isysroot /myRepository/repo/cai/buildroot/output/staging -DPACKAGE_NAME=\"open-vm-tools\" -DPACKAGE_TARNAME=\"open-vm-tools\" -DPACKAGE_VERSION=\"8.4.2\" -DPACKAGE_STRING=\"open-vm-tools\ 8.4.2\" -DPACKAGE_BUGREPORT=\"[email protected]\" -DPACKAGE_URL=\"\" -DPACKAGE=\"open-vm-tools\" -DVERSION=\"8.4.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DX_DISPLAY_MISSING=1 -DNO_PROCPS=1 -DNO_DNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LSEEK=1 -DNO_MULTIMON=1 -I. -I/myRepository/repo/cai/buildroot/output/build/open-vm-tools-8.4.2-261024/lib/include -I/myRepository/repo/cai/buildroot/output/build/open-vm-tools-8.4.2-261024/lib/include -DUSING_AUTOCONF=1 -DOPEN_VM_TOOLS -DVMX86_TOOLS -DNO_CORE_ICU -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -DGLIBC_VERSION_21 -DGLIBC_VERSION_22 -I/myRepository/repo/cai/buildroot/output/staging/usr/include -I/myRepository/repo/cai/buildroot/output/build/usr/include -liconv -DNO_FLOATING_POINT -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -MT codesetOld.lo -MD -MP -MF .deps/codesetOld.Tpo -c -o codesetOld.lo codesetOld.c 

....

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, "")) { 

回答

0

启用工具链的本地化支持,然后做一个make clean; make all周期。

+0

实际上,语言环境支持已经在buildroot配置中启用。但后来我意识到一个错误,GLIB12以及GLIB2目标在buildroot配置中启用,并导致此文件包含问题。所以我纠正了这种情况,只保留了GLIB2目标,并做了“全部清理”,但现在它在连接过程中在开放虚拟机工具的某个不同位置失败。现在它试图链接到系统的glib-2.so(/usr/lib/glib-2.so)而不是从buildroot env。我该如何纠正这个LD_LIBRARY_PATH问题? – 2013-05-01 13:07:58

+0

你正在使用什么Buildroot版本?自从looooooooooo的时候,glib 1.2已被删除。请使用最后一个Buildroot版本,并使用邮件列表来解决这些问题。 – 2013-05-26 15:42:14