requirements to compile libtorrent & rtorrent

104 views
Skip to first unread message

James

unread,
Sep 8, 2009, 4:46:43 PM9/8/09
to NSLU2-rtorrent
I have been abot to use the binaries posted here (rtorrent 0.84.1) on
my DNS-323 with chrooted Debian Lenny. Since ARM version of the
binaries will no longer be posted, is there any "tricks" that one
needs to knwo to compile them under Debian? I tried it couple of times
but the results were not sucessfully.
I also tried to do "apt-get -t experimental..." route but 0.8.4-1 is
the latest.
Thank you in advance,
James

hhasert

unread,
Sep 13, 2009, 5:32:54 AM9/13/09
to NSLU2-rtorrent
Most of the information I got from http://www.osix.net/modules/article/?id=827.
You need to install the packages listed there to have a valid compile
environment.

build-essential
libsigc++-2.0-dev
pkg-config
comerr-dev
libcurl3-openssl-dev
libidn11-dev
libkadm55
libkrb5-dev
libssl-dev
zlib1g-dev
libncurses5
libncurses5-dev
libtool
automake
svn-arch-mirror
libxmlrpc-c3-dev
libwww-dev
libexpat1-dev

I use 3 scripts for the compile :

1) Get the code from the repository

svn co svn://rakshasa.no/libtorrent/trunk/libtorrent
svn co svn://rakshasa.no/libtorrent/trunk/rtorrent

2) Compile rTorrent

export CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"
cd libtorrent
./autogen.sh
./configure --disable-debug
/etc/init.d/rtorrent stop
make install
cd ..

3) Compile Libtorrent

export CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"
cd rtorrent
./autogen.sh
./configure --disable-debug --with-xmlrpc-c
make install
cd ..

The trick is to add the export for the armv5tel line of processors
(export CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"), otherwise it will
compile but will not run stable.

Works like a charm. Oh, it takes some memory and it will definately
use swap space. I swap on a USB stick to keep the compile time down,
because otherwise the disk movement will impair speed tremendously. If
you need more help, just ask.


Message has been deleted

James

unread,
Sep 13, 2009, 12:13:59 PM9/13/09
to NSLU2-rtorrent


On Sep 13, 2:32 am, hhasert <hans.has...@gmail.com> wrote:
> On Sep 8, 10:46 pm, James <forum.ja...@gmail.com> wrote:
>
> > I have been abot to use the binaries posted here (rtorrent 0.84.1) on
> > my DNS-323 with chrooted Debian Lenny. Since ARM version of the
> > binaries will no longer be posted, is there any "tricks" that one
> > needs to knwo to compile them under Debian? I tried it couple of times
> > but the results were not sucessfully.
> > I also tried to do "apt-get -t experimental..." route but 0.8.4-1 is
> > the latest.
> > Thank you in advance,
> > James
>
> Most of the information I got fromhttp://www.osix.net/modules/article/?id=827.
Thanks. I have all the packages installed but can not find libwww-
dev.
Doesn't look like it is available for Lenny.

A newbie question. You have make install but no make. Is this just a
copy and paste error or there is no need to "make"?

hhasert

unread,
Sep 15, 2009, 12:11:57 PM9/15/09
to NSLU2-rtorrent

> Thanks. I have all the packages installed but can not find libwww-
> dev.
Hmm, me neither, probably renamed or no longer needed. I cannot find
it on my system and I compile ok.

> Doesn't look like it is available for Lenny.
Nope, seen it for Etch and Sid, not for Lenny (weird)
>
> A newbie question. You have make install but no make. Is this just a
> copy and paste error or there is no need to "make"?
Make is a program you have on your system (or "apt-get install make"
if you do not have it). The ' Install' tag in the makefile compiles
and moves the result to the install directories, which are /usr/local/
lib and /usr/local/bin. So you can either call the specific steps in
the make process or just 'make install' to do everything with one
command.

James

unread,
Sep 16, 2009, 12:42:58 AM9/16/09
to NSLU2-rtorrent
Thanks. Whether I use make then make install or just make install,
compilation did not work.
Anyway, in case someone else is using the instructions, can you
clarify the following?
2) Compile rTorrent


export CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"
cd libtorrent
./autogen.sh
./configure --disable-debug
/etc/init.d/rtorrent stop
make install
cd ..


3) Compile Libtorrent


export CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"
cd rtorrent
./autogen.sh
./configure --disable-debug --with-xmlrpc-c
make install
cd ..


Is libtorrent needs to cofigure with --with-xmlrpc-c or rtorrent needs
to?
Thank you again.

hhasert

unread,
Sep 16, 2009, 2:40:23 PM9/16/09
to NSLU2-rtorrent
On Sep 16, 6:42 am, James <forum.ja...@gmail.com> wrote:
> Thanks. Whether I use make then make install or just make install,
> compilation did not work.
> Anyway, in case someone else is using the instructions, can you
> clarify the following?
> 2) Compile libtorrent
>
When you get the sources with the svn command, 2 directories are
created from the directory where you started them (the svn commands).
The dirs are 'rtorrent' and 'libtorrent'. You need to compile
libtorrent first.I always compile as 'root' in the /root directory.

> export CXXFLAGS="-O2 -mcpu=xscale -mtune=xscale"
This defines an environment variable that tells the compile process it
needs to optimize for the SLUG.
> cd libtorrent
go to the directory where you downloaded the sources for libtorrent
> ./autogen.sh
start the command to generate the stuff needed for libtorrent to be
able to compile on linux
> ./configure --disable-debug
configure the libtorrent package and generate the make files needed to
compile
> /etc/init.d/rtorrent stop
stop rtorrent to save memory and speed up the compile
> make install
compile libtorrent and move it to /usr/local/lib
> cd ..
return to the directory where you started the svn commands
>
> 3) Compile rtorrent

James

unread,
Sep 16, 2009, 3:37:00 PM9/16/09
to NSLU2-rtorrent
> > Thank you again.- Hide quoted text -
>
> - Show quoted text -

Thank you for your clarification. In the original post, you have step
2 as "2) Compile rTorrent" even though the details are for libtorrent.
Just want to make sure.

For my attempt to build libtorrent, autogen and configure went ok.
However, make generates whole bunch of error messages:

