- 论坛徽章:
- 0
|
gcc的安装见另一个帖子:
http://bbs.chinaunix.net/thread-1274805-1-1.html
本来打算用静态库的, 结果发现引用到的某些系统自带的库(也可能是gnutools带的库)只有动态版本, 为了避免麻烦, 最后还是用动态库了.
系统里没有Berkeley DB 的库, 反正我也不用, 就不管了.
编译的过程基本上还算顺利.
以下是我编译的过程:
从官方站点下载subversion-1.5.2.tar.gz和subversion-deps-1.5.2.tar.gz
拷贝到/tmp/
# gunzip *.gz
# tar -xvf subversion-1.5.2.tar
# tar -xvf subversion-deps-1.5.2.tar
# cd subversion-1.5.2
在编译serf库的时候会报错, 反正也没用, 就删除掉了
# rm -rf serf
# mkdir objdir
# cd objdir
# ../configure --prefix=/usr/local/svn --enable-static=no
# make
make的过程中会报一个错误, 号称找不到libapr-1.so.0, 但是刚才编译的时候实际上已经编译成功了, 手工做个链接吧
# ln -s /tmp/subversion-1.5.2/objdir/apr/.libs/libapr-1.so.2.2.12 /usr/lib/libapr-1.so.0
然后继续make
# make
# make install
然后删掉刚才建立的符号链接
# rm /usr/lib/libapr-1.so.0
# l /usr/local/svn/
total 12
drwxr-xr-x 2 root sys 512 Oct 4 17:11 bin
drwxr-xr-x 2 root sys 512 Oct 4 17:10 build-1
drwxr-xr-x 5 root sys 512 Oct 4 17:11 include
drwxr-xr-x 3 root sys 1536 Oct 4 17:11 lib
drwxr-xr-x 5 root sys 512 Oct 4 17:10 share
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/local/svn/lib"
# export PATH=$PATH:/usr/local/svn/bin
# ldd /usr/local/svn/bin/svn
/usr/local/svn/bin/svn needs:
libsvn_client-1.so.0 => /usr/local/svn/lib/libsvn_client-1.so.0
libsvn_wc-1.so.0 => /usr/local/svn/lib/libsvn_wc-1.so.0
libsvn_ra-1.so.0 => /usr/local/svn/lib/libsvn_ra-1.so.0
libsvn_diff-1.so.0 => /usr/local/svn/lib/libsvn_diff-1.so.0
libsvn_ra_local-1.so.0 => /usr/local/svn/lib/libsvn_ra_local-1.so.0
libsvn_repos-1.so.0 => /usr/local/svn/lib/libsvn_repos-1.so.0
libsvn_fs-1.so.0 => /usr/local/svn/lib/libsvn_fs-1.so.0
libsvn_fs_fs-1.so.0 => /usr/local/svn/lib/libsvn_fs_fs-1.so.0
libsvn_fs_util-1.so.0 => /usr/local/svn/lib/libsvn_fs_util-1.so.0
libsvn_ra_svn-1.so.0 => /usr/local/svn/lib/libsvn_ra_svn-1.so.0
/usr/lib/libsasl2.so.2
/usr/lib/libssl.so.0.9.6
/usr/lib/libcrypto.so.0.9.6
/usr/lib/libdb.so.4
librpcsvc.so => /usr/lib/librpcsvc.so
libsvn_ra_neon-1.so.0 => /usr/local/svn/lib/libsvn_ra_neon-1.so.0
libsvn_delta-1.so.0 => /usr/local/svn/lib/libsvn_delta-1.so.0
libsvn_subr-1.so.0 => /usr/local/svn/lib/libsvn_subr-1.so.0
libaprutil-1.so.0 => /usr/local/svn/lib/libaprutil-1.so.0
libapr-1.so.0 => /usr/local/svn/lib/libapr-1.so.0
/usr/lib/libresolv.so.1
/usr/lib/libz.so.1
/usr/lib/libexpat.so.4
/usr/lib/libgnuintl.so.4
/usr/lib/libsocket.so.2
/usr/lib/libc.so.1
# cd /usr/local/svn
# tar -cvf subversion-1.5.2.for.sco507.tar *
# compress subversion-1.5.2.for.sco507.tar
打包后的文件可以拷贝到其他机器上使用.
可以释放到/usr或/usr/local这种公共路径下,
也可以释放到/usr/local/svn这种专有路径下, 并设置适当的PATH和LD_LIBRARY_PATH变量. |
|