【问题标题】:buildroot compile of open vm toolsopen vm 工具的 buildroot 编译
【发布时间】:2013-04-29 13:57:09
【问题描述】:

我试图在 buildroot env 下编译 open-vm-toos 包 (9.0.0-782409),但它在一个文件中失败。以下是错误日志。我将范围缩小到与语言环境包含有关的内容。试图摆脱标准语言环境包括与 buildroot env 下可用的语言环境,并且没有区别。其中包括我缺少的(也许要明确传递给 CFLAGS 以配置 open-vm-tools 的脚本)?

/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=\"open-vm-tools-devel@lists.sourceforge.net\" -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

这是错误文件的代码sn-p:

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

【问题讨论】:

    标签: gcc cross-compiling buildroot vmware-tools


    【解决方案1】:

    在您的工具链中启用语言环境支持,然后执行make clean; make all 循环。

    【讨论】:

    • 实际上已经在 buildroot 配置中启用了语言环境支持。但后来我意识到一个错误,即在 buildroot 配置中启用了 GLIB12 和 GLIB2 目标,这导致了这个文件包含问题。所以我纠正了这个问题,只保留了 GLIB2 目标并做了'make clean all',但现在它在链接期间在 open-vm-tools 的某个不同位置失败了。现在它正在尝试链接到系统的 glib-2.so (/usr/lib/glib-2.so) 而不是来自 buildroot env。如何更正此 LD_LIBRARY_PATH 问题?
    • 您使用的是什么 Buildroot 版本? glib 1.2 自 loooooooooong 时间以来已被删除。请使用最新的 Buildroot 版本,并使用邮件列表解决此类问题。
    猜你喜欢
    • 1970-01-01
    • 2021-03-19
    • 2017-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多