make[3]: Entering directory `/data/iamroot/xen/setup/xen-unstable.hg/tools/libxl'

gcc  -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -m64 -g -fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes -Wno-unused-value -Wdeclaration-after-statement  -D__XEN_TOOLS__ -MMD -MF .libxl.o.d  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE  -Werror -Wno-format-zero-length -Wmissing-declarations  -I. -fPIC -I../../tools/libxc -I../../tools/include -I../../tools/libxc -I../../tools/include -I../../tools/xenstore -I../../tools/include -I../../tools/blktap2/control -I../../tools/blktap2/include -I../../tools/include -c -o libxl.o libxl.c

cc1: warnings being treated as errors

libxl.c: In function ‘libxl_create_cpupool’:

libxl.c:3981: error: format not a string literal and no format arguments

libxl.c:3983: error: format not a string literal and no format arguments

libxl.c: In function ‘libxl_cpupool_movedomain’:

libxl.c:4095: error: format not a string literal and no format arguments

make[3]: *** [libxl.o] 오류 1

make[3]: Leaving directory `/data/iamroot/xen/setup/xen-unstable.hg/tools/libxl'

make[2]: *** [subdir-install-libxl] 오류 2

make[2]: Leaving directory `/data/iamroot/xen/setup/xen-unstable.hg/tools'

make[1]: *** [subdirs-install] 오류 2

make[1]: Leaving directory `/data/iamroot/xen/setup/xen-unstable.hg/tools'

make: *** [install-tools] 오류 2



위와 같이 libxl에서 에러가 발생하는 이유는 gcc 4.3이상 부터 가변인자로 형식으로 argument를 받을 때 char *변수를 통해 입력을 할 경우 이를 warning이 발생 되도록 바뀌었음.

xen에서는 빌드 시 옵션을 -Werror를 주므로 warning도 에러로 처리 해서 문제가 됨.

위의 빌드에러를 고치기 위해 소스를 수정 해야 한다.

<수정 전>
3980         libxl__xs_write(&gc, t, libxl__sprintf(&gc, "/local/pool/%d/uuid", *poolid),
3981                  uuid_string);
3982         libxl__xs_write(&gc, t, libxl__sprintf(&gc, "/local/pool/%d/name", *poolid),
3983                  name);


<수정 후>

3980         libxl__xs_write(&gc, t, libxl__sprintf(&gc, "/local/pool/%d/uuid", *poolid), "%s",
3981                  uuid_string);
3982         libxl__xs_write(&gc, t, libxl__sprintf(&gc, "/local/pool/%d/name", *poolid), "%s",
3983                  name);


<수정 전>

4095         libxl__xs_write(&gc, t, libxl__sprintf(&gc, "%s/pool_name", vm_path), poolname);


<수정 후>

4095         libxl__xs_write(&gc, t, libxl__sprintf(&gc, "%s/pool_name", vm_path), "%s", poolname);



위와 같이 수정 하시면 빌드 시 에러가 발생 안합니다.

번호 제목 글쓴이 날짜 조회 수
공지 [공지] 하이퍼바이져 스터디 관련 Q&A 게시판 입니다. woos 2016.04.09 236
215 __attribute__ ((pure)) [1] 백창우 2008.04.12 82277
» 20101023일자 xen 소스 빌드 중 toos/libxl/libxl.c의 에러 발생되는 문제 해결 법 [2] 이상철 2010.10.23 45974
213 IO 가상화 참고 소스 [1] 백창우 2008.05.06 40691
212 e820.c 컴파일 오류 나네요. [2] 백창우 2008.05.17 27048
211 [펌] libvirt 가상화 라이브러리 분석 황선욱 2011.05.24 20832
210 kvm 의 내부구조 요약 정리 [3] file 최용석 2012.04.17 19539
209 credit 관련 던랩 메일링 리스트 포스팅 문대혁 2011.01.08 15299
208 그 게임 해킹 사이트 이름이 뭐였죠?? [2] 정성욱 2008.06.16 12432
207 Xen 스터디 종료하겠습니다. 백창우 2009.04.28 12248
206 Hypervisor Detailed Design (작성중 문서) [3] file 백창우 2008.04.16 12187
205 윈도우 레지스트리 가상화 [4] 박세율 2008.09.02 12042
204 TVMM 한글 PPT file 박세율 2008.05.15 11925
203 [발표자료] [2008.04.11] Hypervisor 개발 프로젝트 시작.ppt 백창우 2008.04.29 11737
202 [질문] 메모리 할당관련 [3] 박은병 2008.05.05 11597
201 xen security 관련 자료 박세율 2008.08.28 11309
200 Hypervisor 아키텍쳐 디자인 백창우 2008.04.14 11156
199 Hypervisor 개발 프로젝트 문닫겠습니다. :) 백창우 2008.12.08 11094
198 x86 시뮬레이터 & 에뮬레이터 조사 [1] 백창우 2008.05.02 10924
197 지금까지 조사해본바에 의하면 [1] 백창우 2008.05.06 10905
196 나가기 전에 적습니다. [2] 백창우 2008.05.10 10824

XE Login