ceph libs3編譯

一、提示找不到依賴的libxml2庫頭文件 libxml/parser.hshell

build/obj/util.do: Compiling dynamic object src/simplexml.c:27:27: error: libxml/parser.h: No such file or directory src/simplexml.c:48: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘saxGetEntity’ cc1: warnings being treated as errors src/simplexml.c:56: error: type defaults to ‘int’ in declaration of ‘xmlChar’ src/simplexml.c:56: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token src/simplexml.c:88: error: type defaults to ‘int’ in declaration of ‘xmlChar’ src/simplexml.c:88: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token src/simplexml.c:111: error: type defaults to ‘int’ in declaration of ‘xmlChar’ src/simplexml.c:111: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token build/obj/acl.o: Compiling object工具


經過yum install 安裝xml2解決問題
ui

二、提示依賴的libxml2庫頭文件 libxml/parser.h不存在正確的編譯文件
spa

make[3]: Entering directory `/var/lib/jenkins/jobs/nds/workspace/src/libs3' make[3]: *** No rule to make target `libxml/parser.h', needed by `build/obj/simplexml.do'.  Stop. make[3]: Leaving directory `/var/lib/jenkins/jobs/nds/workspace/src/libs3'xml

解決方式以下:token

A. 使用命令grep xml2 libs3/GNUmakefile查對xml2的依賴方式以下get

LIBXML2_LIBS := $(shell xml2-config --libs)
 LIBXML2_CFLAGS := $(shell xml2-config --cflags)jenkins

B. 在上面運行./configure以後會生成一個小的Shell腳本xml2-config,它會被安裝成爲libxml2的一部分it

查本機生成的路徑/usr/bin/xml2-config ,文件中cflags選項以下io

--cflags)
        echo -I${includedir}/libxml2 

C. 從新運行ldconfig或相似工具以更新被安裝的共享庫列表

D. 通過如上步驟從新編譯libs3,仍是編譯不過

E. 在src/libs3 執行make clean;make編譯經過 ,初步解釋爲libs3在編譯過程當中不會從新查找依賴包

相關文章
相關標籤/搜索