Drobo

Cross-compiling for DroboFS: rtorrent 0.8.6

EDIT: A much better version of this tutorial is now available here. The new version includes ruTorrent, a web interface for rTorrent that makes it really easy to use remotely.

All further posts in this thread should refer to the new version. The remainder of this post will remain the same for future reference.
[hr]

Hi everyone,

Here is another post on the cross-compile series for DroboFS.

Introduction: Why rtorrent?

I know that there are several BitTorrent clients out there, but in my experience, rtorrent is one of the leanest, fastest ones. Which makes it perfect for ARM devices such as the DroboFS.

Overall compiling complexity: Medium.

Step 1: Background info

To be able to make use of this post, you need a VM configured as indicated in this post.

Step 2: Enter the cross-compiling environment

See step 2 of this post to see instructions on how to enter the chroot environment.

Step 3: Dependencies

libtorrent needs:
[list]
[]ncurses
[
]libsigc++
[]openssl (if you want encrypted transfers, and if you are not sure, you probably do)
[
]cURL
[*]libtorrent
[/list]

Step 4: Get the source code

rtorrent’s website: http://libtorrent.rakshasa.no/
Version: 0.8.6
Direct link: http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz

Make sure that you are in the folder /root/code, then type:

wget http://libtorrent.rakshasa.no/downloads/rtorrent-0.8.6.tar.gz tar zxf rtorrent-0.8.6.tar.gz cd rtorrent-0.8.6

Step 5: Configuration

Here is why this is considered a “medium” complexity compile. Rtorrent requires a special configure command:

PKG_CONFIG_PATH=/usr/arm/lib/pkgconfig ./configure --host=arm-none-linux-gnueabi --prefix=/usr/arm

Explanation: the configuration for cross-compilation requires overrides for the PKGCONFIG location.

This should return no errors. If it does, you have to check if you have all required packages in your chroot (although, if you have been following the dependencies, you should have all of them). For more info, check here.

Step 6: Compiling

Within the folder /root/code/rtorrent-0.8.6:

make

Again, there should be no errors. If any errors are reported, make sure you performed steps 3 and 4 correctly. If you still have errors, make sure that the VM is properly configured (e.g. like I did the first time around, when I got the wrong toolchain, or forgot to ‘export’ the proper compiler flags). Also, libtorrent can be picky about dependencies. Check here for more info.

Step 6: Installing

As simple as it gets:

make install

…which will place the compiled library under /usr/arm.

Then we package the whole /usr/arm and copy it over to the DroboFS, as indicated on step 9 here.

Congratulations!

Now you can run rtorrent on your DroboFS. Check the rtorrent wiki on how to configure and run this.

If you need help, I can post the configuration file I use on my DroboFS.