/mnt/HD_a2/libtorrent-0.12.5# make
make all-recursive
make[1]: Entering directory `/mnt/HD_a2/libtorrent-0.12.5'
Making all in src
make[2]: Entering directory `/mnt/HD_a2/libtorrent-0.12.5/src'
Making all in torrent
make[3]: Entering directory `/mnt/HD_a2/libtorrent-0.12.5/src/torrent'
Making all in data
make[4]: Entering directory `/mnt/HD_a2/libtorrent-0.12.5/src/torrent/
data'
/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -
DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../.. -I../../.. -O2 -
mcpu=xscale -mtune=xscale -DNDEBUG -fvisibility=hidden -I/usr/
include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT block.lo -MD -
MP -MF .deps/block.Tpo -c -o block.lo block.cc
../../../libtool: line 841: X--tag=CXX: command not found
../../../libtool: line 874: libtool: ignoring unknown tag : command
not found
../../../libtool: line 841: X--mode=compile: command not found
../../../libtool: line 1008: *** Warning: inferring the mode of
operation is deprecated.: command not found
../../../libtool: line 1009: *** Future versions of Libtool will
require --mode=MODE be specified.: command not found
../../../libtool: line 1152: Xg++: command not found
../../../libtool: line 1152: X-DHAVE_CONFIG_H: command not found
../../../libtool: line 1152: X-I.: command not found
../../../libtool: line 1152: X-I../../..: No such file or directory
../../../libtool: line 1152: X-I.: command not found
../../../libtool: line 1152: X-I./..: No such file or directory
../../../libtool: line 1152: X-I./../..: No such file or directory
../../../libtool: line 1152: X-I../../..: No such file or directory
../../../libtool: line 1152: X-O2: command not found
../../../libtool: line 1152: X-mcpu=xscale: command not found
../../../libtool: line 1152: X-mtune=xscale: command not found
../../../libtool: line 1152: X-DNDEBUG: command not found
../../../libtool: line 1152: X-fvisibility=hidden: command not found
../../../libtool: line 1152: X-I/usr/include/sigc++-2.0: No such file
or directory
../../../libtool: line 1152: X-I/usr/lib/sigc++-2.0/include: No such
file or directory
../../../libtool: line 1152: X-MT: command not found
../../../libtool: line 1152: Xblock.lo: command not found
../../../libtool: line 1152: X-MD: command not found
../../../libtool: line 1152: X-MP: command not found
../../../libtool: line 1152: X-MF: command not found
../../../libtool: line 1152: X.deps/block.Tpo: No such file or
directory
../../../libtool: line 1152: X-c: command not found
../../../libtool: line 1205: Xblock.lo: command not found
../../../libtool: line 1210: libtool: compile: cannot determine name
of library object from `': command not found
make[4]: *** [block.lo] Error 1
make[4]: Leaving directory `/mnt/HD_a2/libtorrent-0.12.5/src/torrent/
data'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/mnt/HD_a2/libtorrent-0.12.5/src/torrent'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/mnt/HD_a2/libtorrent-0.12.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/HD_a2/libtorrent-0.12.5'
make: *** [all] Error 2

hhasert

unread,
Sep 17, 2009, 1:47:05 PM9/17/09
to NSLU2-rtorrent
James,

Which version of libtool do you use ? Mine is :

libtool --version
ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-4 (1.1220.2.493
2008/02/01 16:58:18)

If you enter "libtool --help" you should see that it supports --tag
as one of the options. just run ' apt-get --install libtool' to make
sure you have the latest version installed.

James

unread,
Sep 17, 2009, 3:19:17 PM9/17/09
to NSLU2-rtorrent
I have the same version..


libtool --version
ltmain.sh (GNU libtool) 1.5.26 Debian 1.5.26-4 (1.1220.2.493
2008/02/01 16:58:18)

Just for fun, I did "apt-get install libtool" and got

Reading package lists... Done
Building dependency tree
Reading state information... Done
libtool is already the newest version.


This is a very strange problem. I used to be able to compile rtorrent/
libtorrent several months back (before I used your ARM version of the
binaries). Binaries were generated but they crashed shortly after
startup.

hhasert

unread,
Sep 17, 2009, 5:23:25 PM9/17/09
to NSLU2-rtorrent
Weird. Thew crash was probably due to not setting the environment
variable, I did a cross compile and that had the same problem, it
started but crashed soon. My 'make'generates the same command :

/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -
DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../.. -I../../.. -O2 -
mcpu=xscale -mtune=xscale -DNDEBUG -fvisibility=hidden -I/usr/
include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -MT block.lo -MD -
MP -MF .deps/block.Tpo -c -o block.lo block.cc

and works fine. The only difference is that I have the dir under /
root and do not have libtorrent-0.12.5 but just plain libtorrent as a
directory. I do not have a clue what is going wrong, but being
pranoid, you have installed gcc and g++ compilers ?

James

unread,
Sep 17, 2009, 6:32:20 PM9/17/09
to NSLU2-rtorrent


