Chinaunix首页 | 论坛 | 博客
  • 博客访问: 302206
  • 博文数量: 47
  • 博客积分: 2455
  • 博客等级: 大尉
  • 技术积分: 558
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-25 15:43
文章分类

全部博文(47)

文章存档

2016年(2)

2012年(10)

2011年(13)

2010年(1)

2009年(19)

2008年(2)

分类: LINUX

2009-02-19 19:45:22

由于需要用到xerces,xqilla,swig,所以就记录一下安装的过程
当前目录结构为:
swig-1.3.33  XQilla-1.1.0 XQilla-2.1.3 xerces-c-src_2_8_0

首先安装xerces,首先没看文档,就直接用configure,make来操作了,不过, configure完了后, make一下,居然说No target to make, 把我惊了.

查了一下文档,才知道,需要用src/xercesc的runConfigure的脚本来执行configure,
用法如下:

runConfigure: Helper script to run "configure" for one of the
supported platforms
Usage: runConfigure "options"
where options may be any of the following:
-p (accepts 'aix', 'beos', 'linux', 'freebsd',
'netbsd', 'solaris', 'hp-10', 'hp-11', 'openserver', 'unixware',
'os400', 'os390', 'irix', 'ptx', 'tru64', 'macosx', 'cygwin',
'qnx', 'interix', 'mingw-msys')
[required; no default]
-c (e.g. gcc, cc, xlc_r, qcc, icc, icpc or ecc)
[default is make default; cc for gnu make]
-x (e.g. g++, CC, aCC, xlC_r, xlC_rv5compat, QCC,
icc, icpc or ecc) [default is make default; g++ for gnu make]
-d (specifies that you want to build debug version)
[default: no debug]
-m can be 'inmem', 'icu', 'MsgFile' or
'iconv' [default: inmem]
-n can be 'fileonly', 'libwww', 'socket', 'winsock' or
'native' [default: socket]
-t can be 'icu', 'Iconv400', 'Uniconv390', 'Win32',
'IconvFBSD', 'IconvGNU' or 'native'
[default: native]
-r can be 'pthread' or 'dce'
(AIX, HP-11, and Solaris) or 'sproc' (IRIX) or 'none'
[default: pthread]
-s (specifies that you want to build static libraries) [default: shared]
-b (accepts '64', '32') [default: 32]
-l
-z
-P
-C
-h (get help on the above commands)

其中运行前,首先要设定一下环境变量:XERCESCROOT,就是xerces的顶层目录

运行完后, make一下, xerces就开始build了
cd xerces-c-src_2_8_0
export XERCESCROOT=`pwd`
cd src/xercesc/
bash runConfigure -P $HOME/install -p linux
make
make install
cd ../../..

我在某台机器执行sudo make install (prefix为 /usr/local)的时候还碰到此类问题:
make -C /obj install
make[1]: Entering directory `/obj'
make[1]: *** No rule to make target `install'. Stop.
make[1]: Leaving directory `/obj'
make: *** [install] Error 2

基本上,这是因为sudo后用的是root的权限,而root没有XERCESCROOT这个变量,故而,需要设置一下:
sudo XERCESCROOT=$XERCESCROOT make install
这样执行命令, 就没有什么问题了.


而后是安装Xqilla,
基本过程就是configure/make的过程,其中,需要设置xerces的源代目路径,而且注意,一定是绝对路径
否则将出现以下错误:

libtool: link: only absolute run-paths are allowed

过程很简单:
cd XQilla-2.1.3
 ./configure --prefix=$HOME/install --with-xerces=`pwd`/../xerces-c-src_2_8_0 --enable-shared
make
make install
cd ..

最后是swig
swig的就更简单了
过程:
cd swig-1.3.33
 ./configure --enable-shared --prefix=$HOME/install
make
make install
cd ..



阅读(5502) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-06-11 23:10:42

我使用的是Fedora core6, 當我安装xerces時, cd xerces-c-src_2_8_0 export XERCESCROOT=`pwd` cd src/xercesc/ bash runConfigure -P $HOME/install -p linux make 就會出現 make -C /root/xerces-c-src_2_8_0/obj -k make[1]: Entering directory `/root/xerces-c-src_2_8_0/obj' make[1]: Nothing to be done for `ALL'. make[1]: Leaving directory `/root/xerces-c-src_2_8_0/obj' 請問這個要如何解?