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在编译过程当中不会从新查找依赖包

相关文章
相关标签/搜索