On Sep 17, 2:23 pm, hhasert <hans.has...@gmail.com> wrote:
> Weird. Thew crash was probably due to not setting the environment
> variable, I did a cross compile and that had the same problem, it
> started but crashed soon. My 'make'generates the same command :
>
> /bin/sh ../../../libtool --tag=CXX   --mode=compile g++ -
> DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../.. -I../../..    -O2 -
> mcpu=xscale -mtune=xscale -DNDEBUG -fvisibility=hidden   -I/usr/
> include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include   -MT block.lo -MD -
> MP -MF .deps/block.Tpo -c -o block.lo block.cc
>
>  and works fine. The only difference is that I have the dir under /
> root and do not have libtorrent-0.12.5 but just plain libtorrent as a
> directory. I do not have a clue what is going wrong, but being
> pranoid, you have installed gcc and g++ compilers ?- Hide quoted text -
>
> - Show quoted text -

I do have both installed:
gcc --version
gcc (Debian 4.3.2-1.1) 4.3.2

g++ --version
g++ (Debian 4.3.2-1.1) 4.3.2

hhasert

unread,
Sep 18, 2009, 4:21:51 PM9/18/09
to NSLU2-rtorrent
James,

I do not have a clue (yet) what is wrong. I tried to break stuff to
generate the same error, but I haven't been able to get closer to a
solution. Have you tried to compile as root in the directory /root ? I
see you have a mounted volume where you placed the files, if that is a
non unix filesystem something odd might break. Like I said, I am
clueless, never seen this before.

James

unread,
Sep 18, 2009, 7:18:37 PM9/18/09
to NSLU2-rtorrent
I tried to put the latest libtorrent under /root/libtorrent but have
the same results. I have no idea why this is happening. The mounted
volume is one of the two hard dirves I have for my DNS-323. They are
both formated by DNS-323 with ext2 format.
The interesting fact is I have no problem making the latest
transmission client.

James

unread,
Sep 19, 2009, 10:58:20 AM9/19/09
to NSLU2-rtorrent
I downloaded and made libtorrent-0.12.4 without error with the same
setup. I only did a "make" but not "make install" because I don't want
to distrub my existing installation.

hhasert

unread,
Sep 23, 2009, 9:41:15 AM9/23/09
to NSLU2-rtorrent
Did you put a ticket to libtorrent ? See http://libtorrent.rakshasa.no/ticket/1852
I do not see a resolution though. Do you have the output of autogen
and configure ?

James

unread,
Sep 23, 2009, 1:25:25 PM9/23/09
to NSLU2-rtorrent


On Sep 23, 6:41 am, hhasert <hans.has...@gmail.com> wrote:
> On Sep 19, 4:58 pm, James <forum.ja...@gmail.com> wrote:
>
> > I downloaded and made libtorrent-0.12.4 without error with the same
> > setup. I only did a "make" but not "make install" because I don't want
> > to distrub my existing installation.
>
> Did you put a ticket to libtorrent ? Seehttp://libtorrent.rakshasa.no/ticket/1852
> I do not see a resolution though. Do you have the output of autogen
> and configure ?

I appended my console output including autogen and configure to ticket
1852.
Thanks.

hhasert

unread,
Sep 27, 2009, 3:57:22 AM9/27/09
to NSLU2-rtorrent
Ticket 1852 has a suggested solution :

rm -f scripts/{libtool,lt*}.m4

and then try again with ./autogen ; ./configure ; make

James

unread,
Sep 27, 2009, 10:01:53 AM9/27/09
to NSLU2-rtorrent
Thanks, I saw that. libtorrent went OK but gcc has seg fault when I
"make" rtorrent. Need to repeat everything again when I have a chance.
BTW, I saw at a blog that xmlrpc needs to be compiled also. Can I
reuse what I have from rtorrent 0.84?

hhasert

unread,
Oct 1, 2009, 1:40:40 PM10/1/09
to NSLU2-rtorrent
James,

I never recompiled xmlrpc and use the default package. Problem is that
it is a 32bit version, so the responses in number format get incorrect
representation in XMLRPC. I solved that in my interface by requesting
rTorrent to translate these to strings, so I cricumvent the issue.
Reply all
Reply to author
Forward
0 new messages