transmission-1.75编译出错,暂用[edubt]transmission_1.52-1_i386.deb

上网、浏览、聊天、下载等
回复
头像
mickeywaley
帖子: 1427
注册时间: 2009-03-19 9:19
系统: ubuntu
来自: 江苏
联系:

transmission-1.75编译出错,暂用[edubt]transmission_1.52-1_i386.deb

#1

帖子 mickeywaley » 2009-10-16 19:36

最新更新件6楼的 [edubt]Transmission 1.76 for 6v.deb
transmission是一个在linux下比较流行的bt客户端,gtk界面,支持daemon,并有方便的web前端和第三方的客户端。
transmission在大约1.50版的时候开始声明支持ipv6了,但是实际使用过程中却发现连接到byrbt的tracker时,服务端见到的ip是v4的ip,即使在/etc/hosts文件中指定了tracker的v6地址也一样。
google到了transmission的trac上有讨论这个问题(1,2)。似乎是transmission在对byrbt这样的v4/v6双栈的tracker时只解析v4地址,不解析v6地址。
解决的办法很简单,修改源码里libtransmission/web.c,
找到 curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );一行,
将CURL_IPRESOLVE_V4修改为CURL_IPRESOLVE_V6,
然后正常编译安装即可。如果同时需要使用v4的 tracker,
可以把这部分修改成CURL_IPRESOLVE_WHATEVER
官方下载:http://www.transmissionbt.com/download.php
下载源码:http://mirrors.m0k.org/transmission/fil ... 75.tar.bz2
加压到 家 个人 目录/home/用户名/ 方便以后卸载

代码: 全选

sudo su

代码: 全选

./configure

代码: 全选

make

代码: 全选

make install
SSL解决
----------------
又遇到问题:
checking for OPENSSL... no
checking for OpenSSL... configure: error: Cannot locate ssl
解决方法产考:http://forum.transmissionbt.com/viewtop ... f=2&t=6339
http://www.yellowdog-board.com/viewtopi ... 76&start=0

解决办法:如果出现,把openssl-devel装上就可以了,步骤如下:
ubuntu安装openssl

代码: 全选

$ sudo apt-get install libssl0.9.8
$ sudo apt-get install libssl-dev
$ sudo apt-get install openssl
------------
又遇到问题了,

代码: 全选

checking for LIBCURL... configure: error: Package requirements (libcurl >= 7.16.3) were not met:

No package 'libcurl' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBCURL_CFLAGS
and LIBCURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
遇到的其他问题也很多
安装低版本的试试去1.73一样 :em20
http://www.laonb.com/archives/5212/ Transmission 1.72-开源BT软件 :em20
上次由 mickeywaley 在 2009-12-05 18:14,总共编辑 2 次。
头像
mickeywaley
帖子: 1427
注册时间: 2009-03-19 9:19
系统: ubuntu
来自: 江苏
联系:

Re: 关于transmission-1.75的ipv6支持问题,编译出错

#2

帖子 mickeywaley » 2009-10-16 22:51

http://bt.neu6.edu.cn/viewthread.php?ti ... a=page%3D1
示例linux系统为Ubuntu 8.04, Transmission 版本为1.52。

注意:Transmission版本要在1.50以上,不然不支持ipv6。Ubuntu源里的Transmission不解析ipv6的DNS地址,所以我们需要从源码编译安装。


第一步:下载源码压缩包文件,放置在test文件夹,解压,进入解压后的文件夹。

cd test
tar xjvf transmission-1.52.tar.bz2
cd transmission-1.52


第二步:修改libtransmission下的web.c文件,使其支持解析ipv6的DNS地址。

vim libtransmission/web.c
查找
curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
修改为
curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);


第三步:修改libtransmission下的tracker.c文件,使其能在六维空间下载。一般完成第二步后Transmission就可以在北邮人等ipv6的PT网站上下载了。但是六维空间的tracker服务器对于torrent hash的escape和Transmission有差别,以至于Tranmsision无法获得peers,无法下载。希望六维空间管理员加以修改,增加兼容性。

