Skip to content

Building on Raspberry Pi 2 and 3

yamboy1 edited this page Jul 4, 2017 · 1 revision

Many people installing on the RPi2 are new to Linux, and might have gotten here from a search so here is a little little background on the Pi and it's processor/chip: The Pi has an ARM processor, this is very different from what is on PCs, Macs and most Linux systems. So most software made for those other CPUs has to be recompiled from source to run on this ARM7 chip.

Lime is written with the GO language and relies on the Python Language for some features.

GO is a Google Language written in C, although they pretend is written in GO (you have to compile an earlier version of GO in C to be able to compile the current version of GO in GO! HA!) in any case, for Lime the old 1.4 version will suffice.

This Guide is an attempt to recompile Lime for the ARM on the Pi2 (ARM7).

Before you follow this guide

I don't know what I am doing. I am new to Linux, Raspbian, Debian, startx, the Go language, the Python language, the C language, compiling stuff from source, GIT, Make, sudo, Nano, apt-get, VirtualEnv, Debian, Wheezy, Jessie and even GitHub!

Still, I got pretty far..and Yes, you need to know all of that stuff and more to do this.

Not afraid? ok.... Well here we go. If you are new to the Pi, this is as good as any exercise in something you might be doing often.

What's on the Pi

  1. Raspbian OS operating system. Also known as Debian version "Wheezy" (or a derivative of DW..not sure).
  2. Python 2 and 3 (But you will need 3.4, that is why you see it installed below)

*NOTE: apparently upgrading your "Wheezy" to "Jessie" gets you Python 3.4. I am trying this at the moment.

*NOTE2: apparently having several versions of Python adds complexity, so one route is to wipe out all installations and only have the one you need. However, that will likely create issues for other programs. The solution is to learn to use Virtual Environments! UGH! I'll keep you posted.

  1. A GUI (like windows or Mac or Ubuntu). If not already on the GUI start it up with startx.
  2. A text editor.

*NOTE: You will have to make changes to configurations files where you need the Windows equivalent of Admin rights (sudo). I have not found a way to do this from the GUI editor. So in those cases you need to open a terminal and type sudo nano path\to\you\file\filename. So you have to learn Nano. UHG!

  1. A WebKit based web browser that is apparently outdated. GitHub rejects it(so you probably figured this out already or you would not be reading this, but in any case I recommend installing Chromium, if only because neither Chrome nor Firefox work yet.
  2. A Terminal (UXTerm - 100 times better than Windows' command line)

Prerequisites:

  • C compiler (pre-installed, but check)
  • GIT (pre-installed, but check)

Checking for C Type gcc -v into terminal. If you get gcc: command not found you need to install C: sudo apt-get install gcc libc6-dev

Checking for Git type git into terminal. Again, if you get a not found error, install it: apt-get install git.

Steps Overview:

  • Compile and install the Go language.
  • Compile and install Python 3.4.
  • Compile and Install Lime.

Installing GO

cd ~/
git clone https://go.googlesource.com/go
cd go
git checkout go1.4.1
cd src
sudo ./all.bash

That last command will take about an hour. RPi2 seems to loose its' Ethernet connection when it sleeps, so stick around.

GO Source install reference

Installing Python 3.4

This is where I am. Having some issues with some missing dependencies it appears.

Check out this thread on github.com/limetext/support/issues/

Lines below added by abhijithcr. Now create a directory 'gocode' inside the 'go' directory. Next, set paths in ~/.bashrc

$ sudo nano ~/.bashrc.

Scroll to the end of the file and type in the following two lines.

export GOPATH=$HOME/go/gocode.
export PATH=$PATH:$GOROOT/bin:$HOME/go/bin.

now press Ctrl+O (writeout - for save) and then Ctrl+X for exit.

Installing oniguruma

The next module which needs to be installed is oniguruma. Use the following command lines for that.

$ sudo apt-get install libonig-dev
$ gem install oniguruma