免费注册 查看新帖 |

Chinaunix

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

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

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-03 15:24 |只看该作者 |倒序浏览
AIX下libxml2的编译

1. AIX上安装了libiconv但支持中文有问题。使用过程中的一些可能和这个库关系,要注意。

http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.10.tar.gz  下载libiconv安装。
执行:
export CFLAGS=-O             # 优化编译,取消缺省的-g选项,能减小lib的大小。差不多减小一半的大小。
$./configure --enable-shared=no --prefix=/usr/opt/libiconv   # 禁止动态库,这是为了防止与操作系统自有的iconv库混淆
$make
$make install prefix=/usr/opt/libiconv     # prefix指定libiconv的安装路径,也可在configure的时候指定


2. 从www.xmlsoft.org下载libxml2最新版本,解压缩。

3. 执行
export CFLAGS=-O             # 优化编译,取消缺省的-g选项,能减小lib的大小。
$./configure –help 来查看配置选项,选择
$./configure --with-iconv=/usr/opt/libiconv  --enable-shared=no --prefix=/usr/opt/libxml2
#此处指定了prefix,make install的时候就不用指定了。

--with-minimum # 如果是用在生产环境中,可以开打这个选项。但要把需要的模块打开。注意一下disable掉的模块。

--enable-ipv6=yes/no     #  如果出现了socket方面的问题,可以关闭这个参数。

# libiconv的安装目录的绝对路径,否则libxml2会找到操作系统自带的iconv
注意是否找到了iconv。相关显示如下
   checking for iconv.h... yes
   checking for iconv in -liconv... yes
如果没有,查找原因。
$make
$make install prefix=/usr/opt/libxml2    # prefix 指定libxml2的安装路径
4. 测试环境
执行:
$./testapi
查看各个函数的测试结果。
自己写一个xml文件,例如:
t.xml:
<?xml version="1.0" encoding="gbk"?>
<主体>测试数据</主体>
执行:
$xmllint a.xml
如果没有报错,说明支持了中文。
如果有错,可能说明libxml2编译的时候连接了操作系统自己的libiconv,从头检查操作步骤。
-------------------------------------------------------------------------------------------------

按这种方法不行的,需要像SCO UNIX一下安装gcc吗?
(AIX5.3 XLC6.0)

论坛徽章:
0
2 [报告]
发表于 2007-05-03 15:27 |只看该作者
安装libiconv-1.10时出现:
app/usr/tmp/libiconv-1.10]export CFLAGS=0
[app/usr/tmp/libiconv-1.10]./configure --enable-shared=no --prefix=/app/opt/libiconv
checking for a BSD-compatible install... build-aux/install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... no
checking for cc... cc
checking for C compiler default output file name...
系统停在这里不动了,无法安装完成
--------------------------------------
config日志:
我把最后的列出来:
Environment Variables
     1.OBJECT_MODE changes the compilation-mode behavior, unless overridden by
                   configuration file or command-line options

        Setting

         not set   32-bit compiler mode.
          32       32-bit compiler mode.
          64       64-bit compiler mode.
         32_64     Fatal error and stop, unless an explicit configuration
                   file or command-line compiler-mode setting exists.
        any other  Fatal error and stop, unless an explicit configuration
                   file or command-line compiler-mode setting exists.

  For a detailed description of each option, please refer to the
  IBM C and C++ Compilers User's Guide.

exec: /usr/bin/pg(/usr/bin/pg,/usr/ibmcxx/exe/default_msg/ibmcxx.help,NULL)
unlink: /tmp/xlcaHlTia
unlink: /tmp/xlcaHlTib
unlink: /tmp/xlcaHlTic
configure:2309: $? = 249
configure:2311: cc -V </dev/null >&5
cc: 1501-208 command option V is missing a subargument
configure:2314: $? = 40
configure:2337: checking for C compiler default output file name
configure:2340: cc -O   conftest.c  >&5
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP