术语汇编:剖析Subversion编译相关问题

开发 项目管理
本文说一下Subversion编译问题,希望对正在学习Subversion的读者有所帮助。

大家都知道Subversion(svn)是很好的版本管理工具,它有三个最常用的模块,但如果进行手动Subversion编译安装,实在是一件困难的事情。下面首先来看看最常用的模块。

Subversion有三个最常用的模块:
*ra_svn:使用svn网络协议访问档案库的模块。
-handles’svn’scheme
◆ra_local:访问本地磁盘的档案库模块。
◆ra_dav:访问http://档案库模块。
前面两个,是Subversion编译的默认模块,ra_dav是大多数人遇到的问题。如果ra_dav没有编译到系统中,当你从http://这样的路径checkout时,会出现这样的错误提示:svn:UnrecognizedURLscheme
那么,如何编译ra_dav呢?你至少需要越过以下几道关卡:
1、ra_dav是由一个叫neon的软件完成的,你需要安装neon。
neon的官方网站:http://www.webdav.org/neon/
2、重新configureSubversion
这一步非常重要,稍不小心,就可能会找不到neon,即使你已经安装neon,即使你已经将neon的源代码加压到Subversion的目录下,即使你已经把neon-0.28.4改名为neon目录。configureSubversion有一个很不爽的地方就是,当你configure配置了neon,但configure失败的时候,它不会把这个结果在执行完单独列出来,而是在configure的输出过程中显示,让人误以为configureok,其实,neon并没有被configure进去。

在我编译Subversion1.6.1版本中,neon失败的输出为:
configure:checkingneonlibrary
Anappropriateversionofneoncouldnotbefound,solibsvn_ra_neon
willnotbebuilt.Ifyouwanttobuildlibsvn_ra_neon,pleaseeither
installneon0.28.4onthissystem or
getneon0.28.4from:
http://www.webdav.org/neon/neon-0.28.4.tar.gz
unpackthearchiveusingtar/gunzipandrenametheresulting
directoryfrom./neon-0.28.4/to./neon/

我之前尝试了多种configure的方法,例如:./configure–prefix=/usr/–with-apr=/usr/bin/apr-1-config–with-apr-util=/usr/bin/apu-1-cfig–with-neon=/usr/bin/neon-config–with-zlib=/lib–with-apache-libexecdir–with-apxs=/usr/sbin/apxs或者把neon解压到当前目录,并改名为neon,configure如下:./configure–prefix=/usr/–with-apr=/usr/bin/apr-1-config–with-apr-util=/usr/bin/apu-1-cfig–with-neon=./neon–with-zlib=/lib–with-apache-libexecdir–with-apxs=/usr/sbin/apxs
这两种configure方式都会导致neon无法作为Subversion的编译选项,正确的configure方法是–with-neon后不加参数,这个Subversion的configure也真是够贱的!./configure–prefix=/usr/–with-apr=/usr/bin/apr-1-config–with-apr-util=/usr/bin/apu-1-cfig–with-neon=–with-zlib=/lib–with-apache-libexecdir–with-apxs=/usr/sbin/apxs
这一步完成后,make&&makeinstall就没有问题了。

Subversion编译安装完成后,使用svn–admin来验证:
#svn–version
svn,version1.6.1(r37116)
compiledApr292009,10:56:22
Copyright(C)2000-2009CollabNet.
Subversionisopensourcesoftware,seehttp://Subversion.tigris.org/
ThisproductincludessoftwaredevelopedbyCollabNet(http://www.Collab.Net/).
Thefollowingrepositoryaccess(RA)modulesareavailable:
◆ra_neon:ModuleforaccessingarepositoryviaWebDAVprotocolusingNeon.
-handles‘http’scheme
◆ra_svn:Moduleforaccessingarepositoryusingthesvnnetworkprotocol.
-handles’svn’scheme
◆ra_local:Moduleforaccessingarepositoryonlocaldisk.
-handles‘file’scheme

以上内容引自http://www.9say.com/2009/04/Subversion-compile-with-ra-dav/
另外在按上面方法进行解决的时候发现问题:当把neon解压到当前目录,并改名为neon后,configure如下:
./configure–prefix=/usr/–with-apr=/usr/bin/apr-1-config–with-apr-util=/usr/bin/apu-1-cfig–with-zlib=/lib–with-apache-libexecdir–with-apxs=/usr/sbin/apxs就可以了,无需指定neon。大家在configure的时候看有没有找到neon如果找到,就肯定没有问题了。
另外关于make时遇到fPCI的问题,请把neon/src/下的Makefile里的CFLAGS=-g-02改为CFLAGS=-fPIC-g-02.,好了Subversion编译问题到这里已经介绍完了,如果你想学习其他有关Subversion方面的知识,请单击www.51cto.com查找相关内容。
.

【编辑推荐】

  1. Subversion SVN协议解析远程整数溢出漏洞
  2. CentOS系统中安装subversion并使用svn+ssh访问
  3. SubVersion Windows安装指南
  4. 七步搞定Subversion服务器在Ubuntu下的配置
  5. 如何结合使用Subversion和Eclipse
责任编辑:佚名
相关推荐

2010-05-13 15:38:19

Subversion

2010-05-18 16:17:24

Visual Subv

2010-09-15 15:27:06

CSS hack

2010-07-13 10:21:19

2010-09-17 09:19:08

Java API

2010-08-05 14:51:36

AdobeFlex

2010-06-07 13:02:46

Hadoop简介

2010-07-20 16:25:50

Perl正则表达式

2010-07-13 09:02:16

Perl

2010-06-11 18:27:39

UML对象图

2010-07-30 10:23:46

Flex数据绑定

2010-06-11 09:33:47

UML顺序图

2010-07-08 09:50:11

UML构件图

2010-06-29 15:06:14

UML建模

2010-09-26 17:04:48

JVMJava虚拟机

2010-07-19 16:56:56

Perl线程

2010-06-10 18:27:00

UML语言

2010-07-26 16:54:15

Perl引用

2010-07-27 08:59:19

FlexBuilder

2010-08-10 10:32:02

Flex语言
点赞
收藏

51CTO技术栈公众号