<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Snooda]]></title> 
<link>http://www.snooda.com/index</link> 
<description><![CDATA[Snooda's Blog]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Snooda]]></copyright>
<item>
<link>http://www.snooda.com/read/</link>
<title><![CDATA[rtorrent支持ipv6的问题]]></title> 
<author>snooda &lt;admin@snooda.com&gt;</author>
<category><![CDATA[默认分类]]></category>
<pubDate>Sat, 14 May 2011 14:21:10 +0000</pubDate> 
<guid>http://www.snooda.com/read/</guid> 
<description>
<![CDATA[ 
	    最近想了解一下p2p的东西，于是决定装个rtorrent，rtorrent依赖于libtorrent库。yum源里带的版本太旧，于是决定自己编译一个。<br />
<br />
    选了rtorrent官网推荐的stable版的libtorrent-0.12.6.tar.gz和rtorrent-0.8.6.tar.gz，编译过程总体比较顺利。期间遇到一个问题，就是我把libtorrent安装到了自己定义的一个路径下，在编译rtorrent的时候用pkg-config搜索libtorrent的时候无法找到。<br />
    <br />
    搜了一下有两个方案，一种是export PKG_CONFIG_PATH=&quot;libtorrent的路径&quot;，把路径加入pkg-config的搜索路径，是个比较简单的方法。还有一种是定义libtorrent_LIBS环境变量，用来替代pkg-config的输出，比较复杂，不推荐。<br />
<br />
    编译好后下个bt测试一下，结果发现不能连接tracker服务器，老是timed out。查了下需要libcurl-7.19以上且编译时需要编译时加入c-ares支持，而yum源里最新的是7.15，需要重新编译libcurl，评估了一下代价太大。查了下说0.8.2版以后才有此问题，于是下了个0.8.1版的rtorrent编译了。<br />
<br />
    在编译rtorrent的时候加了--enable-ipv6，但是实际使用中无法启用ipv6，又查了下发现在编译libtorrent的时候也要加--enable-ipv6.加上后还是不行。后来发现需要给libtorrent打个补丁：<br />
<br />
cd libtorrent-0.12.6<br />
wget http://home.samfundet.no/~sesse/libtorrent-0.12.6-ipv6-07.patch<br />
patch -p1 &lt; libtorrent-0.12.6-ipv6-07.patch<br />
<br />
然后再configure --enable-ipv6，make，make install。<br />
<br />
一切ok。
]]>
</description>
</item><item>
<link>http://www.snooda.com/read/#blogcomment</link>
<title><![CDATA[[评论] rtorrent支持ipv6的问题]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.snooda.com/read/#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>