expat源码安装

来源:互联网 发布:开淘宝店铺步骤图片 编辑:程序博客网 时间:2024/05/29 07:16

Expat是一个用C语言开发的、用来解析XML文档的开发库,它最初是开源的、Mozilla 项目下的一个XML解析器。
下载源码 进入解压目录执行 ./configure

root@ubuntu:/home/wl/service/dependency/expat/expat-2.2.0# ./configure checking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking how to print strings... printfchecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking for a sed that does not truncate output... /bin/sedchecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for fgrep... /bin/grep -Fchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -Bchecking the name lister (/usr/bin/nm -B) interface... BSD nmchecking whether ln -s works... yeschecking the maximum length of command line arguments... 1572864checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noopchecking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noopchecking for /usr/bin/ld option to reload object files... -rchecking for objdump... objdumpchecking how to recognize dependent libraries... pass_allchecking for dlltool... dlltoolchecking how to associate runtime and link libraries... printf %s\nchecking for ar... archecking for archiver @FILE support... @checking for strip... stripchecking for ranlib... ranlibchecking for gawk... nochecking for mawk... mawkchecking command to parse /usr/bin/nm -B output from gcc object... okchecking for sysroot... nochecking for a working dd... /bin/ddchecking how to truncate binary pipes... /bin/dd bs=4096 count=1checking for mt... mtchecking if mt is a manifest tool... nochecking how to run the C preprocessor... gcc -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking for dlfcn.h... yeschecking for objdir... .libschecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPIC -DPICchecking if gcc PIC flag -fPIC -DPIC works... yeschecking if gcc static flag -static works... yeschecking if gcc supports -c -o file.o... yeschecking if gcc supports -c -o file.o... (cached) yeschecking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yeschecking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ISO C89... (cached) none neededchecking for g++... g++checking whether we are using the GNU C++ compiler... yeschecking whether g++ accepts -g... yeschecking how to run the C++ preprocessor... g++ -Echecking for ld used by g++... /usr/bin/ld -m elf_x86_64checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yeschecking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking for g++ option to produce PIC... -fPIC -DPICchecking if g++ PIC flag -fPIC -DPIC works... yeschecking if g++ static flag -static works... yeschecking if g++ supports -c -o file.o... yeschecking if g++ supports -c -o file.o... (cached) yeschecking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking dynamic linker characteristics... (cached) GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking for a BSD-compatible install... /usr/bin/install -cchecking whether gcc accepts -fexceptions... yeschecking for ANSI C header files... (cached) yeschecking whether byte ordering is bigendian... nochecking for an ANSI C-conforming const... yeschecking for size_t... yeschecking for memmove... yeschecking for bcopy... yeschecking fcntl.h usability... yeschecking fcntl.h presence... yeschecking for fcntl.h... yeschecking for unistd.h... (cached) yeschecking for off_t... yeschecking for stdlib.h... (cached) yeschecking for unistd.h... (cached) yeschecking for sys/param.h... yeschecking for getpagesize... yeschecking for working mmap... yeschecking for gcc option to accept ISO C99... -std=gnu99checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99checking for an ANSI C99-conforming __func__... yesconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: WARNING:  'Makefile.in' seems to ignore the --datarootdir settingconfig.status: creating expat.pcconfig.status: creating expat_config.hconfig.status: executing libtool commandsroot@ubuntu:/home/wl/service/dependency/expat/expat-2.2.0

执行make

