0
buildroot env에서 open-vm-toos 패키지 (9.0.0-782409)를 컴파일하려고했는데 한 파일에서 실패합니다. 아래는 오류의 로그입니다. 나는 그것을 로케일 포함과 관련이있는 것으로 좁혔다. 표준 로케일을 사용하지 않으려 고 시도하면 buildroot 환경에서 사용할 수있는 것과 비교할 수있는 차이가 있습니다. 내가 누락 된 것을 포함하는 것 (아마도 open-vm-tools의 스크립트를 구성하기 위해 CFLAGS에 명시 적으로 전달할 수있는 것이있을 수 있습니다)?buildroot 열린 VM 도구 컴파일
/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, "")) {
사실 로케일 지원은 이미 buildroot config에서 활성화되었습니다. 그런데 GLIB2와 GLIB2 타겟이 모두 buildroot config에서 활성화되었고 이것이이 파일 포함 문제를 일으키는 한 가지 실수를 실감했습니다. 그래서 나는 단지 GLIB2 타겟을 유지하면서이를 수정하고 '모두 깨끗하게 만들었지 만 지금은 링크하는 동안 오픈 VM 도구에 대한 다른 곳에서 실패합니다. 이제는 buildroot env 대신에 시스템의 glib-2.so (/usr/lib/glib-2.so)에 링크하려고합니다. 이 LD_LIBRARY_PATH 문제를 어떻게 해결합니까? –
어떤 Buildroot 버전을 사용하고 있습니까? glib 1.2는 loooooooooong 시간 이후로 제거되었습니다. 마지막 Buildroot 버전을 사용하고 그런 질문에 대해서는 메일 링리스트를 사용하십시오. –