博客首页 | 排行榜 |

chenzhufly的博客

个人档案
博文分类
rtorrent/ARM  2009-03-06 21:26
rtorrent/ARM
Posted by spari on March 23, 2008
Cross-compiling rtorrent for my Slug running Debian/ARM involved a bit more work, but worthwhile as most of the dependencies are commonly used (ncurses, openssl, curl). I could have just simply copied these libraries over from my Slug - but that would be cheating ;-).Did it work? somewhat. Cross-compiled transmission worked well on the Slug, but as for rtorrent - works when started without any parameters, but the moment I load a file I get:
rtorrent: Last minute panic; sizeof(off_t) != 8.
Anyway, saving it for later time to figure that out, but here's what I did so far.
Setup:
If you don't already have an ARM toolchain, build one using Kegel's crosstool.
Set up the environment variables as I have in ARM toolchain.
Note:
In most of thes builds below, the configure step is outside/before setting the ARM toolchain environment as the configure does some fancy stuff (like tests and generating scripts) that needs the hosts toolchain (x86_64-linux-gcc) as well. In some cases the generated makefile also needs the hosts toolchain (see ncurses).
Each of the builds assumes a fresh environment/terminal!
openssl-0.9.8g:
$ ./Configure linux-generic32 shared --prefix=$BUILDS/arm
$ . ~/.arm_env
$ make
$ make install
libsigc++-2.0.18:
$ ./configure --host=arm-linux --with-shared --with-normal CC=$ARM_GCC LD=$ARM_LD CXX=$ARM_CXX --prefix=$BUILDS/arm
$ make
$ make install
libtorrent-0.12.0:
Found out that libtorrent's configure wasn't generating a proper libtool. It had references to the hosts libraries (x86_64) instead of the ARM toolchain libraries - no matter what options I gave on the command line it didn't take it like the other packages did. So what did I do? I copied the libtool from transmission (see transmission/ARM). It worked :-). Also did a diff between the two and saw that for the most part it was just those path references that where different.
$ svn co svn://rakshasa.no/libtorrent/trunk/libtorrent
$ ./configure --host=arm-linux --with-shared --with-normal --prefix=$BUILDS/arm
$ cp ../transmission-1.06/libtool .
$ . ~/.arm_env
$ make
$ make install
libcurl-7.18.0:
$ ./configure --host=arm-linux --with-shared --with-normal --prefix=$BUILDS/arm
$ . ~/.arm_env
$ make
$ make install
ncurses-5.6:
This thing was a beast to compile, but once all figured out (thanks to this hint) it cleanly made use of the host and target toolchain flags (without needing to switch environments). But it didn't automatically install a pkg-config file!
$ ./configure --host=arm-linux --with-shared --with-normal CC=$ARM_GCC LD=$ARM_LD CXX=$ARM_CXX --with-build-cc=gcc --prefix=$BUILDS/arm
$ make
$ make install
rtorrent-0.8.0:
$ svn co svn://rakshasa.no/libtorrent/trunk/rtorrent
This should work - but doesn't:
$ ./configure --host=arm-linux --prefix=$BUILDS/arm
For some reason configure fails to use pkg-config to pickup the cross-compiled ncurses. So had to use STUFF_CFLAGS and STUFF_LIBS (both of these overrides detection using pkg-config).
$ ./configure --host=arm-linux --prefix=$BUILDS/arm STUFF_CFLAGS="-I$BUILDS/arm/include/sigc++-2.0 -I$BUILDS/arm/lib/sigc++-2.0/include -I$BUILDS/arm/include -I$BUILDS/arm/include/ncurses" STUFF_LIBS="-L$BUILDS/arm/lib -lsigc-2.0 -lcurl -ltorrent"
$ . ~/.arm_env
$ make
$ make install
This entry was posted on March 23, 2008 at 8:12 pm and is filed under ARM, Linux, Slug. . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

原文地址 http://203.208.33.101/search?q=cache:x1wsipzLBCMJ:matrix108.wordpress.com/2008/03/23/rtorrentarm/+rT

类别:嵌入式+linux |
上一篇:How to build rtorrent/libtorrent for arm5vtel NSLU | 下一篇:Linux 安裝 rtorrent
以下网友评论只代表其个人观点,不代表本网站的观点或立场