vim libtransmission/tracker.c
查找
static int
is_rfc2396_alnum( char ch )
{
return ( '0' <= ch && ch <= '9' )
|| ( 'A' <= ch && ch <= 'Z' )
|| ( 'a' <= ch && ch <= 'z' );
}

static void
escape( char * out,
const uint8_t * in,
int in_len ) /* rfc2396 */
{
const uint8_t *end = in + in_len;

while( in != end )
if( is_rfc2396_alnum( *in ) )
*out++ = (char) *in++;
else
out += tr_snprintf( out, 4, "%%%02X", (unsigned int)*in++ );

*out = '\0';
}

修改为
static int
is_rfc2396_alnum( char ch )
{
return ( '0' <= ch && ch <= '9' )
|| ( 'A' <= ch && ch <= 'Z' )
|| ( 'a' <= ch && ch <= 'z' )
|| ( ch == '.' )
|| ( ch == '-' )
|| ( ch == '_' )
|| ( ch == '~' );
}

static void
escape( char * out,
const uint8_t * in,
int in_len ) /* rfc2396 */
{
const uint8_t *end = in + in_len;

while( in != end )
if( is_rfc2396_alnum( *in ) )
*out++ = (char) *in++;
else
out += tr_snprintf( out, 4, "%%%02x", (unsigned int)*in++ );

*out = '\0';
}


第四步:完成编译安装,本例将把Transmission安装在/opt/transmission下。

./configure --prefix=/opt/transmission --enable-shared --enable-gtk --disable-cli --disable-daemon
make
make check
sudo make install


第五步:后续优化和配置

sudo find /opt/transmission -type f -exec strip --strip-debug {} \;
sudo ln -s /opt/transmission/bin/transmission /usr/local/bin
sudo ln -s /opt/transmission/share/applications/transmission.desktop /usr/local/share/applications/transmission.desktop
sudo ln -s /opt/transmission/share/icons/hicolor/16x16/apps/transmission.png /usr/local/share/icons/hicolor/16x16/apps/transmission.png
sudo ln -s /opt/transmission/share/icons/hicolor/32x32/apps/transmission.png /usr/local/share/icons/hicolor/32x32/apps/transmission.png
sudo ln -s /opt/transmission/share/icons/hicolor/48x48/apps/transmission.png /usr/local/share/icons/hicolor/48x48/apps/transmission.png
sudo ln -s /opt/transmission/share/pixmaps/transmission.png /usr/share/app-install/icons/transmission.png

这样Transmission就出现在应用程序--互联网中了。Enjoy it!
还是编译出错啊,编译环境没问题
头像
mickeywaley
帖子: 1427
注册时间: 2009-03-19 9:19
系统: ubuntu
来自: 江苏
联系:

Re: 关于transmission-1.75的ipv6支持问题,编译出错

#3

帖子 mickeywaley » 2009-10-16 23:05

代码: 全选

may@may-desktop:~$ cd /home/may/transmission-1.75
may@may-desktop:~/transmission-1.75$ ./configure --prefix=/opt/transmission --enable-shared --enable-gtk --disable-cli --disable-daemon
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for inline... inline
checking gcc version... 4.3.3
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for lrintf... no
checking for strlcpy... no
checking for daemon... yes
checking for dirname... yes
checking for basename... yes
checking for strcasecmp... yes
checking for localtime_r... yes
checking for posix_fallocate... yes
checking for memmem... yes
checking for strtold... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for library containing cos... -lm
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENSSL... yes
checking for LIBCURL... yes
checking for /tmp/dummy1_zlib.h... yes
checking for library containing gzopen... -lz
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking whether posix_fadvise is declared... yes
checking for posix_fadvise... yes
checking sys/inotify.h usability... yes
checking sys/inotify.h presence... yes
checking for sys/inotify.h... yes
checking for inotify_init... yes
checking sys/event.h usability... no
checking sys/event.h presence... no
checking for sys/event.h... no
checking xfs/xfs.h usability... no
checking xfs/xfs.h presence... no
checking for xfs/xfs.h... no
checking how to copy va_list... va_copy
checking for clock_gettime in -lrt... yes
checking for evutil_vsnprintf in -levent... no
checking event-config.h usability... no
checking event-config.h presence... no
checking for event-config.h... no
configure: WARNING: using our own libevent from third-party/libevent/
configure: WARNING: if you are cross-compiling this is probably NOT what you want.
checking for GTK... no
configure: error: "GTK+ not found!"

:em20 :em20 :em20
头像
mickeywaley
帖子: 1427
注册时间: 2009-03-19 9:19
系统: ubuntu
来自: 江苏
联系:

Re: 关于transmission-1.75的ipv6支持问题,编译出错

#4

帖子 mickeywaley » 2009-10-16 23:22

临时解决 办法如下
transmission_1.52-1_i386.deb.zip (1.39 MB)
http://bt.neu6.edu.cn/attachment.php?ai ... e1YxCjThks

IPV6下载地址
无法直接下载直接去页面下
http://bt.neu6.edu.cn/viewthread.php?ti ... ion&page=2

说明-安装后记得新立得立锁定版本
Screenshot-1.png
Screenshot-3.png
谢谢,总算搞定了。
添加一个自己用transmission-1.52修改过的ebuild,直接装官方那个是不行的。
经测试支持本论坛及cgbt(其它的应该也没问题,没ID测试)。
看下面这个 URL
http://trac.transmissionbt.com/ticket/1731
[edubt]transmission.tar.gz
(1.74 KiB) 已下载 63 次
附件
[edubt]transmission_1.52-1_i386.deb.deb
(1.39 MiB) 已下载 81 次
头像
mickeywaley
帖子: 1427
注册时间: 2009-03-19 9:19
系统: ubuntu
来自: 江苏
联系:

Re: transmission-1.75编译出错,暂用[edubt]transmission_1.52-1_i386.deb

#6

帖子 mickeywaley » 2009-12-05 18:13

1.5的那个失效了,大家卸载原来的用这个
[edubt]Transmission 1.76 for 6v.deb
吧,9.04下测试通过。
Screenshot.png
v6
v6
编译方法见
http://bt.neu6.edu.cn/viewthread.php?ti ... ansmission
IPV6的地址
编译最烦的就是依赖关系了,到处找,不过学到一些东西,就是编译失败后去看config.log文件,这里面会找到差哪些东西,然后谷歌一下基本就OK了。
虽然论坛有如何编译Transmission,然是貌似中途会出现很多问题,一下给出成功编译需要解决的依赖关系,我用的是Ubuntu 9.04,其它的大家试试吧(最好先把自带的transmission卸载掉哈),1.76和1.52均测试正常:
第一步:准备工作

1. sudo apt-get install libssl0.9.8
2. sudo apt-get install libssl-dev
3. sudo apt-get install openssl
4. suod apt-get install libcurl4-openssl-dev
5. sudo apt-get install libglib2.0-dev
6. sudo apt-get install libgtk2.0-dev
7. sudo apt-get install intltool

复制代码
然后就可以按照tjusea的步骤下去了,应该不会出现啥问题了,如果还是有问题就看看config.log,找到no package .......,然后谷歌一下就可以了.

第二步:下载源码压缩包文件,放置在test文件夹,解压,进入解压后的文件夹。

1. cd test
2. tar xjvf transmission-1.52.tar.bz2
3. cd transmission-1.52

复制代码


第三步:修改libtransmission下的web.c文件,使其支持解析ipv6的DNS地址。

1. sudo gedit libtransmission/web.c

复制代码
查找

1. curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );

复制代码

修改为

1. curl_easy_setopt( easy, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER );

复制代码
第四步:修改libtransmission下的tracker.c文件,使其能在六维空间下载。一般完成第二步后Transmission就可以在北邮人等ipv6的PT网站上下载了。但是六维空间的tracker服务器对于torrent hash的escape和Transmission有差别,以至于Tranmsision无法获得peers,无法下载。希望六维空间管理员加以修改,增加兼容性。

1. sudo gedit libtransmission/tracker.c

复制代码
查找

1. static int
2. is_rfc2396_alnum( char ch )
3. {
4. return ( '0' <= ch && ch <= '9' )
5. || ( 'A' <= ch && ch <= 'Z' )
6. || ( 'a' <= ch && ch <= 'z' );
7. }
8.