root@ubuntu:/home/wl/service/dependency/expat/expat-2.2.0# make/bin/bash ./libtool --verbose --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o lib/xmlparse.lo -c lib/xmlparse.clibtool: compile:  gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlparse.c  -fPIC -DPIC -o lib/.libs/xmlparse.olibtool: compile:  gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlparse.c -o lib/xmlparse.o >/dev/null 2>&1/bin/bash ./libtool --verbose --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o lib/xmltok.lo -c lib/xmltok.clibtool: compile:  gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmltok.c  -fPIC -DPIC -o lib/.libs/xmltok.olibtool: compile:  gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmltok.c -o lib/xmltok.o >/dev/null 2>&1/bin/bash ./libtool --verbose --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o lib/xmlrole.lo -c lib/xmlrole.clibtool: compile:  gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlrole.c  -fPIC -DPIC -o lib/.libs/xmlrole.olibtool: compile:  gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -c lib/xmlrole.c -o lib/xmlrole.o >/dev/null 2>&1/bin/bash ./libtool --verbose --mode=link gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -no-undefined -version-info 7:2:6 -rpath /usr/local/lib  -o libexpat.la lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lolibtool: link: gcc -shared  -fPIC -DPIC  lib/.libs/xmlparse.o lib/.libs/xmltok.o lib/.libs/xmlrole.o    -g -O2   -Wl,-soname -Wl,libexpat.so.1 -o .libs/libexpat.so.1.6.2libtool: link: (cd ".libs" && rm -f "libexpat.so.1" && ln -s "libexpat.so.1.6.2" "libexpat.so.1")libtool: link: (cd ".libs" && rm -f "libexpat.so" && ln -s "libexpat.so.1.6.2" "libexpat.so")libtool: link: ar cru .libs/libexpat.a  lib/xmlparse.o lib/xmltok.o lib/xmlrole.olibtool: link: ranlib .libs/libexpat.alibtool: link: creating libexpat.lalibtool: link: ( cd ".libs" && rm -f "libexpat.la" && ln -s "../libexpat.la" "libexpat.la" )gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o xmlwf/xmlwf.o -c xmlwf/xmlwf.cgcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o xmlwf/xmlfile.o -c xmlwf/xmlfile.cgcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o xmlwf/codepage.o -c xmlwf/codepage.cgcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H -o xmlwf/unixfilemap.o -c xmlwf/unixfilemap.c/bin/bash ./libtool --verbose --mode=link gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions  -DHAVE_EXPAT_CONFIG_H  -o xmlwf/xmlwf xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/unixfilemap.o libexpat.lalibtool: link: gcc -std=gnu99 -I./lib -I. -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H -o xmlwf/.libs/xmlwf xmlwf/xmlwf.o xmlwf/xmlfile.o xmlwf/codepage.o xmlwf/unixfilemap.o  ./.libs/libexpat.solibtool: link: creating xmlwf/xmlwfroot@ubuntu:/home/wl/service/dependency/expat/expat-2.2.0# 

make install

root@ubuntu:/home/wl/service/dependency/expat/expat-2.2.0# make install/bin/bash ./conftools/mkinstalldirs /usr/local/lib /usr/local/include /usr/local/lib/pkgconfig/bin/bash ./libtool --mode=install /usr/bin/install -c libexpat.la /usr/local/lib/libexpat.lalibtool: install: /usr/bin/install -c .libs/libexpat.so.1.6.2 /usr/local/lib/libexpat.so.1.6.2libtool: install: (cd /usr/local/lib && { ln -s -f libexpat.so.1.6.2 libexpat.so.1 || { rm -f libexpat.so.1 && ln -s libexpat.so.1.6.2 libexpat.so.1; }; })libtool: install: (cd /usr/local/lib && { ln -s -f libexpat.so.1.6.2 libexpat.so || { rm -f libexpat.so && ln -s libexpat.so.1.6.2 libexpat.so; }; })libtool: install: /usr/bin/install -c .libs/libexpat.lai /usr/local/lib/libexpat.lalibtool: install: /usr/bin/install -c .libs/libexpat.a /usr/local/lib/libexpat.alibtool: install: chmod 644 /usr/local/lib/libexpat.alibtool: install: ranlib /usr/local/lib/libexpat.alibtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/sbin" ldconfig -n /usr/local/lib----------------------------------------------------------------------Libraries have been installed in:   /usr/local/libIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the '-LLIBDIR'flag during linking and do at least one of the following:   - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable     during execution   - add LIBDIR to the 'LD_RUN_PATH' environment variable     during linking   - use the '-Wl,-rpath -Wl,LIBDIR' linker flag   - have your system administrator add LIBDIR to '/etc/ld.so.conf'See any operating system documentation about shared libraries formore information, such as the ld(1) and ld.so(8) manual pages.----------------------------------------------------------------------for FN in ./lib/expat.h ./lib/expat_external.h expat_config.h ; do /usr/bin/install -c -m 644 $FN /usr/local/include ; done/usr/bin/install -c -m 644 expat.pc /usr/local/lib/pkgconfig/expat.pc/bin/bash ./conftools/mkinstalldirs /usr/local/bin /usr/local/share/man/man1/bin/bash ./libtool --mode=install /usr/bin/install -c xmlwf/xmlwf /usr/local/bin/xmlwflibtool: install: /usr/bin/install -c xmlwf/.libs/xmlwf /usr/local/bin/xmlwf/usr/bin/install -c -m 644 ./doc/xmlwf.1 /usr/local/share/man/man1root@ubuntu:/home/wl/service/dependency/expat/expat-2.2.0# 

完成

原创粉丝点击