免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5038 | 回复: 1
打印 上一主题 下一主题

请问有人在AIX下成功安装过libxml2吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-03 15:24 |只看该作者 |倒序浏览
AIX下libxml2的编译\r\n\r\n1. AIX上安装了libiconv但支持中文有问题。使用过程中的一些可能和这个库关系,要注意。\r\n\r\n从http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.10.tar.gz  下载libiconv安装。\r\n执行:\r\nexport CFLAGS=-O             # 优化编译,取消缺省的-g选项,能减小lib的大小。差不多减小一半的大小。\r\n$./configure --enable-shared=no --prefix=/usr/opt/libiconv   # 禁止动态库,这是为了防止与操作系统自有的iconv库混淆\r\n$make\r\n$make install prefix=/usr/opt/libiconv     # prefix指定libiconv的安装路径,也可在configure的时候指定\r\n\r\n\r\n2. 从www.xmlsoft.org下载libxml2最新版本,解压缩。\r\n\r\n3. 执行\r\nexport CFLAGS=-O             # 优化编译,取消缺省的-g选项,能减小lib的大小。\r\n$./configure –help 来查看配置选项,选择\r\n$./configure --with-iconv=/usr/opt/libiconv  --enable-shared=no --prefix=/usr/opt/libxml2\r\n#此处指定了prefix,make install的时候就不用指定了。\r\n\r\n--with-minimum # 如果是用在生产环境中,可以开打这个选项。但要把需要的模块打开。注意一下disable掉的模块。\r\n\r\n--enable-ipv6=yes/no     #  如果出现了socket方面的问题,可以关闭这个参数。\r\n\r\n# libiconv的安装目录的绝对路径,否则libxml2会找到操作系统自带的iconv\r\n注意是否找到了iconv。相关显示如下\r\n   checking for iconv.h... yes\r\n   checking for iconv in -liconv... yes\r\n如果没有,查找原因。\r\n$make\r\n$make install prefix=/usr/opt/libxml2    # prefix 指定libxml2的安装路径\r\n4. 测试环境\r\n执行:\r\n$./testapi\r\n查看各个函数的测试结果。\r\n自己写一个xml文件,例如:\r\nt.xml:\r\n<?xml version=\"1.0\" encoding=\"gbk\"?>\r\n<主体>测试数据</主体>\r\n执行:\r\n$xmllint a.xml\r\n如果没有报错,说明支持了中文。\r\n如果有错,可能说明libxml2编译的时候连接了操作系统自己的libiconv,从头检查操作步骤。\r\n-------------------------------------------------------------------------------------------------\r\n\r\n按这种方法不行的,需要像SCO UNIX一下安装gcc吗?\r\n(AIX5.3 XLC6.0)

论坛徽章:
0
2 [报告]
发表于 2007-05-03 15:27 |只看该作者
安装libiconv-1.10时出现:\r\napp/usr/tmp/libiconv-1.10]export CFLAGS=0\r\n[app/usr/tmp/libiconv-1.10]./configure --enable-shared=no --prefix=/app/opt/libiconv\r\nchecking for a BSD-compatible install... build-aux/install-sh -c\r\nchecking whether build environment is sane... yes\r\nchecking for gawk... no\r\nchecking for mawk... no\r\nchecking for nawk... nawk\r\nchecking whether make sets $(MAKE)... yes\r\nchecking whether make sets $(MAKE)... (cached) yes\r\nchecking for gcc... no\r\nchecking for cc... cc\r\nchecking for C compiler default output file name...\r\n系统停在这里不动了,无法安装完成\r\n--------------------------------------\r\nconfig日志:\r\n我把最后的列出来:\r\nEnvironment Variables\r\n     1.OBJECT_MODE changes the compilation-mode behavior, unless overridden by\r\n                   configuration file or command-line options\r\n\r\n        Setting\r\n\r\n         not set   32-bit compiler mode.\r\n          32       32-bit compiler mode.\r\n          64       64-bit compiler mode.\r\n         32_64     Fatal error and stop, unless an explicit configuration \r\n                   file or command-line compiler-mode setting exists.\r\n        any other  Fatal error and stop, unless an explicit configuration \r\n                   file or command-line compiler-mode setting exists.\r\n\r\n  For a detailed description of each option, please refer to the\r\n  IBM C and C++ Compilers User\'s Guide.\r\n\r\nexec: /usr/bin/pg(/usr/bin/pg,/usr/ibmcxx/exe/default_msg/ibmcxx.help,NULL)\r\nunlink: /tmp/xlcaHlTia\r\nunlink: /tmp/xlcaHlTib\r\nunlink: /tmp/xlcaHlTic\r\nconfigure:2309: $? = 249\r\nconfigure:2311: cc -V </dev/null >&5\r\ncc: 1501-208 command option V is missing a subargument\r\nconfigure:2314: $? = 40\r\nconfigure:2337: checking for C compiler default output file name\r\nconfigure:2340: cc -O   conftest.c  >&5
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP