Pages

Monday, October 15, 2012

Compiling RetroShare for the Raspberry Pi

The question is not if you are paranoid,
it is if you are paranoid enough.

I'm a fan of darknets. I've always been. I don't want this to turn into a political discussion - it is a "tech" blog - so it should be sufficient to say that I like and use RetroShare.

RetroShare is a decentralized sharing application/network that is, in my opinion, the best darknet software available right now. I've already tried WASTE, GnuNet and AllianceP2P, and they couldn't convince me for long.
Maybe I'll make an article about the pros and cons of RetroShare, but in this article I want to describe my attempts to get it running on my Raspberry Pi, so it can serve as a 24/7 node in the RetroShare network to forward connections without consuming that much power.

When I heard about the Raspberry Pi, the geek inside me wanted to have one. Fabian is still pissed that my Raspi arrived sooner than his, that is it arrived at all, although I ordered it much later. (I think he wants to go for Parallella now ...)

I've already managed to compile RetroShare 0.5.3 on and for my Raspi, but it segfaulted whenever I wanted to add a friend or open the settings menu. With the recent release of 0.5.4 I thought I could give it a try again.

Be warned: The compiling alone takes a few hours. I didn't write down exact times, but it's probably best if you have some other tasks to attend to for 2 hours while one subproject is compiling.

Required packages

My primary source for instructions is the RetroShare wiki page UnixCompile of today's version. It is a bit outdated because they've removed gnupg and introduced openpgp, but didn't update their instructions. Install the following packages with:

The problems start with libretroshare and there are two changes you need to make on it:

Firstly, because even though the preprocessor commands are there, you still need to tell the make process that you are on Debian and your libupnp is of a different version. You do this by editing the file libretroshare.pro in the libretroshare/src/ directory and after the line 221

DEFINES *= UBUNTU

you add (not replace) these lines

DEFINES *= DEBIAN
DEFINES *= UPNP_VERSION=10617

because we do in fact have version 1.6.17 of libupnp installed. (See this thread in the RetroShare forum.)

Secondly, someone hardcoded the location of glib-2.0 into that project file in a very system dependent way. You need to change this line (should be directly below the previous change, line 224 now)

And now the real fun starts. The Raspberry Pi has 256 MB RAM of which at least 16 MB need to be reserved for the video core, so only 240 MB RAM left. Unfortunately, this is not enough to compile retroshare-gui, it will quit with something like

Now, I've heard that very, verybad things happen if you create a swap file on a flash storage device like the SD card your Raspi uses or USB sticks. But as a matter of fact, Raspbian wheezy already uses a swap file per default, so it can't be that bad. All you need to do is create another swap file of sufficient size, say 256 MB, which you delete afterwards just to be on the safe side:

Now I Connected with TightVNCserver to my Raspi becaus i don't know how to configure and run it with CLI/SSH or no-Gui.

After some search i found the file to start Retroshare. the path is something similar like "~/development/RetroShare_v0.5.4c/trunk/retroshare-gui/src/retroshare"I started it.created a new account and connected with my other PC and authenticated both.

I am now working and trying on:silent auto start at re-boot (maybe as a daemon and no-Gui, or start it in the tightVNCserver:1)combine both RS Installations in one AccountX-Forwarding of the Gui to openSuSe/Gnome, some-other-Linux, WinXP, Win7, Win-something. remote control it with Pyrs and Android or other tools

Hey all, just to let you know: I'm pretty stuck with work right now, but I'm planning on a new article to look at the newest changes of RetroShare, also maybe compiling it on your Linux machine to make it faster. Stay tuned!