lime icon indicating copy to clipboard operation
lime copied to clipboard

How to compile/install?

Open IonicaBizau opened this issue 12 years ago • 57 comments

This project is great. How can I compile and install it on my Ubuntu 14.04?

IonicaBizau avatar May 02 '14 07:05 IonicaBizau

i tried with yaourt on arch but it didn't compile . :/

TaylanTatli avatar May 02 '14 08:05 TaylanTatli

Doesn't the building page help?

zoli avatar May 02 '14 09:05 zoli

did you get any errors? I am on Xubuntu 14.04 and I keep getting the error:
gocode/src/github.com/limetext/lime/backend/textmate/language.go:27: undefined: rubex.Regexp

I am very new to GO but I looked in the language.go file and the rubex module seems to be imported correctly.

Jesse-Millwood avatar May 02 '14 10:05 Jesse-Millwood

Just go look at the building page, if you get an error about the pkg-config file oniguruma.pc missing, just copy the file from github.com/limetext/rubex to /usr/lib/pkgconfig and do the go get again.

haiyamicode avatar May 02 '14 11:05 haiyamicode

@phaikawl Can you please add instructions how to install the dependencies as well? For example go.

IonicaBizau avatar May 02 '14 11:05 IonicaBizau

@IonicaBizau are you kidding?

haiyamicode avatar May 02 '14 14:05 haiyamicode

http://golang.org/

haiyamicode avatar May 02 '14 14:05 haiyamicode

I still don't have a clear image... I still need a list of commands that I should run to compile and install the application...

IonicaBizau avatar May 02 '14 16:05 IonicaBizau

I can see on your profile that you're quite an experienced programmer, looks like you've never touched Go. Installing Go is very easy, just http://golang.org/doc/install. For lime the adequate instructions are all here https://github.com/limetext/lime/wiki/Building. Just get your hands dirty if you face big problems you can ask for help.

haiyamicode avatar May 02 '14 23:05 haiyamicode

With ~30 minutes of persistence I got it working on Ubuntu 14.04. Make sure you have all the libraries installed, including QML

BenedictEggers avatar May 03 '14 19:05 BenedictEggers

@BenedictEggers Can you list here all the commands that you run, including deps?

@phaikawl Yes I am, but I am not the best in compiling software...

IonicaBizau avatar May 03 '14 19:05 IonicaBizau

NOTE: This is all for Ubuntu 14.04. Also, my ~/.histfile has gotten messed up since I did it last night, so this is my best attempt at recreating what I did. Also, make sure you have an up-to-date Go install, git install, and mercurial install before any of this (I did those a while ago, but they should be pretty trivial if you don't already have them).

First, grab python3-3

echo 'yes' | sudo add-apt-repository ppa:fkrull/deadsnakes sudo apt-get update -qq sudo apt-get install python3.3 python3.3-dev

Next, get qt, qml, whatever else

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa sudo apt-get update sudo apt-get install ubuntu-sdk qtbase5-private-dev qtdeclarative5-private-dev libqt5opengl5-dev go get gopkg.in/qml.v0

Then the Oniguruma lib

sudo apt-get install libonig2 go get github.com/limetext/rubex go install github.com/limetext/rubex

(Note, you may have to make the file /usr/lib/pkgconfig/oniguruma.pc containing what's found at the following URL: https://github.com/limetext/rubex/blob/master/oniguruma.pc)

Next, get the actual limetext code and test it

go get github.com/limetext/lime/frontend/termbox cd $GOPATH/src/github.com/limetext/lime git submodule update --init

go test github.com/limetext/lime/backend/... go test github.com/limetext/lime/frontend/termbox/...

BenedictEggers avatar May 03 '14 19:05 BenedictEggers

Let me know if you have issues.

BenedictEggers avatar May 03 '14 19:05 BenedictEggers

One more thing: For some reason, the test go test github.com/limetext/lime/backend/... fails but go test github.com/limetext/lime/backend/ (same command, without the "..." at the end) works. This doesn't happen with the second set of tests.

BenedictEggers avatar May 03 '14 20:05 BenedictEggers

@BenedictEggers I think that go test github.com/limetext/lime/backend/ includes only the test at that level, while go test github.com/limetext/lime/backend/... includes all the tests in the subdirs.

I tried both commands and go test ...backend/ gave me the test result for only backend, but go test ...backend/... ran all the tests including backend, backend/commands, backend/loaders, etc.

sonph avatar May 04 '14 07:05 sonph

Yes, ... will pattern-match/expand. There's some code in backend that isn't referenced by anything else so suffers from bitrot and doesn't build (IIRC related to "rendering").

quarnster avatar May 04 '14 09:05 quarnster

I have just installed Go using this tutorial. It seems that the PPA are not updated for Ubuntu 14.04...

IonicaBizau avatar May 04 '14 09:05 IonicaBizau

I get the following error:

$ git clone http://github.com/limetext/rubex ~/.go/src/rubex
$ go install rubex
# rubex
../.go/src/rubex/regex.go:5:23: fatal error: oniguruma.h: No such file or directory
 #include <oniguruma.h>
                       ^
compilation terminated.

IonicaBizau avatar May 04 '14 09:05 IonicaBizau

@sonph thanks, you're right. Got them all working properly. @IonicaBizau on Ubuntu 14.04 use sudo apt-get install golang. It's in the core repo, shouldn't need an external ppa. For your second issue, did you sudo apt-get install libonig2?

Also, I see that you're cloning github repos into your ~/.go directory. If that's where your go code lives, I'd put export GOPATH=/home/YOUR_USER_NAME/.go at the end of you .bashrc, so go knows where to put things it clones from github.

BenedictEggers avatar May 04 '14 09:05 BenedictEggers

@BenedictEggers I didn't know that. :smile: I compiled go from source. Yes, I installed libonig2:

$ sudo apt-get install libonig2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libonig2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

IonicaBizau avatar May 04 '14 09:05 IonicaBizau