9. static void
10. escape( char * out,
11. const uint8_t * in,
12. int in_len ) /* rfc2396 */
13. {
14. const uint8_t *end = in + in_len;
15.

16. while( in != end )
17. if( is_rfc2396_alnum( *in ) )
18. *out++ = (char) *in++;
19. else
20. out += tr_snprintf( out, 4, "%%%02X", (unsigned int)*in++ );
21.

22. *out = '\0';
23. }

复制代码
修改为

1. static int
2. is_rfc2396_alnum( char ch )
3. {
4. return ( '0' <= ch && ch <= '9' )
5. || ( 'A' <= ch && ch <= 'Z' )
6. || ( 'a' <= ch && ch <= 'z' )
7. || ( ch == '.' )
8. || ( ch == '-' )
9. || ( ch == '_' )
10. || ( ch == '~' );
11. }
12.

13. static void
14. escape( char * out,
15. const uint8_t * in,
16. int in_len ) /* rfc2396 */
17. {
18. const uint8_t *end = in + in_len;
19.

20. while( in != end )
21. if( is_rfc2396_alnum( *in ) )
22. *out++ = (char) *in++;
23. else
24. out += tr_snprintf( out, 4, "%%%02x", (unsigned int)*in++ );
25.

26. *out = '\0';
27. }

复制代码


第五步:完成编译安装,本例将把Transmission安装在/opt/transmission下(也可以去掉 --prefix=/opt/transmission)。

1. ./configure --prefix=/opt/transmission --enable-shared --enable-gtk --disable-cli --disable-daemon
2. make
3. make check
4. sudo make install

复制代码


第六步:后续优化和配置(第五步去掉 --prefix=/opt/transmission就可以不要这一步)

1. sudo find /opt/transmission -type f -exec strip --strip-debug {} \;
2. sudo ln -s /opt/transmission/bin/transmission /usr/local/bin
3. sudo ln -s /opt/transmission/share/applications/transmission.desktop /usr/local/share/applications/transmission.desktop
4. sudo ln -s /opt/transmission/share/icons/hicolor/16x16/apps/transmission.png /usr/local/share/icons/hicolor/16x16/apps/transmission.png
5. sudo ln -s /opt/transmission/share/icons/hicolor/32x32/apps/transmission.png /usr/local/share/icons/hicolor/32x32/apps/transmission.png
6. sudo ln -s /opt/transmission/share/icons/hicolor/48x48/apps/transmission.png /usr/local/share/icons/hicolor/48x48/apps/transmission.png
7. sudo ln -s /opt/transmission/share/pixmaps/transmission.png /usr/share/app-install/icons/transmission.png

复制代码
这是编译好的1.76 的 DEB包(能用的话大家冒个泡,我电脑上测试可用哈):
附件
[edubt]Transmission 1.76 for 6v.deb
(881.53 KiB) 已下载 124 次
上次由 mickeywaley 在 2009-12-05 18:21,总共编辑 2 次。
头像
luojie-dune
帖子: 22033
注册时间: 2007-07-30 18:28
系统: Linux
来自: 空气中

Re: transmission-1.75编译出错,暂用[edubt]transmission_1.52-1_i386.deb

#7

帖子 luojie-dune » 2009-12-05 18:15

这都是什么啊。。。出错了竟然把全部都贴上来。。。找错吗。。。
『这个世界都是我的 ,我爱你们』

ENTP ⥂ INTP ⥄ INFP ⇦ INTJ

在此发布的文章使用 Creative Commons Attribution-ShareAlike 4.0 协议
Ampere
帖子: 26
注册时间: 2009-05-14 19:15

Re: transmission-1.75编译出错,暂用[edubt]transmission_1.52-1_i386.deb

#8

帖子 Ampere » 2010-01-10 19:16

很感谢六楼~~~ :em05
闲游九州
帖子: 6
注册时间: 2010-05-26 23:29

Re: transmission-1.75编译出错,暂用[edubt]transmission_1.52-1_i386.

#9

帖子 闲游九州 » 2011-05-06 15:34

有用,谢谢
回复