Page 1 of 2

[SOLVED] - Compile only the daemon

Posted: Mon Jan 26, 2009 8:26 pm
by tristan
Hi All!

I would like run Deluge (daemon only + webUI) on my arm-based Buffalo NAS linkstation.
As I have some problems with cross-compilation, I should compile Deluge natively on the NAS (it could require ages!).

Is there a way to avoid compilation of unneeded components?

Thanks,

Tristan

Re: Compile only the daemon

Posted: Mon Jan 26, 2009 9:05 pm
by andar
tristan wrote:Hi All!

I would like run Deluge (daemon only + webUI) on my arm-based Buffalo NAS linkstation.
As I have some problems with cross-compilation, I should compile Deluge natively on the NAS (it could require ages!).

Is there a way to avoid compilation of unneeded components?

Thanks,

Tristan
The only thing that needs to be built is libtorrent. If you can find someone to build libtorrent for the ARM, then you could just use that.

Re: Compile only the daemon

Posted: Mon Jan 26, 2009 11:07 pm
by tristan
Thanks for your reply.

I have already libtorrent installed on my system (usr/local/lib) but it seems Deluge install script can not find it, so it tries to build it.

Any ideas?

Thanks!

Tristan

Re: Compile only the daemon

Posted: Tue Jan 27, 2009 5:40 am
by andar
tristan wrote:Thanks for your reply.

I have already libtorrent installed on my system (usr/local/lib) but it seems Deluge install script can not find it, so it tries to build it.

Any ideas?

Thanks!

Tristan
You need to have the libtorrent python bindings installed and importable by python. If you start up python you should be able to do the following without an error:

Code: Select all

>>> import libtorrent

Re: Compile only the daemon

Posted: Tue Jan 27, 2009 8:34 am
by tristan
Thanks!!

I solved by installing rasterbar libtorrent and python bindings from Debian experimental branch :D

It seems to work fine....

Cheers,

Tristan

Re: [SOLVED] - Compile only the daemon

Posted: Wed Jan 28, 2009 7:48 pm
by trevman
I would like to cross-compile Deluge for a MIPS based platform. I have already cross compiled rasterbar-libtorrent. It runs on my target hardware fine. I started down the path of cross-compiling Python for Deluge but realized I didn't need to. I saw in this thread that you installed libtorrent for the host platform and not the target. I see the Python bindings in the rasterbar-libtorrent source directory. It appears that in order to create this it must be for a Windows platform. My host is Linux FC8.

I guess the ultimate goal is to have rasterbar-libtorrent and Deluge on target hardware serving web pages for control.

Thanks
trevman

Re: [SOLVED] - Compile only the daemon

Posted: Fri Jan 30, 2009 8:12 am
by abubin
please post here how it goes? Cause I am interested also to get deluge working on my Dlink-DNS323 nas. ARM based system.

Re: [SOLVED] - Compile only the daemon

Posted: Fri Jan 30, 2009 5:38 pm
by trevman
Well it is going somewhat well. I finally realized that there are many parts here. I had cross-compiled rasterbar-libtorrent as a shared object. It uses boost. I was able to use the test client to make sure this worked. I ported Python to my mipsel-linux platform. I had to fight with some packages but it all appears to be working ok. I was able to build the deluge package and take the .egg (and built files) over to my target. This appeared to install ok. After changing some paths, I was able to run "deluge". It will serve the web pages.
Now came the interesting part. Deluged needed the python extensioned versions of the rasterbar-libtorrent libraries. I found how to build those and installed that on the target. I started getting unresolved externals for boost (mangled name items). I found that I needed to do the same for Boost and link the python bound boost libs to the libtorrent SO. I then put that on target hardware (with other headaches of gcc/g++ link issues). Deluged now runs. However, while starting up it is causing an assertion failure in the destructor of disk_io_thread. It appears the disk_io_thread object is being destroyed but was not notified cleanly. My guess is this is an innocent bystander and the real issue is something else went wrong and the object happened to be destroyed prematurely as the disk_io_thread should stay alive for the life of execution.

I am not familiar with Python debugging (other than printf) so I can dump stack to see why the destructor is being called.

trevman

Re: [SOLVED] - Compile only the daemon

Posted: Fri Jan 30, 2009 11:26 pm
by trevman
After running strace I realized that the libtorrent library was trying to make a system call (epoll) that my kernel was not configured with. After changing the bjam config script to disable epoll I am able to run deluge (web ui) and deluged (the daemon). These are successfully running on a little endian MIPS processor (199Mhz I think). It appears to be doing a pretty good job. Once in the web UI under preferences, I set the template to AJAX and the Theme to Classic. It is still pretty responsive and looks good.

trevman

Re: [SOLVED] - Compile only the daemon

Posted: Sun Feb 01, 2009 3:16 pm
by abubin
oh wow...if only I am as technically incline as you are. I don't understand half of the things you mention. Seems like there are no easy way of compiling deluge in mini linux. Hope one day someone will compile it in Dlink-DNS323. Still, getting it to work is really something.